Bug 765310 (GLUSTER-3578) - Currently possible to unmount the underlying storage of a brick without error
Summary: Currently possible to unmount the underlying storage of a brick without error
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: GLUSTER-3578
Product: GlusterFS
Classification: Community
Component: posix
Version: 3.2.3
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: ---
Assignee: Kaushal
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-09-16 20:07 UTC by jaw171
Modified: 2015-12-01 16:45 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.