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.
Extending LVM
Submitted by sandip on Fri, 03/23/2007 - 09:19
Extend partition by 1Gb. # lvresize -L +1G /dev/vg00/lvol0 Notes:
need to unmount volume prior to doing resize2fs. »
|
See AlsoUser loginRecent blog posts
Who's onlineThere are currently 0 users and 2 guests online.
|
resize2fs and lvreduce
Instead of calculating blocks, you could directly use 1G instead. Make sure to check disk with e2fsck prior.
e2fsck -vf -C0 /dev/vg00/lvol0
resize2fs -p /dev/vg00/lvol0 1G
lvreduce -L -1G /dev/vg00/lvol0
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.