Bug 765310 (GLUSTER-3578)

Summary: Currently possible to unmount the underlying storage of a brick without error
Product: [Community] GlusterFS Reporter: jaw171
Component: posixAssignee: Kaushal <kaushal>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 3.2.3CC: amarts, gluster-bugs, jdarcy, joe, vijay
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description jaw171 2011-09-16 20:07:34 UTC
In 3.2.3 I observed that I can unmount the underlying storage of a brick and GlusterFS happily chugs along and does not even log that its brick was unmounted.  Instead it keeps putting data into the same directory which normally means it would start putting data into the root filesystem of the server.  All the data that was in the mount is now gone and it risks filling up the root filesystem either with new data or from self-heal.

Although a brick's filesystem/disk/LV should not get unmounted for any sane reason I can think of, Gluster should prevent it from happening in the first place.  If a program relies on a resource, it should make sure that resource can't be taken away without throwing a fit about it and logging errors.

When a volume is started Gluster could see what bricks are in it and grab a filehandle on each which would prevent umount from unmounting it without a -f and tell the admin that the filesystem is in use (which it is).  When a volume is stopped it could simply release the handle.  The brick commands would also need that functionality.

Comment 1 Joe Julian 2011-09-16 23:42:05 UTC
This might also be useful for preventing the likes of bug 765266 where he was able to start the brick twice on one server. If you can't get a lock on that special file, then exit gracefully.