Red Hat Linux configuration and attachment
This article describes how to configure the new disk devices on a Red Hat Linux host. Configuration of the devices should be performed by the Linux system administrator. Configuration requires superuser/root access to the host system. If you have questions or concerns, contact your Hitachi Vantara representative.
Storage system configuration for Red Hat Linux operations
The storage system must be fully configured before being attached to the Red Hat Linux host, as described in Configuring the storage system.
- Host mode
The required host mode for Red Hat Linux is 00. Do not select a host mode other than 00 for Red Hat Linux. For a complete list of host modes for the storage system, see Host modes and host mode options. For instructions on setting the host modes, see the Provisioning Guide for the storage system.
- Host mode options
You may also need to set host mode options (HMOs) to meet your operational requirements. For a complete list of HMOs for the storage system, see Host modes and host mode options. For instructions on setting the HMOs, see the Provisioning Guide for the storage system.
Veritas Cluster Server: See Note on using Veritas Cluster Server for important information about using Veritas Cluster Server.
Device Mapper (DM) Multipath configuration for Red Hat Linux
The storage systems support DM Multipath operations for Red Hat Enterprise Linux (RHEL) version 5.4 X64 or X32 or later.
- Disabling the HBA failover function
- Installing the kpartx utility
- Creating the multipath device with the multipath command
- Editing the /etc/modprobe.conf file
- Editing the /etc/multipath.conf file
- Configuring LVM
- Configuring raw devices
- Creating partitions with DM Multipath
After you specify the parameter, execute the following command to enable the setting:
# systemctl reload multipathd.service
Example of /etc/multipath.conf:
If the setting applies to all devices, add the no_path_retry parameter to defaults.
defaults {
no_path_retry 10
find_multipaths yes
user_friendly_names yes
}
If the setting applies to each device, add the no_path_retry parameter to device.
devices {
device {
vendor "HITACHI"
product "^OPEN-"
path_grouping_policy "multibus"
no_path_retry 10
}
}
If the no_path_retry parameter is not specified, server I/O or the system that booted from SAN might be stopped when failure is detected on the storage controllers.
Verifying new device recognition for Red Hat Linux
The final step before configuring the new disk devices is to verify that the host system recognizes the new devices. The host system automatically creates a device file for each new device recognized.
Procedure
Use the dmesg command to display the devices.
# dmesg | more : : scsi0 : Qlogic QLA2200 PCI to Fibre Channel Host Adapter: 0 device 14 irq 11 Firmware version: 1.17.26, Driver version 2.11 Beta scsi : 1 host. Vendor: HITACHI Model: OPEN-3 Rev: 0111 Type: Direct-Access ANSI SCSI revision: 02 Detected scsi disk sda at scsi0, channel 0, id 0, lun 0 Vendor: HITACHI Model: OPEN-9 Rev: 0111 Type: Direct-Access ANSI SCSI revision: 02 Detected scsi disk sdb at scsi0, channel 0, id 0, lun 1 : :In this example, the HITACHI OPEN-3 device (TID 0, LUN 0) and the HITACHI OPEN-9 device (TID 0, LUN 1) are recognized by the Red Hat Linux server.
Record the device file name for each new device. You will need this information when you partition the devices. The following figure shows a sample SCSI path worksheet.
LDEV
(CU:LDEV)
Device Type LUSE
( *n)
VLL
(MB)
Device File Name Path Alternate Path 0:00 TID:____
LUN:____
TID:____
LUN:____
0:01 TID:____
LUN:____
TID:____
LUN:____
0:02 TID:____
LUN:____
TID:____
LUN:____
0:03 TID:____
LUN:____
TID:____
LUN:____
0:04 TID:____
LUN:____
TID:____
LUN:____
0:05 TID:____
LUN:____
TID:____
LUN:____
0:06 TID:____
LUN:____
TID:____
LUN:____
0:07 TID:____
LUN:____
TID:____
LUN:____
0:08 TID:____
LUN:____
TID:____
LUN:____
0:09 TID:____
LUN:____
TID:____
LUN:____
0:0A TID:____
LUN:____
TID:____
LUN:____
0:0B TID:____
LUN:____
TID:____
LUN:____
0:0C TID:____
LUN:____
TID:____
LUN:____
0:0D TID:____
LUN:____
TID:____
LUN:____
0:0E TID:____
LUN:____
TID:____
LUN:____
0:0F TID:____
LUN:____
TID:____
LUN:____
The device files are created under the /dev directory. Verify that a device file was created for each new disk device.
# ls -l /dev | more : brw-rw---- 1 root disk 8, 0 May 6 1998 sda
In this example, the device file is
sda.
Configuring the new devices on Red Hat Linux
This section describes how to configure the new disk devices on the Red Hat Linux system host.
Setting the number of logical units for Red Hat Linux
Use this procedure to set the number of logical units (LUs).
Procedure
Edit the /etc/modules.conf file to add the following line:
options scsi_mod max_scsi_luns=xxwhere xx is the maximum number of LUs supported by your Linux OS. Check your host adapter documentation and Linux system documentation to determine the total number of devices that can be supported.
To set the Emulex Driver, add the following line to the /etc/modules.conf file:
Alias scsi_hostadapter lpfcdd
To activate the above modification, make an image file for booting. Example:
# mkinitrd /boot/initrd-2.4.x.scsiluns.img 'uname -r'
Use one of the following methods to change the setting of Bootloader:
- When LILO is used as Bootloader: Edit the lilo.conf file, and then issue the lilo command to activate the lilo.conf setting with selecting the label. Example:
image=/boot/vmlinuz-qla2x00 label=Linux-qla2x00 append=“max_scsi_luns=16” # initrd=/boot/initrd-2.4.x.img initrd=/boot/initrd-2.4.x.scsiluns.img root=/dev/sda7 read-only #sbin/liloAs shown in this example, the
initrd=/boot/initrd-2.4.x.img lineis commented out, and theinitrd=/boot/initrd-2.4.x.scsiluns.imgline is added. - When Grand Unified Bootloader (GRUB) is used as Bootloader: Edit the /boot/grub/grub.conf file. Example:
kernel /boot/vmlinuz-2.4.x ro root=/dev/hda1 # initrd /boot/initrd-2.4.x.img initrd /boot/initrd-2.4.x.scsiluns.img
- When LILO is used as Bootloader: Edit the lilo.conf file, and then issue the lilo command to activate the lilo.conf setting with selecting the label. Example:
Reboot the system.
Partitioning the new disk devices for Red Hat Linux
After the setting the number of logical units, you need to create the partitions on the new disk devices.
Procedure
Enter
fdisk/dev/<device_name>, for example:fdisk/dev/sda
where
- dev/sda is the device file name.
Select
pto display the present partitions.Select
nto make a new partition. You can make up to four primary partitions (1-4) or one extended partition. The extended partition can be organized into 11 logical partitions, which can be assigned partition numbers from 5 to 15.TipOther useful commands includedto remove partitions andqto stop a change.Select
wto write the partition information to disk and complete the fdisk command.Repeat steps 1 through 4 for each new disk device.
Creating, mounting, and verifying the file systems on Red Hat Linux
Creating the file systems for Red Hat Linux
After you have partitioned the disk devices, you need to create the file system. Be sure the file system is appropriate for the primary and/or extended partition for each logical unit.
Procedure
Issue the mkfs command, for example:
# mkfs /dev/sda1
where
- /dev/sda1 is device file of primary partition number 1.
Creating the mount directories for Red Hat Linux
Issue the mkdir command, for example:
# mkdir /VSP-LU00
Mounting the new file systems for Red Hat Linux
Use the mount command to mount each new file system, for example:
# mount /dev/sda1 /VSP-LU00
The first parameter of the mount command is the device file name (/dev/sda1), and the second parameter is the mount directory (VSP-LU00).
Verifying the file systems for Red Hat Linux
After mounting the file systems, you need to verify the file systems, for example:
Procedure
Issue the df -h command.
# df -h Filesystem Size Used Avail Used% Mounted on /dev/sda1 1.8G 890M 866M 51% / /dev/sdb1 1.9G 1.0G 803M 57% /usr /dev/sdc1 2.2G 13k 2.1G 0% /VSP-LU00 #
Setting the auto-mount parameters for Red Hat Linux
Make a backup of the /etc/fstab file, for example:
# cp -ip /etc/fstab /etc/fstab.standard
Edit the /etc/fstab file to add the new devices, for example:
# vi /etc/fstab : /dev/sda1 /VSP-LU00 ext2 defaults 0 2
Troubleshooting for Red Hat Linux host attachment
The following table lists potential error conditions that might occur during storage system installation on a Red Hat Linux host and provides instructions for resolving the conditions. If you cannot resolve an error condition, contact customer support.
| Error Condition | Recommended Action |
| The logical devices are not recognized by the system. | Be sure that the READY indicator lights on the storage
system are ON. Be sure that the LUNs are properly configured. The LUNs for each target ID must start at 0 and continue sequentially without skipping any numbers. |
| The file system cannot be created. | Be sure that the device name is entered correctly with
mkfs. Be sure that the LU is properly connected and partitioned. |
| The file system is not mounted after rebooting. | Be sure that the system was restarted properly. Be sure that the auto-mount information in the /etc/fstab file is correct. |
