[Systems] Bender's root filesystem
Bernie Innocenti
bernie at codewiz.org
Wed Sep 22 11:49:15 EDT 2010
So I think I figured out what went wrong with Bender.
For some time, Bender's root filesystem was being mounted directly
from /dev/sda1, not /dev/md127 (the raid1 device which binds sda1 and
sdb1 together).
Normally, raid1 partitions are exactly the same size of the physical
partitions containing them. But not in this case, probably because the
array was created using the 1.0 metadata format. Metadata is probably
sitting at the end of the volume.
So the filesystem now thinks it's bigger than its containing partition:
bender:/# fdisk -l /dev/sda | grep sda1
/dev/sda1 1 1305 10482381 83 Linux
bender:/# mdadm --detail /dev/md127 | grep 'Array Size'
Array Size : 10482308 (10.00 GiB 10.73 GB)
bender:/# tune2fs -l /dev/md127 | grep 'Block count:'
Block count: 2620595
The block count is in 4k units.
2620595*4096/1024 = 10482380
Which is the size of sda1, too big for md127.
So I think the solution is this:
bender:/# resize2fs /dev/md127 20964614s
resize2fs 1.41.10 (10-Feb-2009)
Filesystem at /dev/md127 is mounted on /; on-line resizing required
On-line shrinking from 2620595 to 2620576 not supported.
Of course, it would have to be done from the console in single user
mode, with / mounted read-only. Or from a boot cd.
--
// Bernie Innocenti - http://codewiz.org/
\X/ Sugar Labs - http://sugarlabs.org/
More information about the Systems
mailing list