Subscribe
Accepted Solution

iSCSI consistency

Hi all,

DataOntap 7.3.3

Excuse me if it's not really Netapp issue.

I create 2 iSCSI LUN, put it into the same iSCSI group, map the LUN, and set the initiator name.

Let's say:

LUN0 --> got recognized by the Linux system as /dev/sdb

LUN1 --> got recognized by the Linux system as /dev/sdc

Do I have to do something on the Linux side to make the recognition consistent across Linux reboot? As in LUN0 will always be /dev/sdb and LUN1 will be /dev/sdc

Thank you.

Fajar.

Re: iSCSI consistency

No. sdX will never be guaranteed to be consistent across reboot. To ensure name does not change you could use /dev/disk/by-* namespaces if your Linux is recent enough to support it, use mount by label/UUID etc.

Re: iSCSI consistency

That's what I'm afraid of.

In /dev/disk/by-path/ I see it shows the LUN mapping. Shouldn't it will stay the same across reboot. So, when I create another LUN and map it as "31", it will definitely recognized as sdc?

lrwxrwxrwx 1 root root  9 May  1 11:09 ip-10.1.x.x:3260-iscsi-iqn.1986-03.com.ibm:sn.1111-lun-30 -> ../../sdb

lrwxrwxrwx 1 root root 10 May  1 11:09 ip-10.1.x.x:3260-iscsi-iqn.1986-03.com.ibm:sn.1111-lun-30-part1 -> ../../sdb1

lrwxrwxrwx 1 root root 10 May  1 11:09 ip-10.1.x.x:3260-iscsi-iqn.1986-03.com.ibm:sn.1111-lun-30-part9 -> ../../sdb9

Re: iSCSI consistency

sdX will depend on order in which devices are seen by Linux host. You can make no assumptions about sdX names. They are just internal kernel handles, the only requirement is they are unique at any given time.

The names under /dev/disk/by-* will remain the same, but may point to different sdX after reboot.