You can access Red Hat Storage volumes in multiple ways. You can use Native Client method for high concurrency, performance and transparent failover in GNU/Linux clients. You can also use NFS v3 to access Red Hat Storage volumes. Linux and other operating systems that support the NFSv3 standard may use NFS to access the Red Hat Storage volumes. However, there may be some differences in implementation of the NFSv3 standard by different operating systems which may lead to some issues. You can contact your Red Hat representative for more information on compatibility of Red Hat Storage Server for your specific client operating system and known issues that may exist.
You can use SMB (Server Message Block) to access Red Hat Storage volumes when using Microsoft Windows as well as Samba clients. For this access method, Samba packages need to be present on the client side.
Native Client is a FUSE-based client running in user space. Native Client is the recommended method for accessing Red Hat Storage volumes when high concurrency and high write performance is required.
This section introduces Native Client and explains how to install the software on client machines. This section also describes how to mount Red Hat Storage volumes on clients (both manually and automatically) and how to verify that the Red Hat Storage volume has mounted successfully.
After you have successfully installed your client operating system, you must first register the target system to Red Hat Network and subscribe to the Red Hat Enterprise Linux Server channel.
To subscribe to the Red Hat Enterprise Linux Server channel using RHN Classic:
- Run the
rhn_registercommand to register the system with Red Hat Network. To complete registration successfully you will need to supply your Red Hat Network username and password.# rhn_registerIn the select operating system release page, select All available updates and follow the on screen prompts and complete the registration of the system.The system is now registered to rhel-x86_64-server-6 channel. Subscribe to Red Hat Storage Native ClientYou must subscribe the system to the Red Hat Storage Native Client channel using either the web interface to Red Hat Network or the command linerhn-channelcommand.- Using the
rhn-channelcommandRun therhn-channelcommand to subscribe the system to Red Hat Storage Native Client channel. The command which need to be run is:# rhn-channel --add --channel=rhel-x86_64-server-rhsclient-6
Using the Web Interface to Red Hat Network.To add a channel subscription to a system from the web interface:- Log on to Red Hat Network (http://rhn.redhat.com).
- Move the mouse cursor over the
Subscriptionslink at the top of the screen, and then click theRegistered Systemslink in the menu that appears. - Select the system to which you are adding Red Hat Storage Native Client channel from the list presented on the screen, by clicking the name of the system.
- Click
Alter Channel Subscriptionsin theSubscribed Channelssection of the screen. - On this screen, expand the node for Additional Services Channels for
Red Hat Enterprise Linux 6 for x86_64for RHEL 6 or Additional Services Channels forRed Hat Enterprise Linux 5 for x86_64for RHEL 5. - Click the
Change Subscriptionsbutton to finalize the changes.After the page refreshes, select theDetailstab to verify if your system is subscribed to the appropriate channels.
Run the following command to verify if the system is registered successfully.# rhn-channel -l rhel-x86_64-server-6 rhel-x86_64-server-rhsclient-6
The system is now registered with Red Hat Network and subscribed to theRed Hat Storage Native Clientchannel. Now install the native client RPMs using the following command:# yum install glusterfs glusterfs-fuse
Important
All the clients must be of same version. Red Hat strongly recommends you to upgrade your clients before you upgrade the server.
If you are using RHEL 5.x machines, you must load FUSE modules before mounting the Red Hat Storage volumes. Execute the following command to load FUSE modules:
# modprobe fuse
For more information on loading modules at boot time, see https://access.redhat.com/knowledge/solutions/47028 .
After installing Native Client, you must mount Red Hat Storage volumes to access data. There are two methods you can choose:
After mounting a volume, you can test the mounted volume using the procedure described in Section 9.1.2.3, “Testing Mounted Volumes”.
Note
Server names selected during creation of volumes should be resolvable in the client machine. You can use appropriate
/etc/hosts entries or a DNS server to resolve server names to IP addresses.
Mounting Options
You can specify the following options when using the
mount -t glusterfs command. Note that you need to separate all options with commas.
backupvolfile-server=server name- name of the backup volfile server to mount the client. If this option is added while mounting fuse client, when the first volfile server fails, then the server specified inbackupvolfile-serveroption is used as volfile server to mount the client.fetch-attempts=number- number of attempts to fetch volume files while mounting a volume. This option is useful when you mount a server with multiple IP addresses or when round-robin DNS is configured for the server name.log-level- logs only specified level or higher severity messages in the log-file.log-file- logs the messages in the specified file.direct-io-mode=[enable|disable]ro- mounts the file system as read only.acl- enables POSIX Access Control List on mount.selinux- enables handling of SELinux xattrs through the mount point.- background-qlen=length - this option enables FUSE to handle
nnumber of requests to be queued before stopping to accept new requests. Default value ofnis 64. - enable-ino32 - this option enables file system to present 32-bit inodes instead of 64- bit inodes.
For example:
# mount -t glusterfs -o backupvolfile-server=volfile_server2,fetch-attempts=2,log-level=WARNING,log-file=/var/log/gluster.log server1:/test-volume /mnt/glusterfs
To manually mount a Red Hat Storage volume
- To mount a volume, use the following command:
# mount -t glusterfs HOSTNAME-OR-IPADDRESS:/VOLNAME MOUNTDIR
For example:# mount -t glusterfs server1:/test-volume /mnt/glusterfs
Note
The server specified in the mount command is only used to fetch the glusterFS configuration volfile describing the volume name. Subsequently, the client will communicate directly with the servers mentioned in the volfile (which might not even include the one used for mount).If you see a usage message like Usage: mount.glusterfs, mount usually requires you to create a directory to be used as the mount point. Runmkdir /mnt/glusterfscommand before you attempt to run the mount command listed above.
You can configure your system to automatically mount the Red Hat Storage volume each time your system starts.
The server specified in the mount command is only used to fetch the glusterFS configuration volfile describing the volume name. Subsequently, the client will communicate directly with the servers mentioned in the volfile (which might not even include the one used for mount).
To automatically mount a Red Hat Storage volume
- To mount a volume, edit the
/etc/fstabfile and add the following line:HOSTNAME-OR-IPADDRESS:/VOLNAME MOUNTDIR glusterfs defaults,_netdev 0 0
For example:server1:/test-volume /mnt/glusterfs glusterfs defaults,_netdev 0 0
To test mounted volumes
- Use the following command:
# mountFor example, if the Red Hat Storage volume was successfully mounted, the output of the mount command on the client will display an entry like the following:server1:/test-volume on /mnt/glusterfs type fuse.glusterfs(rw,allow_other,default_permissions,max_read=131072
- Use the following command:
# dfThe output ofdfcommand on the client will display the aggregated storage space from all the bricks in a volume similar to this example:# df -h /mnt/glusterfs Filesystem Size Used Avail Use% Mounted on server1:/test-volume 28T 22T 5.4T 82% /mnt/glusterfs
- Change to the directory and list the contents by entering the following:
# cd MOUNTDIR# ls - For example,
# cd /mnt/glusterfs # ls