Does fstrim have the same effect as overwriting the disk space with zeros?
4
votes
2
answers
1464
views
I create compressed backup images using
dd
and lzop
on a regular basis.
In the past I've created a large file beforehand with zeros using head -c xxG /dev/zero > zeros.tmp && rm zeros.tmp
(xxG was the empty space available) to clean out deleted files.
This saved a lot of time and backup disk space, but it's also highly ineffective since it goes all over the empty space and therefore causes unnecessary wear on SSDs.
Does fstrim also zero blocks with unallocated files?
Or will dd return these blocks with their deleted content afterwards?
I don't want to compress blocks with unallocated files.
Asked by lmoly
(427 rep)
Feb 3, 2020, 10:16 AM
Last activity: Dec 10, 2024, 04:57 PM
Last activity: Dec 10, 2024, 04:57 PM