maks blog

maks blog, Hacks, fun around free software.

maximilian attems
email maks

Subscribe to a syndicated feed of my weblog, brought to you by the wonders of RSS.

There's more than one way to view this weblog; try these flavours on for size.

Other blogs in our institute or friends.

Wed, 14 Mar 2007

ext[23] online resizing
The e2fsprogs package in Etch features the ext[23] resize2fs, see it in action on a mounted /usr partition:

nancy:/root# egrep usr /proc/mounts 
/dev/mapper/nancy_vg1-usr /usr ext3 rw,noatime,nodiratime,data=ordered 0 0
Now let's extend a bit that logical volume:
nancy:/root# lvextend -L+700M /dev/nancy_vg1/usr       
Extending logical volume usr to 4.68 GB
Logical volume usr successfully resized
Next easy step is to invoke resize2fs
nancy:/root# resize2fs /dev/nancy_vg1/usr 
resize2fs 1.40-WIP (14-Nov-2006)
Filesystem at /dev/nancy_vg1/usr is mounted on /usr; on-line resizing required
old desc_blocks = 1, new_desc_blocks = 1
Performing an on-line resize of /dev/nancy_vg1/usr to 1227776 (4k) blocks.
The filesystem on /dev/nancy_vg1/usr is now 1227776 blocks long.
Update: Mika of course already blogged about ext3 online resizing. Bug #400797 is a very good reason not to use ext2resize. I remember a post from Theodore Tso on it's bad code quality. Don't trust it.

[/tech] permanent link