Bug 481041 - gfs_grow changes not seen when statfs_fast is enabled
Summary: gfs_grow changes not seen when statfs_fast is enabled
Keywords:
Status: CLOSED DUPLICATE of bug 498664
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: gfs-kmod
Version: 5.3
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Robert Peterson
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks: 484760
TreeView+ depends on / blocked
 
Reported: 2009-01-21 21:29 UTC by Nate Straz
Modified: 2010-01-12 03:30 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 484760 (view as bug list)
Environment:
Last Closed: 2009-05-01 18:57:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Nate Straz 2009-01-21 21:29:01 UTC
Description of problem:

When statfs_fast is set on a GFS mount point, the system does not notice when the file system size has changed with gfs_grow.

Version-Release number of selected component (if applicable):
kernel-2.6.18-128.el5
kmod-gfs-0.1.31-3.el5
gfs-utils-0.1.18-1.el5


How reproducible:
Every time

Steps to Reproduce:
1. mkfs, mount a GFS file system
2. gfs_tool settune /mnt/foo statfs_fast 1
3. df /mnt/foo
4. increase the size of the file system (lvresize)
5. gfs_grow /mnt/foo
6. df /mnt/foo, compare with step 3

Actual results:
[root@dash-02 ~]# lvcreate -n one -L 5G growfs
  Logical volume "one" created
[root@dash-02 ~]# mkfs -t gfs -p lock_dlm -t dash:one -j 3 /dev/growfs/one
This will destroy any data on /dev/growfs/one.
  It appears to contain a gfs filesystem.

Are you sure you want to proceed? [y/n] y

Device:                    /dev/growfs/one
Blocksize:                 4096
Filesystem Size:           1212292
Journals:                  3
Resource Groups:           20
Locking Protocol:          lock_dlm
Lock Table:                dash:one

Syncing...
All Done
[root@dash-02 ~]# mount /dev/growfs/one /mnt/one
Trying to join cluster "lock_dlm", "dash:one"
Joined cluster. Now mounting FS...
GFS: fsid=dash:one.1: jid=1: Trying to acquire journal lock...
GFS: fsid=dash:one.1: jid=1: Looking at journal...
GFS: fsid=dash:one.1: jid=1: Done
[root@dash-02 ~]# df -h /mnt/one
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/growfs-one
                      4.7G   20K  4.7G   1% /mnt/one
[root@dash-02 ~]# gfs_tool settune /mnt/one statfs_fast 1
GFS: fsid=dash:one.1: fast statfs start time = 1232572768

## filled the file system with dd
[root@dash-01 ~]# df /mnt/one
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/growfs-one
                       4849168   4842988      6180 100% /mnt/one
[root@dash-01 ~]# lvresize -L +5G /dev/growfs/one
  Extending logical volume one to 10.00 GB
  Logical volume one successfully resized
[root@dash-01 ~]# gfs_grow /mnt/one
FS: Mount Point: /mnt/one
FS: Device: /dev/mapper/growfs-one
FS: Options: rw,hostdata=jid=0:id=1507329:first=1
FS: Size: 1310720
DEV: Size: 2621440
Preparing to write new FS information...
Done.
[root@dash-01 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/growfs-one
                      4.7G  4.7G  6.1M 100% /mnt/one
[root@dash-01 ~]# lvs
  LV       VG         Attr   LSize  Origin Snap%  Move Log Copy%  Convert
  LogVol00 VolGroup00 -wi-ao 67.56G
  LogVol01 VolGroup00 -wi-ao  6.81G
  one      growfs     -wi-ao 10.00G

## Add more to the file system

[root@dash-03 ~]# dd if=/dev/zero of=/mnt/one/`uname -n`-2 bs=1M
dd: writing `/mnt/one/dash-03-2': No space left on device
1727+0 records in
1726+0 records out
1809842176 bytes (1.8 GB) copied, 14.1452 seconds, 128 MB/s
[root@dash-03 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/growfs-one
                      4.7G  4.7G     0 100% /mnt/one
[root@dash-03 ~]# ls -lh /mnt/one
total 9.7G
-rw-r--r-- 1 root root 1.6G Jan 21 15:20 dash-01
-rw-r--r-- 1 root root 1.6G Jan 21 15:26 dash-01-2
-rw-r--r-- 1 root root 1.7G Jan 21 15:20 dash-02
-rw-r--r-- 1 root root 1.8G Jan 21 15:26 dash-02-2
-rw-r--r-- 1 root root 1.4G Jan 21 15:20 dash-03
-rw-r--r-- 1 root root 1.7G Jan 21 15:26 dash-03-2
[root@dash-03 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/growfs-one
                      4.7G  4.7G     0 100% /mnt/one

[root@dash-01 ~]# du -sh /mnt/one
9.7G    /mnt/one

Expected results:

The df output should show the new file system size on all nodes immediately
after gfs_grow completes.

Additional info:

Comment 1 Robert Peterson 2009-05-01 18:57:40 UTC
I opened bug #498664 in order to crosswrite the fix from RHEL4 that
does statfs_fast in a completely different way (bug #488318).  That
will fix this gfs_grow issue.  So I'm closing this bug as a duplicate,
as I did for the RHEL4 equivalent bug #484760.

*** This bug has been marked as a duplicate of bug 498664 ***


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