[pve-devel] LXC volumes on ZFS over iSCSI

Dmitry Petuhov mityapetuhov at gmail.com
Tue Oct 11 05:59:11 CEST 2016


10.10.2016 23:30, Alexandre DERUMIER wrote:
>> We could rework iscsi-manipulation code into another behavior. For exmaple, Dell PS-series SAN exports each volume in separate target, lun 0. So we can login into this target in activate_volume() and logout in deactivate_volume(). See my plugin for these storages: https://github.com/mityarzn/pve-storage-custom-dellps 
>> Also, there's note about bug in debian's multipath-tools in plugin's README. 
>>
>> That way we can have LUNs only on hosts, where they're needed. Except some cases where PVE does not call deactivate_volume() for some reason (I think these are bugs?). 
>>
> I think this is bad hack. A target for each Lun will mean 100's or even 
> 1000's of targets. I am quit convinced that my idea can be implemented 
> and I think that is, IMHO a much more clean solution. 
>
> My solution: 
> Create: 
> New volume 
> New lun 
>
> Start/activate: 
> New view 
> Foreach node: 
> iscsiadm --session --rescan 
>
> stop/deactivate: 
> Remove view 
> Foreach node: 
> echo 1 > /sys/bus/scsi/devices/${H:B:T:L}/delete (Where H = host:B 
> = bus:T = target:L = lun) 
>
> Remove: 
> Delete Lun 
> Delete volume 
Yes, that's what I'm doing with Netapp SAN (except stop phase and view manupulations). That works, but "Foreach node:" step is ugly. Maybe you could use per-initiator views. So you map volume only to node which needs it and not have to cleanup other nodes on volume deactivation. But you will have to remove views for crashed nodes somehow.

But. Why 1000's targets are worse than 1000's LUNs in single target? Are there some limits on Linux kernel side for both parameters?





More information about the pve-devel mailing list