C-NET :: PROJECTS

cat the-fastest-way-to-extend-disk-image-files-on-linux.md

The fastest way to extend disk image files on Linux

Posted

So the VM is using too much space, and the disk image needs to grow. Previously I used dd with a bunch of options to do this. However, the truncate tool makes the whole ordeal a lot easier.

A simple command, such as the following, will grow the file disk.img by 10 gigabytes:

truncate -s +10G disk.img
bash

Read the manual for truncate for more options.

Happy resizing.

Comments