On Fri, Dec 3, 2010 at 8:36 PM, Mike Christie <[email protected]> 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!
--
You received this message because you are subscribed to the Google Groups
"open-iscsi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/open-iscsi?hl=en.