iscsi: which local device (/dev/sda, /dev/sdb) is used WITHOUT dmesg?
Running CentOS 5.2 (64bit)
iscsiadm version 2.0-870
We have a backup script that uses iSCSI to attach volumes from an Equallogic. It's a script that's often busy for hours.
On the same server we have a restore-script to manually restore specific volumes.
How do you find out for _sure_ which local device (/dev/sda, /dev/sdb, ...) has just been attached to a target after an
# iscsiadm -l
I know you can check dmesg, but in the unfortunate event that both scripts have just logged in to (separate) volumes, the timing to automatically check dmesg might just return the wrong device.
Preferably, we'd assign a device during iscsiadm logon, but it would also be workable to check which device is used after successfully logging in. Unfortunately,
# iscsiadm -m node -r sessionid
doesn't show anything about which device is used.
Of course, we could hack an ugly mutex-alike structure using some kind of shared dir/file, but well....
You ever figure this out?
Hi, you ever figure this out? I am trying to find the device a specific target used and/or be able to specify the device it will use. Any help you can give would be appreciated.
ls -l /dev/disk/*
ls -l /dev/disk/by-path will be more helpfull to you.
Good point! Not ideal.. but much better then dmesg. It does amaze me that you cant pre-specify the device name somehow.
|All times are GMT -5. The time now is 02:56 AM.|