Chapter 6. Creating Access to Volumes
- Native Client (see Section 6.1, “Native Client”)
- Network File System (NFS) v3 (see Section 6.2, “NFS”)
- Server Message Block (SMB) (see Section 6.3, “SMB”)
Because of differences in locking semantics, a single Red Hat Gluster Storage volume cannot be concurrently accessed by multiple protocols. Current support for concurrent access is defined in the following table.
SMB | Gluster NFS | NFS-Ganesha | Native FUSE | Object | |
---|---|---|---|---|---|
SMB | Yes | No | No | No | No |
Gluster NFS | No | Yes | No | No | No |
NFS-Ganesha | No | No | Yes | No | No |
Native FUSE | No | No | No | Yes | Yes [a] |
Object | No | No | No | Yes [a] | Yes |
[a]
For more information, refer Section 6.5, “Managing Object Store”.
|
The following table provides the support matrix for the supported access protocols with TCP/RDMA.
Access Protocols | TCP | RDMA |
---|---|---|
FUSE | Yes | Yes |
SMB | Yes | No |
NFS | Yes | Yes |
Important
6.1. Native Client
Red Hat Enterprise Linux version | Red Hat Gluster Storage version | Native client version |
---|---|---|
6.5 | 3.0 | 3.0, 2.1* |
6.6 | 3.0.2, 3.0.3, 3.0.4 | 3.0, 2.1* |
6.7 | 3.1, 3.1.1, 3.1.2 | 3.1, 3.0, 2.1* |
6.8 | 3.1.3 | 3.1.3 |
6.9 | 3.2 | 3.1.3, 3.2 |
7.1 | 3.1, 3.1.1 | 3.1, 3.0, 2.1* |
7.2 | 3.1.2 | 3.1, 3.0, 2.1* |
7.2 | 3.1.3 | 3.1.3 |
7.3 | 3.2 | 3.1.3, 3.2 |
Warning
Note
6.1.1. Installing Native Client
Important
Use the Command Line to Register and Subscribe a System to Red Hat Network
Prerequisites
- Know the user name and password of the Red Hat Network (RHN) account with Red Hat Gluster Storage entitlements.
- Run the
rhn_register
command to register the system.Copy to Clipboard Copied! Toggle word wrap Toggle overflow rhn_register
# rhn_register
- In the Operating System Release Version screen, select All available updates and follow the prompts to register the system to the standard base channel of the respective Red Hat Enterprise Linux Server version.
- Run the
rhn-channel --add --channel
command to subscribe the system to the correct Red Hat Gluster Storage Native Client channel:- For Red Hat Enterprise Linux 7.x clients using Red Hat Satellite Server:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow rhn-channel --add --channel=rhel-x86_64-server-7-rh-gluster-3-client
# rhn-channel --add --channel=rhel-x86_64-server-7-rh-gluster-3-client
Note
The following command can also be used, but Red Hat Gluster Storage may deprecate support for this channel in future releases.Copy to Clipboard Copied! Toggle word wrap Toggle overflow rhn-channel --add --channel=rhel-x86_64-server-rh-common-7
# rhn-channel --add --channel=rhel-x86_64-server-rh-common-7
- For Red Hat Enterprise Linux 6.x clients:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow rhn-channel --add --channel=rhel-x86_64-server-rhsclient-6
# rhn-channel --add --channel=rhel-x86_64-server-rhsclient-6
- For Red Hat Enterprise Linux 5.x clients:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow rhn-channel --add --channel=rhel-x86_64-server-rhsclient-5
# rhn-channel --add --channel=rhel-x86_64-server-rhsclient-5
- Verify that the system is subscribed to the required channels.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow yum repolist
# yum repolist
Use the Command Line to Register and Subscribe a System to Red Hat Subscription Management
Prerequisites
- Know the user name and password of the Red Hat Subscription Manager account with Red Hat Gluster Storage entitlements.
- Run the
subscription-manager register
command and enter your Red Hat Subscription Manager user name and password to register the system with Red Hat Subscription Manager.Copy to Clipboard Copied! Toggle word wrap Toggle overflow subscription-manager register --auto-attach
# subscription-manager register --auto-attach
- Depending on your client, run one of the following commands to subscribe to the correct repositories.
- For Red Hat Enterprise Linux 7.x clients:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow subscription-manager repos --enable=rhel-7-server-rpms --enable=rh-gluster-3-client-for-rhel-7-server-rpms
# subscription-manager repos --enable=rhel-7-server-rpms --enable=rh-gluster-3-client-for-rhel-7-server-rpms
Note
The following command can also be used, but Red Hat Gluster Storage may deprecate support for this repository in future releases.Copy to Clipboard Copied! Toggle word wrap Toggle overflow subscription-manager repos --enable=rhel-7-server-rh-common-rpms
# subscription-manager repos --enable=rhel-7-server-rh-common-rpms
- For Red Hat Enterprise Linux 6.1 and later clients:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow subscription-manager repos --enable=rhel-6-server-rpms --enable=rhel-6-server-rhs-client-1-rpms
# subscription-manager repos --enable=rhel-6-server-rpms --enable=rhel-6-server-rhs-client-1-rpms
- For Red Hat Enterprise Linux 5.7 and later clients:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow subscription-manager repos --enable=rhel-5-server-rpms --enable=rhel-5-server-rhs-client-1-rpms
# subscription-manager repos --enable=rhel-5-server-rpms --enable=rhel-5-server-rhs-client-1-rpms
For more information, see Section 3.2 Registering from the Command Line in Using and Configuring Red Hat Subscription Management. - Verify that the system is subscribed to the required repositories.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow yum repolist
# yum repolist
Use the Web Interface to Register and Subscribe a System
Prerequisites
- Know the user name and password of the Red Hat Network (RHN) account with Red Hat Gluster Storage entitlements.
- Log on to Red Hat Network (http://rhn.redhat.com).
- Move the mouse cursor over the
Subscriptions
link at the top of the screen, and then click theRegistered Systems
link. - Click the name of the system to which the Red Hat Gluster Storage Native Client channel must be appended.
- Click Subscribed Channels section of the screen.in the
- Expand the node for Additional Services Channels for
Red Hat Enterprise Linux 7 for x86_64
orRed Hat Enterprise Linux 6 for x86_64
or forRed Hat Enterprise Linux 5 for x86_64
depending on the client platform. - Click thebutton to finalize the changes.When the page refreshes, select the Details tab to verify the system is subscribed to the appropriate channels.
Install Native Client Packages
Prerequisites
- Run the
yum install
command to install the native client RPM packages.Copy to Clipboard Copied! Toggle word wrap Toggle overflow yum install glusterfs glusterfs-fuse
# yum install glusterfs glusterfs-fuse
- For Red Hat Enterprise 5.x client systems, run the
modprobe
command to load FUSE modules before mounting Red Hat Gluster Storage volumes.Copy to Clipboard Copied! Toggle word wrap Toggle overflow modprobe fuse
# modprobe fuse
For more information on loading modules at boot time, see https://access.redhat.com/knowledge/solutions/47028 .
6.1.2. Upgrading Native Client
Warning
Unmount gluster volumes
Unmount any gluster volumes prior to upgrading the native client.Copy to Clipboard Copied! Toggle word wrap Toggle overflow umount /mnt/glusterfs
# umount /mnt/glusterfs
Upgrade the client
Run theyum update
command to upgrade the native client:Copy to Clipboard Copied! Toggle word wrap Toggle overflow yum update glusterfs glusterfs-fuse
# yum update glusterfs glusterfs-fuse
Remount gluster volumes
Remount volumes as discussed in Section 6.1.3, “Mounting Red Hat Gluster Storage Volumes”.
6.1.3. Mounting Red Hat Gluster Storage Volumes
Note
- For Red Hat Gluster Storage 3.2, the recommended native client version should either be 3.2.z, or 3.1.z.
- Server names selected during volume creation should be resolvable in the client machine. Use appropriate
/etc/hosts
entries, or a DNS server to resolve server names to IP addresses.
6.1.3.1. Mount Commands and Options
mount -t glusterfs
command. All options must be separated with commas.
mount -t glusterfs -o backup-volfile-servers=volfile_server2:volfile_server3:.... ..:volfile_serverN,transport-type tcp,log-level=WARNING,log-file=/var/log/gluster.log server1:/test-volume /mnt/glusterfs
# mount -t glusterfs -o backup-volfile-servers=volfile_server2:volfile_server3:.... ..:volfile_serverN,transport-type tcp,log-level=WARNING,log-file=/var/log/gluster.log server1:/test-volume /mnt/glusterfs
- backup-volfile-servers=<volfile_server2>:<volfile_server3>:...:<volfile_serverN>
- List of the backup volfile servers to mount the client. If this option is specified while mounting the fuse client, when the first volfile server fails, the servers specified in
backup-volfile-servers
option are used as volfile servers to mount the client until the mount is successful.Note
This option was earlier specified asbackupvolfile-server
which is no longer valid. - log-level
- Logs only specified level or higher severity messages in the log-file.
- log-file
- Logs the messages in the specified file.
- transport-type
- Specifies the transport type that FUSE client must use to communicate with bricks. If the volume was created with only one transport type, then that becomes the default when no value is specified. In case of
tcp,rdma
volume, tcp is the default. - ro
- Mounts the file system as read only.
- acl
- Enables POSIX Access Control List on mount. See Section 6.4.4, “Checking ACL enablement on a mounted volume” for further information.
- background-qlen=n
- Enables FUSE to handle n number of requests to be queued before subsequent requests are denied. Default value of n is 64.
- enable-ino32
- this option enables file system to present 32-bit inodes instead of 64- bit inodes.
6.1.3.2. Mounting Volumes Manually
Manually Mount a Red Hat Gluster Storage Volume
mount -t glusterfs HOSTNAME|IPADDRESS:/VOLNAME /MOUNTDIR
command to manually mount a Red Hat Gluster Storage volume.
Note
- If a mount point has not yet been created for the volume, run the
mkdir
command to create a mount point.Copy to Clipboard Copied! Toggle word wrap Toggle overflow mkdir /mnt/glusterfs
# mkdir /mnt/glusterfs
- Run the
mount -t glusterfs
command, using the key in the task summary as a guide.Copy to Clipboard Copied! Toggle word wrap Toggle overflow mount -t glusterfs server1:/test-volume /mnt/glusterfs
# mount -t glusterfs server1:/test-volume /mnt/glusterfs
6.1.3.3. Mounting Volumes Automatically
- Open the
/etc/fstab
file in a text editor. - Append the following configuration to the
fstab
file.Copy to Clipboard Copied! Toggle word wrap Toggle overflow HOSTNAME|IPADDRESS:/VOLNAME /MOUNTDIR glusterfs defaults,_netdev 0 0
HOSTNAME|IPADDRESS:/VOLNAME /MOUNTDIR glusterfs defaults,_netdev 0 0
Using the example server names, the entry contains the following replaced values.Copy to Clipboard Copied! Toggle word wrap Toggle overflow server1:/test-volume /mnt/glusterfs glusterfs defaults,_netdev 0 0
server1:/test-volume /mnt/glusterfs glusterfs defaults,_netdev 0 0
If you want to specify the transport type then check the following example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow server1:/test-volume /mnt/glusterfs glusterfs defaults,_netdev,transport=tcp 0 0
server1:/test-volume /mnt/glusterfs glusterfs defaults,_netdev,transport=tcp 0 0
6.1.3.4. Testing Mounted Volumes
Testing Mounted Red Hat Gluster Storage Volumes
Prerequisites
- Run the
mount
command to check whether the volume was successfully mounted.Copy to Clipboard Copied! Toggle word wrap Toggle overflow mount
# mount server1:/test-volume on /mnt/glusterfs type fuse.glusterfs(rw,allow_other,default_permissions,max_read=131072
If transport option is used while mounting a volume, mount status will have the transport type appended to the volume name. For example, for transport=tcp:Copy to Clipboard Copied! Toggle word wrap Toggle overflow mount
# mount server1:/test-volume.tcp on /mnt/glusterfs type fuse.glusterfs(rw,allow_other,default_permissions,max_read=131072
- Run the
df
command to display the aggregated storage space from all the bricks in a volume.Copy to Clipboard Copied! Toggle word wrap Toggle overflow df -h /mnt/glusterfs
# df -h /mnt/glusterfs Filesystem Size Used Avail Use% Mounted on server1:/test-volume 28T 22T 5.4T 82% /mnt/glusterfs
- Move to the mount directory using the
cd
command, and list the contents.Copy to Clipboard Copied! Toggle word wrap Toggle overflow cd /mnt/glusterfs ls
# cd /mnt/glusterfs # ls