Forget the /dev/sd* -- they are evil. Look at the /dev/disk/by-id/ instead. Each iscsi target should have a unique permanent id.If you want a volume to be automatically mounted when y... [by jlehtone]
on 06/06/2012 – Made popular on 06/06/2012
I need to write a script to automatically login to a target and mount the disk corresponding it.
I use iscsiadm to login to the target.But i don't know how to find out the disk corresponding to a certain target. By now the only way i tried is to use /dev/disk/by-patch/ip-xxx-iscsi-partx. It's a little complex.