iSCSI luns getting different device names after reboots.

Latest response

Hi All,
I have 6 iSCSI luns presented to RHEL6.5 VM. There no multipathing configured. Unfortunately after reboot they always get random device name assigned.
Storage is Dell Equallogic group with 3 arrays. It could be because they always get luns presented thought different portals, but this is because how equllogic works for load-balancing.

Any ideas ho to map particular IQNs to particular devise names? i need those luns to be persistent, and mapped to same point, so application and data didin't mess up after reboot.

Tried to create /var/lib/iscsi/bindings file but didin't help. still luns shuffle.

[1:0:0:0] cd/dvd NECVMWar VMware IDE CDR10 1.00 /dev/sr0
[2:0:0:0] disk VMware Virtual disk 1.0 /dev/sda
[3:0:0:0] disk EQLOGIC 100E-00 7.1 /dev/sdb
[4:0:0:0] disk EQLOGIC 100E-00 7.1 /dev/sdf
[6:0:0:0] disk EQLOGIC 100E-00 7.1 /dev/sde
[7:0:0:0] disk EQLOGIC 100E-00 7.1 /dev/sdc
[8:0:0:0] disk EQLOGIC 100E-00 7.1 /dev/sdg
[9:0:0:0] disk EQLOGIC 100E-00 7.1 /dev/sdd

Thanks in advance!

Responses

for now, created udev rules and mounting disks by UUIDs to aliases, but not sure if this is best approach.

Sound like you are using the correct approach.

UDEV rules are good if you want to maintain consistent /dev naming. Persistent device naming is outlined here (I have had varied results with scsi_id, so use different tools):
https://access.redhat.com/solutions/7318

Mounting by UUID / Label is good practice too, so looks like there isn't much else to add!

Thanks a lot for confirming!

Its expected behaviour i.e .scsi device name after reboot may not be same. As said above, you can use udev rules to create persistance device name. You can also use by-id and UUID of device as well. Other option is you can configure dm-multipath and use multipath device name which are persistent.

Thanks! there no multipath, so I decided to go with udev mapping. But looks like i could use multipath as well even with single path, as they also tight to UUIDs.
Thanks once again!

Yes, its possible to use multipath even with single path as well.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.