1 (edited by khampol 2016-02-26 19:22:37)

Topic: [SOLVED]Unbuntu server resize partition

Hello,
I use vmware to virtlz my ubuntu svr. The vHDD i use become too small, so i move to new vHDD bigger.
Initial I have only 45Go (44.91Go). I migrate to new one = 400Go. It boots and all looks fine but, the OS still see 45Go... I use gParted and all seem fine, and again after reboot I still have 45Go...  ... Help!

http://s10.postimg.org/ypsa3aoeh/Screen_Shot_2016_02_25_at_15_02_21.png

2

Re: [SOLVED]Unbuntu server resize partition

http://s10.postimg.org/lkcrx6uix/Screen_Shot_2016_02_25_at_15_03_47.png

Still 44.91Go....
Why??.... sad((

3

Re: [SOLVED]Unbuntu server resize partition

Which version of GParted are you using?

If you grew the LVM2 Physical Volume, did you remember to go to the command line and grow the LVM2 Logical volume and file system?

4

Re: [SOLVED]Unbuntu server resize partition

hi,
i use v. 0.24.x but i can take another version.

did you remember to go to the command line and grow the LVM2 Logical volume and file system?

i dont have any idea how do that, can u tell more please?

5

Re: [SOLVED]Unbuntu server resize partition

As you have found GParted can resize partitions, but not Logical Volumes.  Extending the Logical Volume will have to be done from the command line.  Steps (2) and (3) below represent the shortest possible sequence to query the required information and make the change.  Run all commands as root, or prefixed with "sudo".

1) Show summary of the Volume Group and Logical Volumes.

vgs
lvs

2) Show the device name ("Filesystem" column) to the Logical Volume containing the root (/) file system.  (Probably something like "/dev/mapper/ubuntu64--vg-root--lv").

df

3) Grow the Logical Volume to fill the Volume Group and grow the file system at the same time.  (Replace "/dev/mapper/ubuntu64--vg-root--lv" with the actual device name found in step (2) above).

lvresize --resizefs --extents +100%FREE /dev/mapper/ubuntu64--vg-root--lv

This assumes you are using ext3 or ext4 root file system and want to grow it to fill all available space.  It can be done online with the system up and running.

All of the above information can be found by searching the Internet for LVM documentation.

6 (edited by khampol 2016-02-26 05:31:31)

Re: [SOLVED]Unbuntu server resize partition

ok i got it smile

I use :

lvresize --resizefs --extents +100%FREE /dev/mapper/ubuntu64--vg-root

Magic! thanks for your help guys !

7 (edited by khampol 2016-02-26 05:34:29)

Re: [SOLVED]Unbuntu server resize partition

http://s14.postimg.org/oqlt506j5/Screen_Shot_2016_02_26_at_10_32_24.png
Nice! At last ! big_smile

8

Re: [SOLVED]Unbuntu server resize partition

'Glad to hear you were able to resolve the problem.

To help others searching for answers to similar questions, you can edit the initial post and prefix "SOLVED" in front of the title.

9

Re: [SOLVED]Unbuntu server resize partition

Sure. Thanks again.