On 7 February 2016 at 13:35, David Goldsbrough <da...@boavon.plus.com> wrote: > > Disk /dev/mapper/ubuntu--vg-root: 57.6 GB, 57612959744 bytes >
This is the device for your LVM-based root volume > Disk /dev/mapper/ubuntu--vg-swap_1: 2139 MB, 2139095040 bytes > This is your swap device (also in the LVM) > sudo pvdisplay > > --- Physical volume --- > > PV Name /dev/sda5 > > VG Name ubuntu-vg > We need to resize this and then expand your root volume. First we resize the partition by deleting it and recreating it (sounds scary): Step 1. 1. start `fdisk /dev/sda` and type "d" followed by enter and then "3" and again press enter. This deletes the partition. 2. Now we recreate it with "n" followed by enter and then accepting the defaults. 3. Finally we need to tell the system that this is an LVM partition by typing "t", enter, "3", enter and finally "8e" then enter again. This should have replaced your 50GB partition with one that takes up all the space available on the disk. 4. type "w" and press enter to write the changes and quit fdisk. Step 2. We now need to resize the LVM data inside the partition as without doing so LVM will still only see 50GB. So we need to `pvresize /dev/sda5`. -- For the final two steps we need to resize the Logical Volume holding your root filesystem and then the root filesystem itself: -- Step 3. First the volume on which the filesystem resides: lvextend -l+100%FREE /dev/mapper/ubuntu--vg-root Step 4. Finally the filesystem itself: resize2fs /dev/mapper/ubuntu--vg-root You should be done now, but you can run an `fsck /dev/mapper/ubuntu--vg-root` to be sure that the filesystem is still working before rebooting. -- Regards, The Honeymonster Daniel Llewellyn
-- ubuntu-uk@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https://wiki.ubuntu.com/UKTeam/