# what features are enabled?
linux-staging:~# tune2fs -l | grep -i feature
Filesystem features: resize_inode dir_index filetype sparse_super large_file [has_journal]
# remove resize_inode feature
linux-staging:~# tune2fs -O ^resize_inode /dev/hda9
tune2fs 1.40-WIP (14-Nov-2006)
Invalid filesystem option set: ^resize_inode # HUH ?
# okay then, lets try debugfs
linux-staging:~# debugfs -w -R "feature -dir_index -resize_inode" /dev/hda9
debugfs 1.40-WIP (14-Nov-2006)
Filesystem features: has_journal filetype sparse_super large_file
# lets do an e2fsck. It gave errors but maybe that's normal (?)
# I wonder whether debugfs just unsets the option flags or actually updates the filesystem to not use these features at all (in the latter case, e2fsck should be clean)
linux-staging:~# e2fsck -f /dev/hda9
e2fsck 1.40-WIP (14-Nov-2006)
Filesystem does not have resize_inode enabled, but s_reserved_gdt_blocks
is 176; should be zero. Fix<y>? yes
Resize_inode not enabled, but the resize inode is non-zero. Clear<y>? yes
Pass 1: Checking inodes, blocks, and sizes
Inode 58 has INDEX_FL flag set on filesystem without htree support.
Clear HTree index<y>? yes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Block bitmap differences: -(5--180) -689 -(32773--32948) -(98309--98484) -(163845--164020) -(229381--229556) -(294917--295092)
-(819205--819380) -(884741--884916) -(1605637--1605812) -(2654213--2654388) -(4096005--4096180) -(7962629--7962804) -(11239429--11239604)
Fix<y>?
Free blocks count wrong for group #0 (0, counted=177).
Fix<y>? yes
# lets doublecheck the enabled features
linux-staging:~# tune2fs -l /dev/hda9 | grep -i feature
Filesystem features: has_journal filetype sparse_super # Hey ? where did 'large_file' go?
# do the resize of the logical partition in parted
# enable features
tune2fs -O dir_index /dev/hda9
debugfs -w -R "feature large_file resize_inode" /dev/hda9
# now all should be good, right? lets do an e2fsck
linux-staging:~# e2fsck -f /dev/hda9
e2fsck 1.40-WIP (14-Nov-2006)
Resize inode not valid. Recreate<y>? yes
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Block bitmap differences: +689
Fix<y>? yes
/dev/hda9: ***** FILE SYSTEM WAS MODIFIED *****
/dev/hda9: 132012/7038048 files (6.2% non-contiguous), 12076862/14368126 blocks
# I also got <strong>a lot</strong> of these errors:
Assertion (block < EXT2_SUPER_BLOCKS_COUNT(fs->sb)) at ../../../../libparted/fs/ext2/ext2.h:226 in function ext2_is_data_block() failed.
# now here are some more scratch notes. I forgot exactly why and what I did, so I'm just putting them here for reference.
#in fdisk, delete logical, recreate, reboot and do online resize with resize2fs
linux-staging:~# resize2fs /dev/hda9
resize2fs 1.40-WIP (14-Nov-2006)
Filesystem at /dev/hda9 is mounted on /home; on-line resizing required
old desc_blocks = 4, new_desc_blocks = 5
Performing an on-line resize of /dev/hda9 to 19872397 (4k) blocks.
resize2fs: Invalid argument While trying to add group #512
linux-staging:~# resize2fs /dev/hda9
resize2fs 1.40-WIP (14-Nov-2006)
Please run 'e2fsck -f /dev/hda9' first.
linux-staging:~# e2fsck -f /dev/hda9
e2fsck 1.40-WIP (14-Nov-2006)
Superblock last mount time is in the future. Fix<y>? yes
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Filesystem contains large files, but lacks LARGE_FILE flag in superblock.
Fix<y>? yes
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/hda9: ***** FILE SYSTEM WAS MODIFIED *****
/dev/hda9: 132012/8208384 files (6.2% non-contiguous), 12113624/16777216 blocks
linux-staging:~# resize2fs /dev/hda9
resize2fs 1.40-WIP (14-Nov-2006)
Resizing the filesystem on /dev/hda9 to 19872397 (4k) blocks.
The filesystem on /dev/hda9 is now 19872397 blocks long.
linux-staging:~# mount /dev/hda9
# suprisingly, all data looked still intact.
Post new comment