LVM: Resizing the root partition
I've got my root LV created too small and I'm currently running out of space. Although I know the steps on how to extend an LV, extending the root LV is rather different since I'm using ext3 FS and it requires mounting and unmounting. Can someone recommend me the proper way to perform this task?
Solution #1: Download a live distribution like Knoppix, boot it and resize your partition.
Solution #2: Create a new partition, move everything from a large directory into it and mount that partition under the same (now empty) directory. Be careful not to do this with a system directory (like /bin, /sbin, /lib, /usr/bin, etc.) because while moving, it might turn out that you need something from there (like mount).
http://forums.fedoraforum.org/showthread.php?t=154625. You can do it without unmounting.
This thread is from 2005!
You can resize your "/" root without mounting/umounting the filesystem by following
ensure your disk partition to add
#pvcreate /dev/<your drive>
#vgextend <Your volume group> /dev/<your drive>
check the Free PE value and note it.
#lvextend -l +Free PE /dev/<Your volume group>/<Your logical volume>
to ensure disk is added.
to resize the file system
LVM2 logical volume /root full, Thanks
Debian Squeeze AMD64 with LVM2 on ext3 /root partiton that was full. Thanks for your suggestions and links. I used this link as well, http://www.radioprosciutto.com/node/7, but did not unmount my root partition after reading the replies. No problems were encountered increasing the /root partition size while it was mounted. I followed the steps below, but did not perform steps 4, 5, and 7.
1. Extend logical volume: root
#lvextend -L +5G /dev/MU/root
3. Compare filesystem
#df -h /root
4. Unmount not needed
/* #exportfs -u 127.0.0.1:/root */
/* #umount /root */
5. Check filesystem not needed
/* #e2fsck -f /dev/mapper/MU-root */
6. Resize filesystem
#resize2fs -p /dev/mapper/MU/root
7. Mount not needed
/* #mount /root */
8. Verify filesystem
#df -h /root
Thanks for the help!
|All times are GMT -5. The time now is 11:54 PM.|