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

Doesn't the lack of an fsck tool for ZFS worry you? I know it's supposed to never ever get corrupted, but HDDs do lie sometimes, bits get flipped other times and knowing there's nothing that can try to discover lost files is a deal-breaker for me.

Also, from what I remember, due to the fact ZFS keeps previous versions of files around, the effective data capacity you get is something like 1/2 or even 1/3 of the capacity of the HDD, no?



You seem pretty uninformed about ZFS so I'll try and help. As other have mentioned, there's the zpool scrub command which checks the integrity of the drive.

Also, I'm not sure where you got the "ZFS keeps previous versions of files around" idea from, it only does that if you make a snapshot, and only modifications of the file cause the file to be copied; this is waht copy on write is. It means you can have the whole history of your file system with almost no space overhead except for changes. Apple's time Machine does the same thing, but in a different way: each directory that hasn't been changed since the last backup is hard linked to the previous backup's version (which might itself be a hardlink). this makes is quite space efficient (and a pretty easy to understand hack to get versioning on a file system that doesn't natively support snapshots)


Answering as a novice:

The whole point of ZFS is that if a bit gets flipped, it's corrected the next time the file is accessed. There's a scrub command that manually hits every file to check for integrity and you can schedule it through cron.

And I assume you can control the size of the snapshots, I haven't looked into it but it would be pretty silly if you couldn't. I have four 3TB drives in RAID-Z and I have 9TB to play with, same as RAID-5.


The command "zpool scrub POOLNAME" will go through and check all the checksums for you, and, you should use either RAID1 or RAIDZ (similar to RAID5) so that if it does detect an error, then the other copy of the data can be used to correct it.

For snapshots - they only get made, if you make them (or setup an automated script that makes them). You can list the snapshots and see how much space each uses, as well.


Flipped bits will be detected and corrected if you're running at least a mirror, which you should be. This is one of the main reasons you should use ZFS for data you want to keep, and one of the reasons why it's so much better than traditional RAID.

You can create snapshots of FS to keep old versions, but how many, and therefore how much space is used, is up to you.




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

Search: