<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 7 February 2016 at 13:35, David Goldsbrough <span dir="ltr"><<a href="mailto:daveg@boavon.plus.com" target="_blank">daveg@boavon.plus.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra">
<p style="margin-bottom:0cm;line-height:100%">Disk
/dev/mapper/ubuntu--vg-root: 57.6 GB, 57612959744 bytes</p></div></div></blockquote><div><br></div><div>This is the device for your LVM-based root volume</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra">
<p style="margin-bottom:0cm;line-height:100%">Disk
/dev/mapper/ubuntu--vg-swap_1: 2139 MB, 2139095040 bytes</p></div></div></blockquote><div><br></div><div>This is your swap device (also in the LVM) </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra">
<p style="margin-bottom:0cm;line-height:100%">sudo pvdisplay 
</p>
<p style="margin-bottom:0cm;line-height:100%"> 
</p>
<p style="margin-bottom:0cm;line-height:100%">  --- Physical
volume --- 
</p>
<p style="margin-bottom:0cm;line-height:100%">  PV Name           
   /dev/sda5 
</p>
<p style="margin-bottom:0cm;line-height:100%">  VG Name           
   ubuntu-vg</p></div></div></blockquote><div><br></div><div>We need to resize this and then expand your root volume. </div><div><br></div><div>First we resize the partition by deleting it and recreating it (sounds scary):</div><div><br></div><div>Step 1.</div><div><ol><li>start `fdisk /dev/sda` and type "d" followed by enter and then "3" and again press enter. This deletes the partition.</li><li>Now we recreate it with "n" followed by enter and then accepting the defaults.</li><li>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.</li><li>type "w" and press enter to write the changes and quit fdisk.</li></ol></div><div>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`.</div><div><br></div><div>--</div><div>For the final two steps we need to resize the Logical Volume holding your root filesystem and then the root filesystem itself:</div><div>--</div><div><br></div><div>Step 3. First the volume on which the filesystem resides: lvextend -l+100%FREE /dev/mapper/ubuntu--vg-root</div><div><br></div><div>Step 4. Finally the filesystem itself: resize2fs /dev/mapper/ubuntu--vg-root</div><div><br></div><div>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.</div></div><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Regards,<br>    The Honeymonster Daniel Llewellyn</div>
</div></div>