Welcome Guest. Sign in or Signup

3 Answers

Increasing the partition size online with LVM using Ubuntu 11.04

Asked by: 2779 views Ubuntu

Thanks for your great tutorial on installing LVM with Ubuntu 11.04

Would like to migrate from a 320GB HDD to a 1TB HDD, have made a sector by sector copy and the 1TB works very well.

Only now would like to increase the partition size online, and here I have no idea what to do.  Can anyone give step by step instructions what I should do?  A mini tutorial on this subject may be useful for lots of other people?

Please be patient with me as I am a complete Linux newbie.

 

 

 

 

 

0saves
To have future articles like this delivered automatically to your Feed Reader or Inbox, please subscribe to this blog via RSS or email. For detailed reviews and tutorials, visit LinuxBSDos.com.

3 Answers



  1. finid on May 21, 2011

    Thanks for the kind words. I’ll work on a FAQ for new users.

    Per the gui for managing LVM, just install it and it will make your life a lot easier.

    +1 Votes Thumb up 1 Votes Thumb down 0 Votes



  2. finid on May 21, 2011

    I have a tutorial on managing LVM that is 80% completed. I’ll try to finish it soon.

    To your case, a little bit more info would have be helpful. If you followed the tutorial, you likely configured three logical volumes – /, Swap, and /home. What logical volume are you trying to grow? Does it even need to be resized? Without this info, I’ll just give a generic command for increasing the size of a logical volume

    Assuming you allocated 30 GB to the logical volume for /home, and you want to increase the size by, say, 40 GB, that is make it 70 GB, the command to employ is lvextend and the format is:

    lvextend -L+SIZE -t /dev/VG_name/LV_name /dev/sdaN

    What the command does is increase the size of the LV by SIZE. Replace VG_name with the name of your volume group, LV_name with the name of the logical volume you are trying to extend, and N with the partition number of the logical volume. The -t option is for a dry run.

    So the real command will look something like this;

    lvextend -L+40G /dev/VG_name/LV_name /dev/sdaN

    If you do not want to use the command line, install the system-config-lvm package. It will give you a beautiful gui interface for managing LVM.

    Note: If you have not run out of space, or about to run out of space, on any of the logical volumes, there is no point in trying to grow them.

    +3 Votes Thumb up 3 Votes Thumb down 0 Votes



    • Amos on May 21, 2011

      Indeed I did follow the tutorial by the letter, and it went very smoothly.

      Thank you very much for your useful advice. Your new tutorial will be useful particularly by recent converts to Linux such as myself…

      I had no idea at all about the command lines you mention or the fact there is a gui interface for managing LVM with Ubuntu 11.04 (on a tutorial dated three years ago there was mention of YaST, but no mention of it’s use with Ubuntu).

      Tryng to grow “/home”, would like to do this now before it gets filled with data, if I have problems will be easier to deal with now. With the help you have been kind enough to provide I think I will be okay from this point on.

      May I suggest an FAQ be established that points to information sources for newbies. From my experience so far with Ubuntu I think there will be an avalanch of converts in the future.

      You are very kind to help, who ever you are you are much appreciated. Pitty we don’t know your name.

      +1 Votes Thumb up 1 Votes Thumb down 0 Votes