Bug 435194 - Simultaneous gfs_grow results in invalid used space
Simultaneous gfs_grow results in invalid used space
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gfs-utils (Show other bugs)
5.2
All Linux
low Severity low
: rc
: ---
Assigned To: Robert Peterson
GFS Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-27 16:22 EST by Corey Marthaler
Modified: 2010-01-11 22:33 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-04-23 10:28:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Corey Marthaler 2008-02-27 16:22:24 EST
A gfs_grow from one node:
/dev/mapper/growfs-gfs
                      1.7G   20K  1.7G   1% /mnt/gfs

[root@grant-02 ~]# lvextend -L 4G growfs/gfs
  Extending logical volume gfs to 4.00 GB
  Logical volume gfs successfully resized

[root@grant-02 ~]# gfs_grow /dev/growfs/gfs
FS: Mount Point: /mnt/gfs
FS: Device: /dev/mapper/growfs-gfs
FS: Options: rw,hostdata=jid=0:id=458754:first=1
FS: Size: 524288
DEV: Size: 1048576
Preparing to write new FS information...
Done.

/dev/mapper/growfs-gfs
                      3.7G   20K  3.7G   1% /mnt/gfs

* NOTE: only 20K used *


A gfs_grow from multiple nodes:
GRANT-01:
/dev/mapper/growfs-gfs
                      1.7G   20K  1.7G   1% /mnt/gfs
[root@grant-01 ~]# gfs_grow /dev/growfs/gfs
FS: Mount Point: /mnt/gfs
FS: Device: /dev/mapper/growfs-gfs
FS: Options: rw,hostdata=jid=2:id=327682:first=0
FS: Size: 524288
DEV: Size: 1048576
Preparing to write new FS information...
Done.
/dev/mapper/growfs-gfs
                      4.7G  2.2G  2.6G  46% /mnt/gfs

GRANT-02:
/dev/mapper/growfs-gfs
                      1.7G   20K  1.7G   1% /mnt/gfs
[root@grant-02 ~]# gfs_grow /dev/growfs/gfs
FS: Mount Point: /mnt/gfs
FS: Device: /dev/mapper/growfs-gfs
FS: Options: rw,hostdata=jid=0:id=327682:first=1
FS: Size: 804657
DEV: Size: 1048576
Preparing to write new FS information...
Done.
/dev/mapper/growfs-gfs
                      4.7G  2.2G  2.6G  46% /mnt/gfs

GRANT-03:
/dev/mapper/growfs-gfs
                      1.7G   20K  1.7G   1% /mnt/gfs
[root@grant-03 ~]# gfs_grow /dev/growfs/gfs
FS: Mount Point: /mnt/gfs
FS: Device: /dev/mapper/growfs-gfs
FS: Options: rw,hostdata=jid=1:id=327682:first=0
FS: Size: 524288
DEV: Size: 1048576
Preparing to write new FS information...
Done.
/dev/mapper/growfs-gfs
                      4.7G  2.2G  2.6G  46% /mnt/gfs


* NOTE: on all 3 machines, 2.2G used *

Version-Release number of selected component (if applicable):
gfs-utils-0.1.16-2.el5
Comment 1 Robert Peterson 2008-02-29 10:24:56 EST
Don't do that?   ;7)

Seriously, is this a test that passed in RHEL4.x but not in RHEL5.x?

Many times we've talked about ways to prevent mkfs from running
if the fs is mounted on another node.  There isn't a good way to do
this short of cluster-wide communications, but mkfs can't assume
cluster-wide communications.  They might not be using clvmd, for
example.

The gfs_grow tool has similar issues, but with gfs_grow, the fs needs
to be mounted, which means we can assume we have cluster-wide
communications at the gfs kernel level.  So in this case, we could
make gfs_grow tell the kernel somehow to take out an exclusive glock
on the rindex file, for example, to prevent other nodes from doing
gfs_grow at the same time.  It may already be doing something like this
but I haven't looked at it yet.  We might have issues of what happens
to that glock if the node goes down, panics, or is fenced while the
lock is held.  We could probably come up with a design, but given our
workload, it would be best put on the back burner and documented
around I think.
Comment 2 Corey Marthaler 2008-02-29 10:35:27 EST
I agree with the "don't do that" statement. I just wanted this documented in a
bz incase a customer ever came across this.
Comment 3 Robert Peterson 2008-02-29 14:25:31 EST
Since you used the word "documented" I'm adding Paul Kennedy and
Steven Levine to the cc list.
Comment 4 Robert Peterson 2008-04-23 10:28:15 EDT
There isn't a good way to prevent this in all cases, so I'm closing
this as WONTFIX.  Users should not perform gfs_grow on multiple nodes
simultaneously.

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