HPE EVA Storage

Changing LUN number EVA - linux OS

 
hlebbink
Occasional Visitor

Changing LUN number EVA - linux OS

Hello,

 

I recently created some Vdisks for a linux cluster. I also gave the LUNs a LUN number.

After a while someone found out that my LUN numbering was not according some guidelines and he asked me to change the LUN numbers according to the standard.

 

The LUN's are already mounted to the LINUX servers.

Is there a way i can change the LUN number (after having umounted the LUNs) without any problems ?

Will a change of LUN number cause the device files to change ? or do i have a chance that the LUN's have disappeared or LINUX will see "new" disks ?

 

With regards,

 

Henrico Lebbink

 

 

P.S. This thread has been moevd from General to Storage Area Networks (SAN) (Enterprise). - Hp Forum Moderator

1 REPLY 1
Matti_Kurkela
Honored Contributor

Re: Changing LUN number EVA - linux OS

If you used Linux LVM, it will not be a problem if the device names change.

Linux LVM is designed to identify PVs using the PV and VG UUIDs embedded in the PV headers: it is designed to expect that the device names may change.

 

When the LUN number changes, the disks will certainly appear as new /dev/sd* devices. If the LUN number change causes the disk WWID to change (I don't know EVAs well enough to know if this is true or not), then the dm-multipath layer will also see the devices as new.

 

You will need to either reboot the system or use "multipath -F" and "echo 1 > /sys/block/<sd*>/device/delete" to remove the old devices. If you don't reboot the system after making the change, these commands will tell the kernel that the "removal" of the old devices is intentional and they won't be coming back.

 

If you are using a recent version of Linux and your SAN configuration is perfect, the new disks should appear automatically as /dev/sd* devices, and the dm-multipath layer (if you use it) will automatically either associate the new devices with the existing multipath device (if the WWID stayed the same) or create new multipath devices (if the WWID changed).

 

For older kernel/HBA driver versions or for some SAN-side configuration, you may have to explicitly trigger the HBA rescan. Usually "echo '- - -' > /sys/class/scsi_host/<HBA>/scan" is enough, but sometimes you may need to reset the HBA before the new disks can be recognized: "echo 1 > /sys/class/fc_host/<HBA>/issue_lip".

 

 

(If you need to use issue_lip, check for HBA firmware / driver / Linux kernel updates, and verify that the host type settings in the SAN storage are set correctly for Linux use. Using the issue_lip should not be necessary any more.)

 

If you made custom udev rules to make the /dev/sd* names stay the same, or WWID-specific /etc/multipath.conf settings, or custom filter settings in /etc/lvm/lvm.conf to make the LVM only scan particular disk devices, you may need to review these customizations and possibly edit them to suit the new situation.

MK