Re: [PATCH 0/2] scsi_transport_fc: LUN masking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Hannes,

On 11/11/2015 11:34 AM, Hannes Reinecke wrote:
having been subjected to the pain of trying to bootstrap a really
large machine with systemd I decided to implement LUN masking in

This is very interesting.

I also thought about initiator-based LUN masking a while ago.
While scsi_transport_fc would be sufficient to allow zfcp to get rid of its own implementation, I wonder why we wouldn't do it in the midlayer's scsi_scan.c. This would provide initiator-based LUN masking for any and all transports and LLDDs?

(I also thought about initiator-based zoning, and that would indeed be something for scsi_transport_fc because it is inherently transport specific.)

scsi_transport_fc.
The principle is simple: disallow the automated LUN scanning when
discovering a rport, and create udev rules which selectively
enable individual LUNs by echoing the relevant values in the 'scan'
attribute of the SCSI host.

I imagined exactly the same existing user space interface.

Now we "only" need some user-friendly user space tooling, which provides transport specific user arguments automatically translated into the midlayer naming scheme, such as converting FC SAN addressing (HBA device bus-ID,WWPN,FCPLUN) into scsi_device names (Scsi_Host,0,scsi_id,scsi_lun),
and some persistency mechanism (such as managing udev rules).

With that I'm able to boot an arbitrary large machine without
running into any udev or systemd imposed timeout.
To _disable_ LUN masking and restoring the original behaviour
I've noticed that the 'scan' sysfs attribute is actually synchronous,
ie the calling process will be blocked until the entire LUN scan
is completed.
So I've added another module parameter 'async_user_scan' to
move the scanning onto the existing scan workqueue, and unblock
the calling process.

Just curious: Which means would a user of async_user_scan have to sync against the completion? Or is this only meant for user space--I currently cannot imagine--which does not care about the appearance of what was (newly) discovered?


As usual, comments and reviews are welcome.

Hannes Reinecke (2):
   scsi_transport_fc: implement 'disable_target_scan' module parameter
   scsi_transport_fc: Implement 'async_user_scan' module parameter

  drivers/scsi/scsi_transport_fc.c | 47 +++++++++++++++++++++++++++++++++++++---
  1 file changed, 44 insertions(+), 3 deletions(-)


--
Mit freundlichen Grüßen / Kind regards
Steffen Maier

Linux on z Systems Development

IBM Deutschland Research & Development GmbH
Vorsitzende des Aufsichtsrats: Martina Koederitz
Geschaeftsfuehrung: Dirk Wittkopp
Sitz der Gesellschaft: Boeblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux