0

I want to increase the main partition size on Ubuntu 12.04.5 LTS server. I'm trying to follow this guy's tutorial.

http://www.rootusers.com/how-to-increase-the-size-of-a-linux-lvm-by-expanding-the-virtual-machine-disk

At "Increasing the logical volume" step (I'm using sda2 instead of sda3):

root@Ubuntu:~# pvcreate /dev/sda2
Physical volume "/dev/sda2" successfully created

root@Ubuntu:~# vgdisplay
No volume groups found

So I'm stuck here. Next step is to extend the volume group, that you learn from vgdisplay command.

EDIT: Maybe I have to pvcreate /dev/sda1... according to this:

http://linuxconfig.org/linux-lvm-logical-volume-manager

But sda1 is my / partition, so I get "device is busy".

EDIT: The output of df is:

/dev/sda1        16G  3.2G   12G  22% /
udev            487M  4.0K  487M   1% /dev
tmpfs           100M  220K  100M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            497M     0  497M   0% /run/shm

/dev/sda2 not visible here...

1 Answers1

1

You have not installed ubuntu using LVM partitioning. If you had used LVM then df command should return something like

$ df -h
Filesystem                  Size  Used Avail Use% Mounted on
/dev/mapper/localhost--vg-root  7.0G  1.7G  5.0G  25% /
none                        4.0K     0  4.0K   0% /sys/fs/cgroup
udev                        232M  4.0K  232M   1% /dev
tmpfs                        50M  356K   49M   1% /run
none                        5.0M     0  5.0M   0% /run/lock
none                        246M  4.0K  246M   1% /run/shm
/dev/vda1                   236M   75M  149M  34% /boot

Unfortunately there is no easy way to increase main partition. You could:

  • Boot from some live-cd to redefine your partitions (Be careful of your data)
  • Reinstall using LVM partitioning

enter image description here

ztik
  • 448
  • damn... so reinstall the os than? – user568021 Dec 04 '14 at 15:59
  • I am afraid it is the safest – ztik Dec 04 '14 at 16:12
  • 2
    You only have to re-install if you wish to implement LVM. If you want to use additional currently-unused space on the same storage device that your root partition already sits on, live cd plus gparted is a rather easy and simple way to go. – MGodby Dec 04 '14 at 17:23
  • I will talk to the server guys tomorrow, but they will rather just reinstall the os... I don't have any important data for now.. – user568021 Dec 04 '14 at 22:19