I was only using a part of my external usb hard drive to keep backups and needed to extend the partition to accomodate the ever-growing backup files.
There are quite some ways to do this which can be referenced at FedoraNews.org and TLDP.org .
Below is a quick command line reference if you are familiar with the process already.
-
I added an additional 10GB of space:
# lvextend -L+10G /dev/vg00/lvol0Unmount the drive:
# umount /mnt/usbdiskCheck the logical volume:
# e2fsck -f /dev/vg00/lvol0Increase the file system size to match.
# resize2fs -pf /dev/vg00/lvol0Remount:
# mount /mnt/usbdisk
Here's what the logical volume is currently displayed as after extending from 50GB to 60GB:
# lvdisplay --- Logical volume --- LV Name /dev/vg00/lvol0 VG Name vg00 LV UUID vVr2IO-81Cc-zv05-6Ffu-hHUD-8xpc-9qUBDh LV Write Access read/write LV Status available # open 1 LV Size 60.00 GB Current LE 15360 Segments 1 Allocation next free (default) Read ahead sectors 0 Block device 253:0
online resize
Linux 2.6 kernel supports on-line resize for filesystems mounted using ext3 with resize2fs, so no need to unmount when resizing!!
Extend Volume Group
If adding a new drive or partition to extend logical volume, you can extend your existing volume group as below:
Create a new physical volume:
Extend existing volume group to use the new physical volume.
Display summary via:
# pvcreate /dev/sdb1
# vgextend vg00 /dev/sdb1
# pvs
# vgs