Category Archives: Tools

Elegantly resizing a Linux LVM volume in a virtual machine…

I’ve seen many articles on how to resize a LVM volume after increasing a virtual disk capacity. Most write-ups call for adding partitions and simply adding them to the volume group. While it is simple, it’s not future proof since the number of partitions is limited.

Here’s the way I do it. I hope you enjoy!

  1. Resize your virtual disk (this depends on your hypervisor, I use VMware so YMMV)
  2. Shut down the VM, find an ISO that has GParted. I use PartedMagic but the GParted Live ISO works too.
  3. Boot from the ISO, start GParted.
    1 GParted
  4. Select the LVM physical volume, right click on it then click on deactivate.
    2 Deactivate
  5. Then right click on Resize/Move
    3 Resize
  6. Resize the partition (here, sda2, yours might be different)
    4 Resize
  7. Apply the changes by clicking the green checkmark in the toolbar at the top. Click Apply in the popup.
    5 Apply
  8. Don’t forget to reactivate the LVM physical volume.
    6 Activate
  9. In the terminal, enter the following commands (volume group names may vary) do an ls /dev/ if you’re not sure.
    #extend the volume
    lvm lvextend /dev/lv_hostname/lv_root /dev/sda2
    #check the filesystem for inconsistencies
    e2fsck -f /dev/lv_hostname/lv_root
    #resize the filesystem
    resize2fs /dev/lv_hostname/lv_root
  10. Shut down the VM, unmount the iso.
  11. You’re done.


My favorite tools…

I’ve been wanting to put a list of my favorite tools online for a long time…
System cleanup, tune-up and optimization:
Ccleaner – Piriform – Free – Cleans caches, temp files, application specific settings, cleans up the registry and much more.
Defraggler – Piriform – Free – An awesome disk defragmentation software.
Cleanup! 4.5.2 – Steven Gould – Free – Very very strong cleanup tool for Windows XP only.
Filesystem repair:
Data Recovery Wizard Pro – EaseUs – $69.95 – Best data recovery software I’ve ever used. Way more efficient than Ontrack EasyRecovery Pro. And cheaper. Saved my a** more than a couple of times.
ViVard – Copyrsoft – Free – HDD diagnostic and sector repair. Vendor independent.
Mac side:
Appcleaner – FreeMacSoft – Free – Application uninstaller for Mac OS. Like AppZapper but free.
OnyX – Titanium Software – Free – Like Ccleaner, for mac. Awesome.
Mouse Jiggler.vbs, a small VBscript I use to prevent a computer from locking itself when I’m working on it without knowing the user’s password:

Set WshShell = WScript.CreateObject("Wscript.Shell")
Do While 1

More to come…