Sample Header Ad - 728x90

How does fstrim interact with dd

4 votes
1 answer
677 views
I'd like to understand the interaction between fstrim and a file system driver (such as ext4). More precisely I'd like to understand whether dd interfere with this. I've queried elsewhere about how the file system informs an SSD when a block is not used. This is important because it can help with wear levelling. This was my earlier question When a partition is copied with dd or equivalent, every byte of every block gets copied regardless of whether it's used by the file system. Besides being slower on mostly empty file systems, this also tells the disk to store data in unused areas of the file system. Will fstrim recover from this or is it incremental, only discarding after a file is deleted? (Meta question) Is it now recommended that users call fstrim or similar after using dd to copy a disk?
Asked by Philip Couling (20391 rep)
Jul 8, 2020, 01:43 PM
Last activity: Jul 8, 2020, 10:04 PM