ONTAP Discussions

iSCSI consistency

fajarpri2
3,022 Views

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.

1 ACCEPTED SOLUTION

aborzenkov
3,022 Views

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.

View solution in original post

3 REPLIES 3

aborzenkov
3,023 Views

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.

fajarpri2
3,022 Views

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

aborzenkov
3,022 Views

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.

Public