Sun StorageTek QFS Linux Client Guide |
This document contains important information about Linux clients in the Sun StorageTek QFS file system in Release 4, Update 6 (4U6). The document is written for system administrators and programmers who are already familiar with the Sun StorageTek QFS software running on the Solaris
Operating System (OS). It explains the differences between installation and configuration on the Solaris OS and installation and configuration on the Linux OS.
Before installing the Sun StorageTek QFS software on a Linux client, you should be familiar with the detailed installation procedure for Sun StorageTek QFS software as outlined in the Sun StorageTek QFS Installation and Upgrade Guide. You should also have an experienced system administrator's knowledge of the supported Red Hat Enterprise or SuSE Linux operating environment in which you are installing the Sun StorageTek QFS software.
This document contains the following sections:
The following Linux versions are supported in the 4U6 software release:
Note - This is the last version of Sun StorageTek QFS that will support SuSE Enterprise Linux 8. It will not be supported in the next version of the software. |
Unlike shared Sun StorageTek QFS Solaris clients, the Linux client is restricted to client-only behavior. It cannot be configured as a potential metadata server. The Linux client supports interaction with Sun StorageTek Storage Archive Manager (SAM) software, but does not support Sun StorageTek SAM commands such as stage, archive, release, and samu. It has Sun StorageTek QFS file system functionality only.
The Sun StorageTek QFS software functionality is largely the same for the Solaris and Linux clients. Sun StorageTek QFS software components are stored in the /opt/SUNWsamfs, /etc/opt/SUNWsamfs, and /var/opt/SUNWsamfs directories on the Linux client, just as they are on a Solaris system. The sam-fsd and sam-sharefsd commands function the same way on both platforms.
This section provides instructions for installing and uninstalling the Sun StorageTek QFS Linux Client software.
The following are the differences in installation between the Sun StorageTek QFS Solaris client and the Sun StorageTek QFS Linux client:
|
1. Edit the Solaris metadata server's /etc/opt/SUNWsamfs/hosts.fsname file to add the Linux client's address, and run samsharefs to update the information on disk.
In the following example, hiball-mn is the Solaris metadata server:
hiball-mn 10.1.170.213 1 0 server
linux-mn 10.1.170.210 0 0
rollerball-mn 10.1.170.132 0 0
sandiego-mn 10.1.170.8 0 0
2. Insert the installation DVD into the Linux system or locate the downloaded software package.
3. Do one of the following to install the software:
a. If you installing from the DVD, type the following commands as root on the Linux system:
# mount -o ro -t iso9660 /dev/cdrom /mnt
# /mnt/linux1/Install
b. If you are installing from a downloaded software package, type the following commands as root on the Linux system:
# mount -o ro,loop -t iso9660 StorageTek_QFS_4.6.iso /mnt
# /mnt/linux1/Install
The installation program installs the software.
If the installation program does not recognize the Linux kernel version, it will display the following message:
A direct match for your kernel wasn't found. Attempt creating a custom rpm for your kernel (yes/no)?
Select yes to enable the installation program to adapt the Sun StorageTek QFS loadable binary kernel module to the Linux system. If you select no, the installation cannot be completed.
4. Review the /etc/opt/SUNWsamfs/mcf file to verify that it contains the correct paths for your installation.
Note - An mcf file is automatically generated for the Linux client. For more information, see mcf File Differences. |
For most installations, the mcf file that is created will be correct, but it may have to be edited to reflect your specific environment.
5. Verify that the Solaris metadata server is running, and then run the mount command to mount the file system.
Note - The mount command requires that the shared mount option be set, either on the command line or in /etc/fstab. |
When you mount the file system, the following message is displayed:
Warning: loading SUNWqfs will taint the kernel: SMI license
See http://www.tux.org/lkml/#export-tainted for information about tainted modules. Module SUNWqfs loaded with warnings
This is a normal result of the installation and can be disregarded.
|
Sun StorageTek QFS man pages are located in section 1m. In order to ensure access to the man pages from the Linux client, carry out the following procedures:
|
Use the uninstall script that resides in the /var/opt/SUNWsamfs directory to uninstall the Linux client software.
Caution - Do not use other processes, such as rpm -e, to uninstall the software. They can cause unexpected results and problems with uninstalling or reinstalling the software. |
The following sections describe the functionality, mounting, and execution differences between the Linux and Solaris clients.
There are a few areas in which the Linux client does not match the functionality of the Solaris client. The Sun StorageTek QFS Linux client does not support the following functions:
The Linux Shared QFS client supports striping, but striped performance is generally limited to the performance of a single device.
The mcf file, /etc/opt/SUNWsamfs/mcf, defines the topology of the equipment that the Sun StorageTek QFS file system manages.
Unlike a Solaris client, the Linux client software automatically generates an mcf file. If an mcf file does not exist, the Linux client will create one when the system is booted or when samd config is run. This file should be examined to verify that it correctly reflects the Sun StorageTek QFS environment. It may need to be manually edited to match your specific file system configuration. Note, however, that if you create your own mcf file or edit the auto-generated mcf file, the system will no longer auto-generate the file.
When an existing disk is repartitioned or a new file system is created, run samd config or reboot the system to create a new mcf file that reflects the changes. When new hardware is added, the SCSI bus needs to be rescanned with the "add single device" mechanism, or the equivalent, and then samd config must be run. Rebooting the system will also cause the SCSI bus to be rescanned.
If you need to modify the Linux client mcf file, run the samfsconfig command first. This prints the existing Sun StorageTek QFS file system names and the Linux device path names that are associated with them. When editing the mcf file, you must take into account the differences between Solaris and Linux logical unit numbers (LUNs) in the device paths.
Instead of specifying an actual device path for the metadata device (mm), specify nodev in the Linux Sun StorageTek QFS mcf file. This is the default in the auto-generated mcf file.
belmont 40 ma belmont on shared
nodev 43 mm belmont on
/dev/sdb5 44 mr belmont on
For more information about creating mcf files, see the mcf(4) man page or the Sun StorageTek QFS File System Configuration and Administration Guide.
Mounting functions are almost identical on the Linux and Solaris clients. However, the mount options available for the Linux client are limited to the following:
No other mount options are available for the Linux client.
The Linux application programming interface (API) differs from the Solaris API in many respects, so users will see some differences. For example, upon lookup of a directory that has been removed, the Solaris system returns an ENOENT message, whereas the Linux system returns an ESTALE message.
There are several host bus adapter (HBA) failover methods that are supported in the various Linux distributions, and failover is included in QLogic drivers. None of these methods have been exhaustively tested with the Sun StorageTek QFS Linux client.
Performance of the Sun StorageTek QFS Linux client is affected by the fact that direct I/O is more restrictive on the Linux client. The Linux device layer supports a maximum of 4 kilobytes per I/O operation. This means that large requests in a Linux environment must be broken up and serviced individually.
Solaris 10 added a new partition ID for storage management initiative (SMI) labels on x86 and x64 platforms. Linux kernels with versions before 2.6.10 do not recognize this partition ID, so those kernels will need a patch in order to support Sun StorageTek QFS Linux client interaction with a Sun StorageTek QFS metadata server running Solaris 10 on an x64 platform.
Two patches are included with the Sun StorageTek QFS Linux client software: one for 2.4.x series kernels, and one for 2.6.x series kernels (only required for kernels before 2.6.10). They are located in the linux1/patches directory. To install the patch, navigate to the top level of the Linux kernel source directory and run patch. For example:
# cd /usr/src/linux-2.4
# patch -p1 < /<path to patch>/2.4_patch
Unexpected results may occur when you run the Sun StorageTek QFS Linux client software on a system with SELinux enabled, depending on your site's specific SELinux configuration. For example, the df command may return Permission denied when run by a non-root user.
If you encounter such a similar error, check the security context settings on the /dev/samsys file. The correct settings should be similar to the following:
crw-r--r-- 1 user_u:object_r:device_t root root 253, 0 Jan 31
17:19 /dev/samsys
You might also want to check the security label of the user and verify that the user has a sufficient security label to access the object, given the object's security label.
Linux clients and Solaris clients use different procedures to store system information that might be used to diagnose Sun StorageTek QFS issues.
Files that contain system information from the Linux kernel are in the /proc directory. For example, the /proc/cpuinfo file contains hardware information. The table below describes some files that contain useful troubleshooting information.
Note - Linux kernel log messages go to the /var/log/messages file. |
Because the Linux kernel has many variations, troubleshooting problems can be very challenging. A few tools are available that might help in debugging:
Note - These projects are not present by default in Red Hat or SuSE Linux. You must obtain the appropriate RPMs or SRPMs and might have to reconfigure the kernel to use them. |
Note - Trace files are placed in the /var/opt/SUNWsamfs/trace directory on the Linux client, just as they are on the Solaris client. |
The following are some questions about the Linux client that are frequently asked by users who are familiar with Sun StorageTek QFS on the Solaris platform.
Q: The Linux install script reports that I got a negative score and cannot install the software. Is there any way I can still install the software?
A: You can try the -force-custom and -force-build install options. However, this may cause a system panic when installing the modules. This is especially risky if your kernel is built with some of the kernel hacking options, such as spinlock debugging, enabled.
Q: Can I use commands such as vmstat, iostat, top, truss, and sar on Linux?
A: The vmstat, top, sar, and iostat commands are found in many Linux Red Hat installations. If they are not installed, they can be added using the sysstat and procps RPMs. The Linux equivalents of truss are ltrace and strace.
Q: How can multipath failover be done with QFS on Linux?
A: If you are using the Sun StorageTek 6130, you can use the multipath tool found at http://www.sun.com/download/products.xml?id=432f43a5. Otherwise, several path failover methods are possible, depending on your Linux distribution and type of HBAs. These include but are not limited to Sun StorageTek Traffic Manager (SSTM), multipulse, device mapper, and qlogic path failover. None of these have been tested exhaustively with Sun StorageTek QFS.
Do not use the mdadm (multiple devices admin) package for path failover on a Sun StorageTek QFS Linux client. The mdadm package writes a superblock to devices that it uses. The result is that mdadm has the potential to corrupt data that Solaris has written to those devices. Furthermore, Solaris can also corrupt the superblock that mdadm has written to the devices.
Q: Can Sun StorageTek Traffic Manager be used with the Sun StorageTek QFS Linux client?
A: Yes. First build a custom kernel with multipathing support as described in the Sun StorageTek Traffic Manager documentation. Then install the Linux client software.
Q: Can Extensible Firmware Interface (EFI) labels be used on the Sun StorageTek QFS Linux client?
A: Most Linux Red Hat kernels are not built with support for EFI labels with GPT (GUID Partition Table) partitions. Therefore, to use EFI labels, you must rebuild the kernel with the CONFIG_EFI_PARTITION option set. For more information about building a custom kernel, see the distribution documentation.
Q: Can I use other Linux volume managers such as logical volume management (LVM), Enterprise Volume Management System (EVMS), or Device Mapper with the Sun StorageTek QFS Linux client software?
A: No. To use a file system with EVMS, you need to have a File System Interface Module (FSIM) for that file system. No FSIM exists for the Sun StorageTek QFS product. For you to use LVM, the partition type that fdisk shows must be LVM(8e). Partitions that Sun StorageTek QFS uses must be SunOS.
Q: Can I use file systems that are larger than 2 TB?
A: Yes, but some utilities that provide file system information, such as df, might return incorrect information when run on Linux. In addition, there may be problems when sharing the file system with NFS or Samba.
Q: Are there any differences between the mount options supported on the Linux client and those supported on the Solaris client?
A: There are many samfs mount options that are not supported on the Linux client. Two to be aware of are nosuid and forcedirectio. See Mounting Differences for a complete list of supported mount options on the Linux client.
Q: How can I mount filesystems that have SMI labels generated by X64 Solaris 10 metadata server?
A: Apply one of the patches available from Sun for the 2.4 or 2.6 kernel.
Q: What Linux versions and distributions were used in testing Sun StorageTek QFS 4.6?
A: Sun StorageTek QFS was tested with the following Linux distributions:
Q: The File System Manager user interface does not show Sun StorageTek QFS installed on my Linux clients. Why?
A: The File System Manager software does not support Linux clients.
Q: Is there a Linux version of cfgadm or devfsadm to rescan/reprobe the SCSI devices?
A: On Linux you must reboot the system in order to guarantee that the SCSI devices are rescanned. You can also try removing and reinstalling the HBA driver. For example:
rmmod qlaXXXX; modprobe qlaXXXX
If you are using a Qlogic driver that supports LUN hot add, you can try the following:
echo "scsi-qlascan" > /proc/scsi// (qlogic driver will re-scan)
Q: There's no forced unmount on the Linux client like there is on Solaris. What can I do when I encounter a busy filesystem when attempting to unmount?
A: First try fuser -k. If the busy filesystem message persists, use lsof to find any open files and their associated PIDS, then kill the processes.
Copyright © 2007, Sun Microsystems, Inc. All Rights Reserved.