Bug 711451

Summary: GFS2: gfs2_grow fails on a full file system with stuffed rindex file
Product: Red Hat Enterprise Linux 5 Reporter: Ben Marzinski <bmarzins>
Component: gfs2-utilsAssignee: Ben Marzinski <bmarzins>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: low Docs Contact:
Priority: high    
Version: 5.6CC: adas, casmith, ccaulfie, ccoffey, edamato, iannis, mjuricek, rpeterso, sbradley, swhiteho, tao
Target Milestone: rc   
Target Release: 5.5   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: gfs2-utils-0_1_62-33_el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 490649 Environment:
Last Closed: 2012-02-21 06:39:08 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:
Bug Depends On: 490649, 626585, 661904    
Bug Blocks:    
Attachments:
Description Flags
Patch to make gfs2_grow write one resource group first, and then the rest none

Comment 1 Ben Marzinski 2011-06-07 14:37:58 UTC
Created attachment 503499 [details]
Patch to make gfs2_grow write one resource group first, and then the rest

This is the patch that was originally posted with Bug #490649

Comment 3 Nate Straz 2011-11-08 22:34:45 UTC
Can you please post some unit test results to show that development has tried out this backported fix in the 5.8 package?
 
FMI see http://wiki.test.redhat.com/ClusterStorage/WhyNeedDevTestResults

Comment 4 Ben Marzinski 2011-11-09 22:14:02 UTC
**FAILING CASE**

[root@ask-06 ~]# vgs
  VG         #PV #LV #SN Attr   VSize   VFree
  VolGroup00   1   2   0 wz--n-  74.38G      0
  test         1   0   0 wz--n- 268.56G 268.56G
[root@ask-06 ~]# lvcreate -L 2G -n lv1 test
  Logical volume "lv1" created
[root@ask-06 ~]# rpm -q gfs2-utils
gfs2-utils-0.1.62-31.el5
[root@ask-06 ~]# mkfs.gfs2 -p lock_nolock -j1 -b1024 /dev/test/lv1
This will destroy any data on /dev/test/lv1.
  It appears to contain a gfs2 filesystem.

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

Device:                    /dev/test/lv1
Blocksize:                 1024
Device Size                2.00 GB (2097152 blocks)
Filesystem Size:           2.00 GB (2097151 blocks)
Journals:                  1
Resource Groups:           8
Locking Protocol:          "lock_nolock"
Lock Table:                ""
UUID:                      7CCBC711-9D1E-14BA-4DC6-462F506C28A9

[root@ask-06 ~]# mount -t gfs2 /dev/test/lv1 /mnt/test
[root@ask-06 ~]# dd if=/dev/zero of=/mnt/test/bigfile bs=100M
dd: writing `/mnt/test/bigfile': No space left on device
20+0 records in
19+0 records out
1994207232 bytes (2.0 GB) copied, 41.4616 seconds, 48.1 MB/s
[root@ask-06 ~]# cat filler.sh
#!/bin/bash
COUNT=1

while touch file$COUNT
do
        COUNT=$(($COUNT + 1))
done

[root@ask-06 ~]# cd /mnt/test/
[root@ask-06 test]# mkdir d1
[root@ask-06 test]# mkdir d2
[root@ask-06 test]# mkdir d3
[root@ask-06 test]# mkdir d4
[root@ask-06 test]# mkdir d5
[root@ask-06 test]# mkdir d6
[root@ask-06 test]# mkdir d7
[root@ask-06 test]# cd d1
[root@ask-06 d1]# ~/filler.sh
touch: cannot touch `file15': No space left on device
[root@ask-06 d1]# cd ../d2
[root@ask-06 d2]# ~/filler.sh
touch: cannot touch `file15': No space left on device
[root@ask-06 d2]# cd ../d3
[root@ask-06 d3]# ~/filler.sh
touch: cannot touch `file15': No space left on device
[root@ask-06 d3]# cd ../d4
[root@ask-06 d4]# ~/filler.sh
touch: cannot touch `file15': No space left on device
[root@ask-06 d4]# cd ../d5
[root@ask-06 d5]# ~/filler.sh
touch: cannot touch `file15': No space left on device
[root@ask-06 d6]# ~/filler.sh
touch: cannot touch `file15': No space left on device
[root@ask-06 d6]# cd ../d7
[root@ask-06 d7]# ~/filler.sh
touch: cannot touch `file4': No space left on device
[root@ask-06 d7]# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                      69578152   1675528  64311252   3% /
/dev/sda1               101086     29102     66765  31% /boot
tmpfs                  2057852         0   2057852   0% /dev/shm
/dev/mapper/test-lv1   2096552   2096552         0 100% /mnt/test
[root@ask-06 d7]# lvextend -l+100%FREE /dev/test/lv1
  Extending logical volume lv1 to 268.56 GB
  Logical volume lv1 successfully resized
[root@ask-06 d7]# gfs2_grow /dev/test/lv1
FS: Mount Point: /mnt/test
FS: Device:      /dev/mapper/test-lv1
FS: Size:        2097151 (0x1fffff)
FS: RG size:     262135 (0x3fff7)
DEV: Size:       281604096 (0x10c8f000)
The file system grew by 272956MB.
Error writing new rindex entries;aborted.
gfs2_grow complete.
[root@ask-06 d7]# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                      69578152   1675532  64311248   3% /
/dev/sda1               101086     29102     66765  31% /boot
tmpfs                  2057852         0   2057852   0% /dev/shm
/dev/mapper/test-lv1   2096552   2096552         0 100% /mnt/test


**PASSING CASE**

[root@ask-06 d7]# cd ../../
[root@ask-06 mnt]# umount /mnt/test
[root@ask-06 mnt]# lvremove /dev/test/lv1
Do you really want to remove active logical volume lv1? [y/n]: y
  Logical volume "lv1" successfully removed
[root@ask-06 mnt]# lvcreate -L 2G -n lv1 test
[root@ask-06 mnt]# rpm -Uvh http://download.devel.redhat.com/brewroot/packages/gfs2-utils/0.1.62/33.el5/x86_64/gfs2-utils-0.1.62-33.el5.x86_64.rpm
Retrieving http://download.devel.redhat.com/brewroot/packages/gfs2-utils/0.1.62/33.el5/x86_64/gfs2-utils-0.1.62-33.el5.x86_64.rpm
Preparing...                ########################################### [100%]
   1:gfs2-utils             ########################################### [100%]
[root@ask-06 mnt]# mkfs.gfs2 -p lock_nolock -j1 -b1024 /dev/test/lv1
This will destroy any data on /dev/test/lv1.
  It appears to contain a gfs2 filesystem.

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

Device:                    /dev/test/lv1
Blocksize:                 1024
Device Size                2.00 GB (2097152 blocks)
Filesystem Size:           2.00 GB (2097151 blocks)
Journals:                  1
Resource Groups:           8
Locking Protocol:          "lock_nolock"
Lock Table:                ""
UUID:                      1CD8F3CC-255D-70C6-EFD8-0F06A7A8301D

[root@ask-06 mnt]# mount -t gfs2 /dev/test/lv1 /mnt/test
[root@ask-06 mnt]# dd if=/dev/zero of=/mnt/test/bigfile bs=100M
dd: writing `/mnt/test/bigfile': No space left on device
20+0 records in
19+0 records out
1994207232 bytes (2.0 GB) copied, 40.0727 seconds, 49.8 MB/s
[root@ask-06 mnt]# cd /mnt/test/
[root@ask-06 test]# mkdir d1
[root@ask-06 test]# mkdir d2
[root@ask-06 test]# mkdir d3
[root@ask-06 test]# mkdir d4
[root@ask-06 test]# mkdir d5
[root@ask-06 test]# mkdir d6
[root@ask-06 test]# mkdir d7
[root@ask-06 test]# cd d1
[root@ask-06 d1]# ~/filler.sh
touch: cannot touch `file15': No space left on device
[root@ask-06 d1]# cd ../d2
[root@ask-06 d2]# ~/filler.sh
touch: cannot touch `file15': No space left on device
[root@ask-06 d2]# cd ../d3
[root@ask-06 d3]# ~/filler.sh
touch: cannot touch `file15': No space left on device
[root@ask-06 d3]# cd ../d4
[root@ask-06 d4]# ~/filler.sh
touch: cannot touch `file15': No space left on device
[root@ask-06 d4]# cd ../d5
[root@ask-06 d5]# ~/filler.sh
touch: cannot touch `file15': No space left on device
[root@ask-06 d5]# cd ../d6
[root@ask-06 d6]# ~/filler.sh
touch: cannot touch `file15': No space left on device
[root@ask-06 d6]# cd ../d7
[root@ask-06 d7]# ~/filler.sh
touch: cannot touch `file4': No space left on device
[root@ask-06 d7]# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                      69578152   1675644  64311136   3% /
/dev/sda1               101086     29102     66765  31% /boot
tmpfs                  2057852         0   2057852   0% /dev/shm
/dev/mapper/test-lv1   2096552   2096552         0 100% /mnt/test
[root@ask-06 d7]# lvextend -l+100%FREE /dev/test/lv1
  Extending logical volume lv1 to 268.56 GB
  Logical volume lv1 successfully resized
[root@ask-06 d7]# gfs2_grow /dev/test/lv1
FS: Mount Point: /mnt/test
FS: Device:      /dev/mapper/test-lv1
FS: Size:        2097151 (0x1fffff)
FS: RG size:     262134 (0x3fff6)
DEV: Size:       281604096 (0x10c8f000)
The file system grew by 272956MB.
gfs2_grow complete.
[root@ask-06 d7]# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                      69578152   1675652  64311128   3% /
/dev/sda1               101086     29102     66765  31% /boot
tmpfs                  2057852         0   2057852   0% /dev/shm
/dev/mapper/test-lv1 281461040   2096653 279364387   1% /mnt/test

Comment 7 errata-xmlrpc 2012-02-21 06:39:08 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0269.html