Ubuntu No Disk Space with Empty Drive


I am plagued from time to time about not having free diskspace for patching and upgrades. Here's how to fix for my setup.

Note: I am using a 40GB Virtual disk but the default install of Ubuntu is only using 20GB. There's plenty of room for expansion.

Reference site that helped me out

  1. Check if we are out of diskspace
    1. df -h
    2. Look at the / volume and verify that our usage is full'ish
  2. lvdisplay
    1. Record: LV Path = [lvpath]
  3. lvextend -L#G [lvpath] #sets the size to the #
    1. or, lvextend -L+#G [lvpath] #add the # amount to the current size
  4. resize2fs [lvpath]
  5. Verify the new size of the [lvpath] volume
    1. df -h