Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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)?

share|improve this question

2 Answers 2

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:

find /sys/class/scsi_host/host*/scan | while read line; do echo - - - > $line; 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.

share|improve this answer

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.

share|improve this answer
    
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. –  Daniel Lawson Apr 23 '11 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. Apr 24 '11 at 22:12
    
Arek: Can you provide the command you're using + the output that follows it? –  Kendall Apr 25 '11 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. Apr 26 '11 at 8:35
    
I have installed "lsscsi" package and everything started working... Strange - because there were no dependencies installed, just one package... –  Arek B. Apr 26 '11 at 14:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.