back       next

Extending LVM

Extend partition by 1Gb.

# lvresize -L +1G /dev/vg00/lvol0
# e2fsck -f /dev/vg00/lvol0
# resize2fs -pf /dev/vg00/lvol0


Notes:

  • resize2fs has replaced ext2online in FC6.
  • need to unmount volume prior to doing resize2fs.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Shrinking LVM

To shrink a 2Gb partition to a 1Gb size.

Note: The block size is specified in 4k blocks.

1Gb = 1*1024*1024/4 = 262144 blocks.

# resize2fs -pf /dev/vg00/lvol0 262144
# e2fsck -f /dev/vg00/lvol0
# lvreduce -L -1G /dev/vg00/lvol0

Additionally, you can go back and do a resize2fs to the actual lvm size that gets created.

Post new comment

  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.