Horsing around with ext4 again...on F-10.
This time a fsck was required after both an offline shrink and an online
grow. Why?
----8<----
13:22]stratus~# resize2fs -M -p /dev/foo/bar
resize2fs 1.41.3 (12-Oct-2008)
Please run 'e2fsck -f /dev/foo/bar' first.
13:22]stratus~# e2fsck -C0 -f /dev/foo/bar
e2fsck 1.41.3 (12-Oct-2008)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
bar: 43186/172800 files (0.2% non-contiguous), 295511/1753088 blocks
13:24]stratus~# resize2fs -M -p /dev/foo/bar
resize2fs 1.41.3 (12-Oct-2008)
Resizing the filesystem on /dev/foo/bar to 426236 (4k) blocks.
Begin pass 2 (max = 101383)
Relocating blocks XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Begin pass 3 (max = 54)
Scanning inode table XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Begin pass 4 (max = 5278)
Updating inode references XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The filesystem on /dev/foo/bar is now 426236 blocks long.
13:25]stratus~# fsck.ext4 -C0 -f /dev/foo/bar
e2fsck 1.41.3 (12-Oct-2008)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Block bitmap differences: -(17--18) -(33--34) -(2835--3234)
Fix<y>? yes
Free blocks count wrong for group #0 (0, counted=404).
Fix<y>? yes
Free blocks count wrong (138405, counted=138809).
Fix<y>? yes
bar: ***** FILE SYSTEM WAS MODIFIED *****
bar: 43186/44800 files (0.2% non-contiguous), 287427/426236 blocks
----8<----
Then a bit later, I shrunk the lv to 4G, and then mounted the filesystem
(just for fun), and finally online expanded the fs into it.
----8<----
15:54]stratus~# lvreduce -L4G foo/bar
WARNING: Reducing active and open logical volume to 4.00 GB
THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce bar? [y/n]: y
Reducing logical volume bar to 4.00 GB
Logical volume bar successfully resized
15:54]stratus~# resize2fs -p /dev/foo/bar
resize2fs 1.41.3 (12-Oct-2008)
Filesystem at /dev/foo/bar is mounted on /home; on-line resizing required
old desc_blocks = 1, new_desc_blocks = 1
Performing an on-line resize of /dev/foo/bar to 1048576 (4k) blocks.
The filesystem on /dev/foo/bar is now 1048576 blocks long.
15:55]stratus~# umount /home
15:55]stratus~# fsck.ext4 -C0 -f /dev/foo/bar
e2fsck 1.41.3 (12-Oct-2008)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Directories count wrong for group #16 (62, counted=0).
Fix<y>? yes
Directories count wrong for group #19 (12, counted=0).
Fix<y>? yes
Directories count wrong for group #25 (1, counted=0).
Fix<y>? yes
Directories count wrong for group #26 (2, counted=0).
Fix<y>? yes
Directories count wrong for group #29 (38, counted=0).
Fix<y>? yes
bar: ***** FILE SYSTEM WAS MODIFIED *****
bar: 43186/102400 files (0.2% non-contiguous), 291069/1048576 blocks
----8<----
Is this all normal? I can suppose a fsck is required after a shrink. But
after an online expand, seems odd.
Prior to this little experiment, the lv/ext4fs were at 6.7G. Shrinking
brought it to 1.7G (with 1.1G in use). And obvously, I ended with 4G even.
../C
_______________________________________________
Ext3-users mailing list
Ext3-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/ext3-users