[Gluster-users] error when using mount point as a brick directory.

Paul Guo bigpaulguo at foxmail.com
Mon Sep 15 08:51:51 UTC 2014


This is a good example. I do not know whether there are other cases, but for this case, I'd like another design: Add a parameter to guide glusterfs to double-check whether the bricks are mount points when creating or starting a volume.


------------------ Original ------------------
From:  "Claudio Kuenzler";<ck at claudiokuenzler.com>;
Date:  Sep 12, 2014
To:  "Juan José Pavlik Salles"<jjpavlik at gmail.com>; 
Cc:  "gluster-users"<gluster-users at gluster.org>; "Paul Guo"<bigpaulguo at foxmail.com>; 
Subject:  Re: [Gluster-users] error when using mount point as a brick directory.



Thanks for the hint about force", I didn't try that.
 On the other side I am thankful for the error/warning which prevented me to create the volume because I just thought of a scenario which could result in problems.
 Imagine you have a LV you want to use for the gluster volume. Now you mount this LV to /mnt/gluster1. You do this on the other host(s), too and you create the gluster volume with /mnt/gluster1 as brick. 
 By mistake you forget to add the mount entry to fstab so the next time you reboot server1, /mnt/gluster1 will be there (because it's the mountpoint) but the data is gone (because the LV is not mounted).
 I don't know how gluster would handle that but it's actually easy to try it out :) 
 So using a subfolder within the mountpoint makes sense, because that subfolder will not exist when the mount of the LV didn't happen.
 On Sep 12, 2014 4:16 PM, "Juan José Pavlik Salles" <jjpavlik at gmail.com> wrote:

Maybe it's not a warning, but you can use "force" to avoid that behaviour so it's not that you can't create the volume. Anyway, it's a good practice to create a subdirectory as far as I've read. 
2014-09-12 11:02 GMT-03:00 Claudio Kuenzler <ck at claudiokuenzler.com>:

Hi




On Fri, Sep 12, 2014 at 3:00 PM, Juan José Pavlik Salles <jjpavlik at gmail.com> wrote:

Hi Paul, that's is more a warning than an error. This advice helps you avoid situations like this:

Not so sure if it's "only a warning". The volume cannot be created as long as the fs mountpoint is directly used as brick in "gluster volume create". 


I wrote a post about that last month: http://www.claudiokuenzler.com/blog/499/glusterfs-bricks-should-be-subfolder-of-mountpoint


But as long as it is documented I don't think it's a real issue to follow that rule.



 -- 

Pavlik Salles Juan José
Blog - http://viviendolared.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://supercolony.gluster.org/pipermail/gluster-users/attachments/20140915/4a2d58be/attachment.html>


More information about the Gluster-users mailing list