Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What happens if you run "dd if=/dev/zero of=/any/file/here", thus simply loading the disk with all the zeros it can handle? Do you lose all your snapshots as they are deleted to make room, or does it keep some space aside for this situation?

(Not a "gotcha" question, a legitimate question.)



It's configurable: https://nilfs.sourceforge.io/en/man5/nilfs_cleanerd.conf.5.h.... Cleanerd is responsible for maintaining a certain amount of free space on the system, and you can control the rules for doing so (e.x. a checkpoint won't be eligible for being cleaned until it is 1 week old).

It's also worth knowing NILFS2 has checkpoints and snapshots. What you actually get are continuous "checkpoints". These can be upgraded to snapshots at any time with a simple command. Checkpoints are garbage collected, snapshots are not (until they are downgraded back into checkpoints).


the garbage collector daemon will delete older checkpoints beyond the preserve time to make some room.


I know this isn't what you're getting at, but is it smart enough to create a sparse file when you specifically pick zero as your filler byte?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: