[Ovirt-devel] Re: [PATCH node] Small patch to find disks if hal doesn't return one.

Perry Myers pmyers at redhat.com
Wed Jan 7 13:25:27 UTC 2009


Darryl L. Pierce wrote:
> On Tue, Jan 06, 2009 at 03:32:29PM -0500, Darryl L. Pierce wrote:
>> If hal does not return any devices with the storage capability, and
>> that's of type disk and block, then the script will grab all devices
>> that meets the pattern /dev/[shv]d? and show them.
>>
>> Signed-off-by: Darryl L. Pierce <dpierce at redhat.com>
>> ---
>>  scripts/ovirt-config-storage |    3 +++
>>  1 files changed, 3 insertions(+), 0 deletions(-)
>>
>> diff --git a/scripts/ovirt-config-storage b/scripts/ovirt-config-storage
>> index 1c31a58..78e56dc 100755
>> --- a/scripts/ovirt-config-storage
>> +++ b/scripts/ovirt-config-storage
>> @@ -75,6 +75,9 @@ get_dev_name()
>>              || devices="$devices $block_dev"
>>      done
>>  
>> +    # if we didn't find any devices using HAL, so check for virtual devices
>> +    if [ -z $devices ]; then devices=$(ls -l /dev/[shv]d?);  fi
>> +
>>      # If there's only one device, use it.
>>      case $devices in
>>          '') warn "ERROR: found no usable block device"; return 1;;
>> -- 
>> 1.6.0.6
> 
> We discussed this in IRC and I think the consensus was that it's fine.
> Can someone give me an ACK?

Conceptual Ack, though I have not applied/tested this.  Darryl if you've 
tested this sufficiently and it works for you please commit.

Perry




More information about the ovirt-devel mailing list