logoalt Hacker News

layer8today at 1:35 PM2 repliesview on HN

Better fill those files with random bytes, to ensure the filesystem doesn’t apply some “I don’t actually have to store all-zero blocks” sparse-file optimization. To my knowledge no non-compressing file system currently does this, but who knows about the future.


Replies

freedombentoday at 2:12 PM

Yep, btrfs will happily do this to you. I verified it the hard way

show 1 reply
ape4today at 1:49 PM

If I recall correctly:

    dd if=/dev/urandom of=/home/myrandomfile bs=1 count=N
show 2 replies