3

I've got some iSCSI/FC storage, currently using only iSCSI. I have in general no problems with mounting LUNs - under Linux and under Windows.

Unfortunately - when I add LUN for my Linux iSCSI initiator - I receive info in messages:

Warning! Received an indication that the LUN assignments on this target have changed. The Linux SCSI layer does not automatically remap LUN assignments

and new LUN does not appear in

fdisk -l

If I restart iscsi daemon - I get new LUN but loose connection with mounted old LUNs, moreover - devices letters (dev/sd..) are changing.

On Windows - new LUN is visible at once and can be mounted with no affecting previous ones.

Is there special option in

iscsiadm

(I tried such as "rescan" but with no success)?

2 Answers 2

6

If you're adding a new LUN, and your iscsi initiator is already connected, you just have to rescan your iscsi bus for the new LUN:

for i in /sys/class/scsi_host/host*/scan ; do echo - - - > $i ; done

If you're changing the size / geometry of a LUN, you'll also need to rescan the device:

for i in /sys/class/scsi_device/*/device/rescan ; do echo 1 > $i ; done

That works for me. If it does not for you, you can try to rescan the iscsi session:

iscsiadm -m node -R

You should really use UUIDs or WWIDs (when working with multipath) so that you don't have to rely on device names.

0

Are you trying to make a connection to a new LUN without restarting open-iscsi? If so, you can do

iscsiadm -m discovery -t st -p <portal_IP>

which will find the new LUNs. Then to log into the LUN

iscsiadm -m node -T <LUN_Name> -l

Is that what you want to do?

edit: Also, if you are having a problem with drive letters changing on your targets, you should look into using label so you could do something like

mount -t xfs -l backups /mnt/backups

and it won't matter if the device path changes.

8
  • 1
    I'd recommend using filesystem UUIDs rather than labels, to minimise risk of collisions. The 'blkid' command will report the UUIDs for all block devices visible by the system, and the various fs tools like tune2fs will also report it. Commented Apr 23, 2011 at 5:50
  • There should be something wrong as those normal commands don't bring success... I will try with different initiator and target systems but with the same OS version.
    – Arek B.
    Commented Apr 24, 2011 at 22:12
  • Arek: Can you provide the command you're using + the output that follows it?
    – Kendall
    Commented Apr 25, 2011 at 14:36
  • e.g.: # iscsiadm -m discovery -t sendtargets -p 10.0.0.32:3260 | RESULT: 10.0.0.32:3260,2000 iqn.1992-08.com.netapp:sn.XXXXXXXX | but the info about iSCSI layer appears with no command on initiator - just after adding LUN on the target
    – Arek B.
    Commented Apr 26, 2011 at 8:35
  • I have installed "lsscsi" package and everything started working... Strange - because there were no dependencies installed, just one package...
    – Arek B.
    Commented Apr 26, 2011 at 14:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .