resize2fs on LVM on MD raid on Fedora Core 3 - inode table conflicts in fsck

Stephen Warren swarren at wwwdotorg.org
Thu Dec 9 18:55:26 UTC 2004


Andreas Dilger wrote:
> On Dec 08, 2004  21:16 -0700, Stephen Warren wrote:
> 
>>I'm attempting to setup a box here to be a file-server for all my data. 
>>I'm attempting to resize an ext3 partition to demonstrate this 
>>capability to myself before fully committing to this system as the 
>>primary data storage. I'm having some problems resizing an ext3 
>>filesystem after I've resized the underlying logical volume. Following 
>>the ext3 resize, fsck spits out lots of errors like:
>>...
> This is obviously a bug that needs to be fixed.  The good news is
> that instead of resizing your filesystem while it is unmounted you can
> resize it while it is mounted, and that shouldn't suffer from any of
> these problems (and is much more convenient).  You need the ext2resize
> RPM from sourceforge (don't know why it isn't in FC2 if they have also
> applied the patch to mke2fs):
> 
> ftp://rpmfind.net/linux/sourceforge/e/ex/ext2resize/ext2resize-1.1.19-1.i386.rpm
> 
> Then you can mke2fs a new filesystem, mount it, lvextend, and run
> "ext2online /dev/severn_vg0/test" and it will grow to fill the LV.
> There is also a tool that ships with LVM called "e2fsadm" which does
> this for you, like "e2fsadm -L +5G /dev/severn_vg0/test" should do
> both the lvextend and ext2online step at once.
> 
> You should also be able to properly resize it while unmounted with
> ext2resize, but that is far less interesting...

Thanks everyone for your help.

I have one question and another problem:

Question:

On the filesystem that I ran resize2fs on, is it now broken beyond 
repair? I originally found the problem on a 'real' data volume. After 
the resize, I can certainly mount it (read-only - didn't try rw) and 
pull the data off it, but I assume that the fsck errors are legitimate 
and the fs is corrupt, such that I should run mke2fs again from scratch?

This isn't a huge problem, since I was attempting to resize my "backup" 
LV, so it was just copies of other data...

Problem:

Well, I do have ext2online installed, although there's no e2fsadm. I'll 
have to check for other RPMs...

So, I went ahead and tried ext2online, but I get a bunch of errors 
during the execution - it's indicating my kernel doesn't have online 
resize support compiled in. I would have assumed the FC(3) kernel did, 
but I guess I should go check. Still, the debug trace from ext2online 
indicates some other errors about allocating things before the kernel 
problem.

Short version of log of ext2online:

===============================
ext2online: error reserving block 0x18813e
finding 0x18813f in inode
adding 0x18813f to inode
ext2online: error reserving block 0x18813f
finding 0x188140 in inode
adding 0x188140 to inode
ext2online: error reserving block 0x188140
mark 16384 unavailable end inodes used
...
...
Calling mount() for /dev/mapper/severn_vg0-test(/mnt/test) with 
resize=2621440:319
ext2online: resize failed while in kernel
ext2online: Invalid argument
ext2online: does the kernel support online resizing?

SEVERN:/mnt# echo $?
4
===============================

Full details:

SEVERN:/mnt# lvcreate -L 5G -n test severn_vg0
   Logical volume "test" created

SEVERN:/mnt# mke2fs /dev/severn_vg0/test
mke2fs 1.35 (28-Feb-2004)
max_blocks 1342177280, rsv_groups = 40960, rsv_gdb = 319
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
655360 inodes, 1310720 blocks
65536 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1342177280
40 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
         32768, 98304, 163840, 229376, 294912, 819200, 884736

Writing inode tables: done
inode.i_blocks = 20424, i_size = 4243456
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 23 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

SEVERN:/mnt# fsck -f /dev/severn_vg0/test
fsck 1.35 (28-Feb-2004)
e2fsck 1.35 (28-Feb-2004)
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
/dev/severn_vg0/test: 11/655360 files (9.1% non-contiguous), 
23134/1310720 blocks

SEVERN:/mnt# lvextend -L +5G /dev/severn_vg0/test
   Extending logical volume test to 10.00 GB
   Logical volume test successfully resized

SEVERN:/mnt# mount /dev/severn_vg0/test /mnt/test

SEVERN:/mnt# ext2online -d -v /dev/severn_vg0/test
ext2online v1.1.18 - 2001/03/18 for EXT2FS 0.5b
ext2_open
ext2_bcache_init
new filesystem size 2621440
ext2_determine_itoffset
setting itoffset to +323
group 2 inode table has offset 2, not 323
group 4 inode table has offset 2, not 323
group 6 inode table has offset 2, not 323
group 8 inode table has offset 2, not 323
group 10 inode table has offset 2, not 323
... same message through to group 39
ext2_get_reserved
Found 319 blocks in s_reserved_gdt_blocks
using 319 reserved group descriptor blocks

40 old groups, 1 blocks
80 new groups, 1 blocks

ext2_ioctl: EXTEND group to 1310720 blocks
ext2online: ext2_ioctl: Inappropriate ioctl for device

creating group  40 with 32768 blocks (rsvd = 319, newgd =  1)
using itoffset of 323
new block bitmap is at 0x140000
new inode bitmap is at 0x140001
new inode table is at 0x140143-0x140342
new group has 32254 free blocks
new group has 16384 free inodes (512 blocks)
mark 16384 unavailable end inodes used

creating group  41 with 32768 blocks (rsvd = 319, newgd =  1)
using itoffset of 323
new block bitmap is at 0x148000
new inode bitmap is at 0x148001
new inode table is at 0x148143-0x148342
new group has 32254 free blocks
new group has 16384 free inodes (512 blocks)
mark 16384 unavailable end inodes used

... same message for many other groups

creating group  49 with 32768 blocks (rsvd = 319, newgd =  1)
using itoffset of 323
new block bitmap is at 0x188141
new inode bitmap is at 0x188142
new inode table is at 0x188143-0x188342
new group has 31933 free blocks
new group has 16384 free inodes (512 blocks)
mark superblock 0x188000 used
mark group desc. 0x188001-0x188001 used
mark reserved descriptors 0x188002-0x188140 used
finding 0x188002 in inode
adding 0x188002 to inode
add 0 as direct block
finding 0x188003 in inode
adding 0x188003 to inode
add 1 as direct block
finding 0x188004 in inode
adding 0x188004 to inode
add 2 as direct block

... same message for many inodes

ext2online: error reserving block 0x18813e
finding 0x18813f in inode
adding 0x18813f to inode
ext2online: error reserving block 0x18813f
finding 0x188140 in inode
adding 0x188140 to inode
ext2online: error reserving block 0x188140
mark 16384 unavailable end inodes used

creating group  50 with 32768 blocks (rsvd = 319, newgd =  1)
using itoffset of 323
new block bitmap is at 0x190000
new inode bitmap is at 0x190001
new inode table is at 0x190143-0x190342
new group has 32254 free blocks
new group has 16384 free inodes (512 blocks)
mark 16384 unavailable end inodes used

... same message for many groups

creating group  68 with 32768 blocks (rsvd = 319, newgd =  1)
using itoffset of 323
new block bitmap is at 0x220000
new inode bitmap is at 0x220001
new inode table is at 0x220143-0x220342
new group has 32254 free blocks
new group has 16384 free inodes (512 blocks)
mark 16384 unavailable end inodes used

creating group  69 with 32768 blocks (rsvd = 319, newgd =  1)
using itoffset of 323
new block bitmap is at 0x228000
new inode bitmap is at 0x228001
new inode table is at 0x228143-0x228342
new group has 32254 free blocks
new group has 16384 free inodes (512 blocks)
mark 16384 unavailable end inodes used
creating group  79 with 32768 blocks (rsvd = 319, newgd =  1)
using itoffset of 323
new block bitmap is at 0x278000
new inode bitmap is at 0x278001
new inode table is at 0x278143-0x278342
new group has 32254 free blocks
new group has 16384 free inodes (512 blocks)
mark 16384 unavailable end inodes used

ext2online: resizing to 2621440 blocks
    ...flushing buffer 81/block 2588673
Calling mount() for /dev/mapper/severn_vg0-test(/mnt/test) with 
resize=2621440:319
ext2online: resize failed while in kernel
ext2online: Invalid argument
ext2online: does the kernel support online resizing?

SEVERN:/mnt# echo $?
4

SEVERN:/mnt# df -k
Filesystem           1K-blocks      Used Available Use% Mounted on
...
/dev/mapper/severn_vg0-test
                        5160576     10232   4888200   1% /mnt/test


-- 
Stephen Warren, Software Engineer, NVIDIA, Fort Collins, CO
swarren at wwwdotorg.org     http://www.wwwdotorg.org/pgp.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 250 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/ext3-users/attachments/20041209/af98ab71/attachment.sig>


More information about the Ext3-users mailing list