Step By Step

Share ideas and interesting findings in my life.

I am a software engineer focus on backend service and architecture design.


Formerly works for Microsoft and now Senior Software Engineer for Skytap.

Increase Ubuntu Disk Space in VM

I hit an issue that sometimes, the disk size of a VM is not large enough after a few weeks development. I thought it is trivial to increase the disk size since I am using a VM. But it turns out that modify the system disk is not easy.

I searched online for a while and here is what finally works for me:

Details are explained here

  1. shutdown VM, increase disk size (please take a snapshot in case anything goes wrong)
  2. run cfdisk
    1. select free space
    2. click ‘New’
    3. select ‘Logical’
    4. select Type => 8e
    5. select Write and confirm by “yes”
    6. select Quit after writing
    7. reboot
  3. sudo pvcreate /dev/sda6
  4. sudo vgextend ubnt1204 /dev/sda6 (please look up the vgname by vgdisplay)
  5. sudo lvextend -l +100%FREE /dev/ubnt1204/root (look up the logiacal volume name by lvdisplay)
  6. sudo resize2fs /dev/ubnt1204/root
  7. run df -h to confirm new storage size

That’s it. Hope it helps.

Recent Article

Knowledge Engine (expert system)

While developing backend service, I hit the concept of knowledge engine, specifically PYKE. After spending a few days with it, I would like to write down what I’ve learned so far.what is knowledge engineBasically, you tell the engine a bunch of ru...…

pythonContinue Reading
Early Article

InnoDB(MySQL) Lock Gotchas

If you are not verify familiar with InnoDB, please go to the basics first:InnoDB(MySQL) Lock TutorialLet’s start by reviewing the following sentence from MySQL Doc A locking read, a UPDATE, or a DELETE generally set record locks on every index re...…

mysqlpythonContinue Reading