Tuesday, July 29, 2014

Dynamically Adding SAN Disks for use with Linux Multipath Systems

Adding SAN storage to a Linux system and setting up multiple I/O paths to it without needing to reboot the system.
This assumes you have created an array on the SAN and allocated space to a logical volume on it; you have mapped a LUN pointing that logical volume to that host, and that the host is correctly zoned to see the SAN in the fibre channel fabric.

Tested on: RHEL-5, SuSE 10/11, CentOS-5, OEL-5

1. Install the packages sg3_utils & lsscsi

2. Allocate the storage on the SAN and update its access control settings to allow the Linux system access to the new storage.

3. List all LUNs visible to the server


4. At this point, the newly added device is not known to the higher layers of the Linux kernel's SCSI subsystem and is not yet usable. The output from fdisk -l will be included in the output from lsscsi
5. Trigger the HBA driver to rescan the SCSI bus to initiate the LUN discovery process

    rescan-scsi-bus.sh -l -w -c  

6. If the above steps do not present the LUN to the host, a server restart may be required.

7. If the devices have multiple paths, run the Multipath tool to recognize the devices for Device Mapper Multipath I/O (DM-MPIO) configuration


7. Verify that the device table entry for the new disk device has been built:


8. Examine /dev/disk/by-id to identify the persistent device names for the new storage area(s) and use the persistent device names for further operations (including filesystem creation and addition to /etc/fstab).

9. Create a partition and filesystem on the new disk.

No comments:

Post a Comment