Tuesday, September 25, 2018

14.04 - Re-size boot drive partitions




I recently swapped out a smaller drive (320gb) for a larger one (500gb) because I was getting warnings about space. I had done all of the logical things I knew about to free up space and decided it was time to upgrade the drive. The upgrade went well, but, now, I'm left with trying to re-size the partitions to take advantage of the new 180gb I've provided. I'm somewhat at a loss. I've looked at this, but, wasn't able to figure out what to do.



The new drive has 3 existing partitions and 180gb of free space. They are:




  • Partition 1 - Filesystem Ext2

  • Partition 2 - Extended 320 gb

  • Partition 5 - LVM2 PV 320 gb

  • Free space - 180 gb




I installed the LVM disk utility mentioned in the post above. I could not figure out how to use the utility to re-size the partitions to take advantage of the new space.



I'd greatly appreciate if someone can provide steps on how to increase my partition(s) so that the newly added space is used.



I was able to figure this out. My initial problem was understanding that Ubuntu does not treat a disk swap like Windows. When a disk is swapped in Windows, the OS knows to extend the file system into the remaining space. In Ubuntu, there are some extra steps that I found by reading How can I resize an LVM partition? (i.e: physical volume).



Basically, the steps I took were...





  • Use Clonezilla to copy the contents of the smaller drive to a larger
    drive.

  • Use the Disk manager to create a new partition on the new free space
    (180gb).

  • Use the LVM (Logical Volume Management) tool to initialize the new
    space.



And, the steps I was missing....





  • Reboot from a Live CD and install LVM according to the post above.

  • Use LVM to extend the file system into the new space.

  • Reboot and space is now available.



I hope this helps someone else struggling with how to accomplish a disk swap.


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...