0

I had a 30 GB machine and I run out space. Then, via the VMWare Workstation GUI, I have extended that space.

It got to "unallocated space" at first, then I tried to extend it with gparted, but no luck, there is not option to resize it.

https://pasteboard.co/JUfr2G7.png

Then, I have tried this:

https://www.joomlaworks.net/blog/item/168-resizing-the-disk-space-on-ubuntu-server-vms-running-on-vmware-esxi-5

But I got no output from:

vgdisplay 

So I cannot extend it.

I have tried manually to do:

pvcreate -ff /dev/sda3 vgcreate "name" /dev/sda3 vgextend name /dev/sda3 

but got:

 Physical volume '/dev/sda3' is already in volume group 'name' Unable to add physical volume '/dev/sda3' to volume group 'name' /dev/sda3: physical volume not initialized. 

Seems like a rathole =/

1 Answer 1

0

I solved it via de 1 method:

cd /mnt/ ls mount /dev/sda3 /mnt/ cd /mnt/ rm -rf lost+found/ cp -rp /home/* /mnt/ mv /home/ /home.orig mkdir /home cd / umount /dev/sda3 mount /dev/sda3 /home/ df /dev/sda3 ------------------------------------------------------------------------ Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda3 51342396 7936608 40767968 17% /home ------------------------------------------------------------------------ cp /etc/fstab /etc/fstab.orig nano /etc/fstab 

Added this line to fstab:

/dev/sda3 /home ext4 defaults 0 0

rm -r /home.orig df -u 

The result is:

Filesystem Size Used Avail Use% Mounted on udev 3.4G 0 3.4G 0% /dev tmpfs 689M 1.8M 688M 1% /run /dev/sda5 29G 19G 9.1G 68% / tmpfs 3.4G 0 3.4G 0% /dev/shm tmpfs 5.0M 4.0K 5.0M 1% /run/lock tmpfs 3.4G 0 3.4G 0% /sys/fs/cgroup /dev/loop1 219M 219M 0 100% /snap/gnome-3-34-1804/66 /dev/loop3 33M 33M 0 100% /snap/snapd/11107 /dev/loop2 65M 65M 0 100% /snap/gtk-common-themes/1514 /dev/loop0 56M 56M 0 100% /snap/core18/1988 /dev/loop4 33M 33M 0 100% /snap/snapd/11402 /dev/loop5 52M 52M 0 100% /snap/snap-store/518 /dev/sda3 49G 7.6G 39G 17% /home /dev/sda1 511M 4.0K 511M 1% /boot/efi tmpfs 689M 20K 689M 1% /run/user/1000 

Clean and sleek

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.