Home Forum
Welcome, Guest
Username Password: Remember me

Resize LVM root partition Ubuntu server .
(1 viewing) (1) Guest
Computing discussion.
  • Page:
  • 1

TOPIC: Resize LVM root partition Ubuntu server .

Resize LVM root partition Ubuntu server . 12 years, 6 months ago #12

  • u4david
  • OFFLINE
  • Administrator
  • Posts: 12
  • Karma: 0
To resize (grow) root partition on LVM use this steps:

Log in to your server.
Make sure you have some space left on / (root) by cleaning some unnecessary files.
If you maxed out your / (root) you wont be able to run this commands successfully.

Run :
sudo lvdisplay (to see names of your root logical volume)


then run:
sudo lvextend -L10gb /dev/volume-group-name-here/name-of-your-logical-volume


-L (is size of final re-sized partition, total in gb)

Reboot your system in Ubuntu server install cd and choose recovery option to boot.
Click through default options until you get to options to mount partitions.
Do not mount any partitions.
Chose execute shell in installer.

browse to /dev and look for the volume group you have you logical volume in.
Note the full path:
/dev/vg/lv

execute file system scan:
e2fsck -f /dev/vg/lv


re size the file system to full available size of lv.
resize2fs  /dev/vg/lv 


or specify final file system size in GB
resize2fs  /dev/vg/lv 10G


Run file system scan again:
e2fsck -f /dev/vg/lv


exit from shell and reboot using the menu option in recovery.
boot to the system (not the recovery cd)

Check new system partition size.
Last Edit: 12 years, 3 months ago by u4david.
  • Page:
  • 1
Time to create page: 0.11 seconds