Gotta love LVM

# lvresize -L +1G /dev/vg/gert_var
Extending logical volume gert_var to 3.00 GB
Logical volume gert_var successfully resized

# e2fsck -f /dev/vg/gert_var
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
/dev/vg/gert_var: 22902/131072 files (6.4% non-contiguous), 472351/524288 blocks

# resize2fs  /dev/vg/gert_var
resize2fs 1.41.3 (12-Oct-2008)
Resizing the filesystem on /dev/vg/gert_var to 786432 (4k) blocks.
The filesystem on /dev/vg/gert_var is now 786432 blocks long.

A breeze! Gotta love it 🙂

Published by Gert

Person-at-large.

4 thoughts on “Gotta love LVM

  1. Also note that the ext2, 3, and 4 filesystems all support online live resizing, which has two advantages:
    * You can skip the forced fsck
    * You don’t need to kill processes using the filesystem, they can continue writing to the filesystem.

    It takes a bit longer to do the actual resize, but if your filesystem is huge (say, a terabyte or so) the lack of forced fsck is a real time saver.

    Like

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: