I'm trying to use open-iscsi with DS3300 array. DS has two controllers, each 2
ethernet ports.
Unfortunately I use some SATA disk that aren't capable to be connected into
two controllers (only one path on the SATA connector). This causes disks to be
accessible only through one controller. My Linux system unfortunately still
sees all 4 paths (two controllers x 2 eth ports each; target has 4 IPs then).
How I can blacklist some paths and still use automatic node.startup?
Thanks,
--
Arkadiusz Miśkiewicz PLD/Linux Team
arekm / maven.pl http://ftp.pld-linux.org/
You can set specific paths to not get logged into automatically by doing
iscsiadm -m node -T target -p ip -o update -n node.startup -v manual
Thanks!
Now more complicated. Can I blacklist specific devices? My array is limited only
to 4 initiator-storage poll mappings (which are used to allow access to logical
disk X only from initiator A). Unfortunately I have 5 hosts.
So I have 5 logical partitions on array (X, Y, Z, Q, W) and 5 hosts
(hA, hB, hC, hD, hE).
hA has access to X only,
hB to Y only,
hC to Z only
but hD and hE have access to both, Q and W. (Q meant for host hD, W
meant for host hE).
Totall 4 host -- storages mapping in use.
I need some way to prevent host hD from accessing storage W and prevent host hE
from accessing storage Q. Os level would be enough. This is only to
disallow silly
mistakes made by admin.
Is there a way on open-iscsi level to make host hD not see (or ignore)
storage device W? Some
other, kernel level, way would be enough, too.
Simplest what comes to my mind is simply "rm /dev/sdX" where sdX are
devices to the other host storage.
The iscsi/scsi layer does not have any type of LUN masking. There is
only the manual interface:
echo 1 > /sys/block/sdXYZ/device/delete
>> I need some way to prevent host hD from accessing storage W and prevent
>> host hE
>> from accessing storage Q. Os level would be enough. This is only to
>> disallow silly
>> mistakes made by admin.
>> Simplest what comes to my mind is simply "rm /dev/sdX" where sdX are
>> devices to the other host storage.
>>
>
> The iscsi/scsi layer does not have any type of LUN masking. There is only
> the manual interface:
>
> echo 1 > /sys/block/sdXYZ/device/delete
Works quite nicely.
First I blacklist devices in multipath based on wwn
blacklist {
wwid 3600a0b80005bd408000002dd4ce20897
wwid 3600a0b80005bd6280000035b4ce2107e
}
Then actual deletion rules executed by udev:
# more /etc/udev/rules.d/iscsi-drop-dev.rules
ACTION=="add", ENV{DEVTYPE}=="disk",
ENV{ID_SERIAL_SHORT}=="600a0b80005bd6280000035b4ce2107e",
RUN+="/bin/sh -c 'echo 1 > /sys$$DEVPATH/device/delete'"
ACTION=="add", ENV{DEVTYPE}=="disk",
ENV{ID_SERIAL_SHORT}=="600a0b80005bd408000002dd4ce20897",
RUN+="/bin/sh -c 'echo 1 > /sys$$DEVPATH/device/delete'"
Works!