blacklisting some paths in multipath environment

740 views
Skip to first unread message

Arkadiusz Miskiewicz

unread,
Nov 27, 2010, 7:23:47 PM11/27/10
to open-...@googlegroups.com

Hello,

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/

Mike Christie

unread,
Nov 29, 2010, 6:35:45 PM11/29/10
to open-...@googlegroups.com, Arkadiusz Miskiewicz
On 11/27/2010 06:23 PM, Arkadiusz Miskiewicz wrote:
>
> Hello,
>
> 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?
>

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

Arkadiusz Miskiewicz

unread,
Dec 3, 2010, 7:20:02 AM12/3/10
to open-...@googlegroups.com

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.

Mike Christie

unread,
Dec 3, 2010, 2:36:15 PM12/3/10
to open-...@googlegroups.com, Arkadiusz Miskiewicz
On 12/03/2010 06:20 AM, Arkadiusz Miskiewicz wrote:
>
> 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

Arkadiusz Miskiewicz

unread,
Dec 4, 2010, 5:10:03 AM12/4/10
to Mike Christie, open-...@googlegroups.com
On Fri, Dec 3, 2010 at 8:36 PM, Mike Christie <mich...@cs.wisc.edu> wrote:
> On 12/03/2010 06:20 AM, Arkadiusz Miskiewicz wrote:

>> 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!

Reply all
Reply to author
Forward
0 new messages