On Mon, Jul 29, 2013 at 3:55 PM, Michele Tartara <[email protected]> wrote:
> On Sat, Jul 27, 2013 at 7:28 PM, Weiwei Jia <[email protected]> wrote:
>>
>> Signed-off-by: Weiwei Jia <[email protected]>
>> ---
>>  lib/cmdlib/instance_storage.py |   16 ++++++++++++++++
>>  1 file changed, 16 insertions(+)
>>
>> diff --git a/lib/cmdlib/instance_storage.py
>> b/lib/cmdlib/instance_storage.py
>> index 793cfa6..33b344d 100644
>> --- a/lib/cmdlib/instance_storage.py
>> +++ b/lib/cmdlib/instance_storage.py
>> @@ -247,6 +247,22 @@ def CreateDisks(lu, instance, to_skip=None,
>> target_node_uuid=None, disks=None):
>>    CheckDiskTemplateEnabled(lu.cfg.GetClusterInfo(),
>> instance.disk_template)
>>
>>    if instance.disk_template in constants.DTS_FILEBASED:
>> +    if instance.disk_template == constants.DT_GLUSTER_FILE:
>> +      gluster_storage_dir =
>> lu.cfg.GetClusterInfo().gluster_file_storage_dir
>> +      if not os.path.ismount(gluster_storage_dir):
>
>
> Actually, this isn't really going to work.
>
> This only checks that the directory is a mount point. But what you need to
> know, is whether it is the mount point for the exact Gluster volume you are
> interested into.
> So, while the check you used is required, it is not enough.
>

Would you please give some suggestions? How to do it enough?



-- 
Thanks
Weiwei  Jia (Harry Wei)

Reply via email to