Re: [libvirt] [RFC 5/5]: Rewrite findLuns function

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

 



Daniel P. Berrange wrote:
>> # cat /sys/bus/scsi/devices/3:0:0:0/model
>>
>> and
>>
>> # cat /sys/bus/scsi/devices/3:0:0:0/type
>>
>> from both your netapp target and your sun target?  Here, at least, for our
>> "control" LUN, model returns "Controller" while for the real LUNs model returns
>> "VIRTUAL-DISK", so I'm hoping I can distinguish somehow based on what is in
>> model, and if not that, based on type.
> 
> Can't you distinguish based on the fact that there'll be no /dev/sdNN
> node for it ?

Unfortunately, no.  The /sys/bus/scsi/devices/3:0:0:0/block:sda (or block/sda)
link will only exist once udev has finished plugging the device in.  So we have
to loop waiting for that to appear.  In the case of a control LUN, that will
never appear, so we will wait 5 seconds (the current default) to see it appear,
and then when it doesn't, we won't know how to distinguish the error case from
the control LUN case.  I guess we could just not throw an error if we never see
a block device, but we would still delay the libvirtd daemon (and the client)
unnecessarily.

Chris Lalancette

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]