Shrink guest on hosted platform: Difference between revisions

Jump to navigation Jump to search
→‎Zero out using fstrim: adding a small example
(→‎Zero out using fstrim: adding a small example)
Line 95: Line 95:


These days there's an alternative way for zero-ing out the parts of the disk that are not used using [https://www.man7.org/linux/man-pages/man8/fstrim.8.html fstrim].
These days there's an alternative way for zero-ing out the parts of the disk that are not used using [https://www.man7.org/linux/man-pages/man8/fstrim.8.html fstrim].
eg:
# fstrim -a -v
/var: 274.3 MiB (287592448 bytes) trimmed on /dev/sda3
/tmp: 63 MiB (66060288 bytes) trimmed on /dev/sda5
/home: 125 MiB (131072000 bytes) trimmed on /dev/sda6
/boot/efi: 505.2 MiB (529735680 bytes) trimmed on /dev/sda1
/: 5 MiB (5242880 bytes) trimmed on /dev/sda2


The great thing about this is that it only zero's out the parts of the disk that are not zero and as such the disk does not inflate to its full size.
The great thing about this is that it only zero's out the parts of the disk that are not zero and as such the disk does not inflate to its full size.
1,274

edits

Navigation menu

Guest

Support my products