LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   LVM: Resizing the root partition (http://www.linuxquestions.org/questions/linux-general-1/lvm-resizing-the-root-partition-361663/)

fulat2k 09-09-2005 02:09 AM

LVM: Resizing the root partition
 
Hi folks,

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?


Thanks!

addy86 09-09-2005 03:31 AM

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).

fulat2k 09-09-2005 03:41 AM

Quote:

Originally posted by addy86
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).

Thanks for the solutions. I feel much more comfortable with Solution #1.

Thanks!

rajeshkahara 07-21-2009 09:22 PM

http://forums.fedoraforum.org/showthread.php?t=154625. You can do it without unmounting.

micxz 07-21-2009 09:37 PM

This thread is from 2005!

swapnshukla 07-22-2009 01:23 AM

You can resize your "/" root without mounting/umounting the filesystem by following

#fdisk -l
ensure your disk partition to add
#pvcreate /dev/<your drive>
#vgextend <Your volume group> /dev/<your drive>
#vgdisply
check the Free PE value and note it.
#lvextend -l +Free PE /dev/<Your volume group>/<Your logical volume>
#lvdisplay
to ensure disk is added.
#resize2fs /
to resize the file system

cardinal35 01-08-2012 04:35 PM

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

2. Verify
#lvdisplay /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 02:37 AM.