Bug 435194

Summary: Simultaneous gfs_grow results in invalid used space
Product: Red Hat Enterprise Linux 5 Reporter: Corey Marthaler <cmarthal>
Component: gfs-utilsAssignee: Robert Peterson <rpeterso>
Status: CLOSED WONTFIX QA Contact: GFS Bugs <gfs-bugs>
Severity: low Docs Contact:
Priority: low    
Version: 5.2CC: edamato, pkennedy, slevine
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-04-23 14:28:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Corey Marthaler 2008-02-27 21:22:24 UTC
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 15:24:56 UTC
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 15:35:27 UTC
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 19:25:31 UTC
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 14:28:15 UTC
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.