3 ms·
Sorry in advance if this is a stupid question: my main Linux system is a laptop with a small SSD drive. I would like to organize my entire digital life on a 2 T
by mark_l_watson 11y ago
Sorry in advance if this is a stupid question: my main Linux system is a laptop with a small SSD drive. I would like to organize my entire digital life on a 2 TB external USB drive, and be able to maintain a clone of everything on at least one other 2 TB USB drive.
Is ZFS the right tool for this?
- ryao 11y agoI have backups stored on a double mirror of USB drives. The USB interface is fragile, but it does work. I cannot say that I recommend USB drives though, but if you are using USB, ZFS is not at any disadvantage versus other filesystems. For what it is worth, I am this ryao: https://github.com/zfsonlinux/zfs/graphs/contributors https://github.com/zfsonlinux/zfs/graphs/contributors
- dsr_ 11y agoIt's a tool that could work. You can use zfs send/receive to clone a zfs filesystem or snapshot. You could also use rsync, duplicity, or a bunch of other tools. The major zfs advantage here is that all your files get integrity checking.
- lmm 11y agoIf you're talking about a "static" setup where you attach both at the same time or not at all, yes. ZFS export before unplugging, ZFS import when plugged in, I can see it working very nicely. If you're talking about using one of them most of the time and syncing occasionally then any filesystem will do, you'll want a user-level tool for doing the sync (probably - sibling did mention zfs send which I don't have any experience with).
- berdario 11y agoI read some time ago that ZFS is definitely NOT the right tool for laptop/external storage, unless you actually have a zpool with mirroring/raidz (which means you have to always keep the devices connected). The reason is that when ZFS detects corruption, it'll lock down the whole fs... and prevent reading/recovery data from it, as recovering data from raidz is the expected solution in that case. I tried to google again for the description of this issue, but I couldn't find it... I found this otoh: https://groups.google.com/a/zfsonlinux.org/forum/#!topic/zfs-discuss/VEV-uKUzP14 https://groups.google.com/a/zfsonlinux.org/forum/#!topic/zfs... And things aren't that obvious, apparently: > Even without redundancy and "zfs set copies", ZFS stores two copies of all metadata far apart on the disk, and three copies of really important zpool wide metadata. Whichn means that this might not actually be a problem after all
- Freaky 11y ago> The reason is that when ZFS detects corruption, it'll lock down the whole fs... and prevent reading/recovery data from it Depends on what exactly is corrupt, but for file corruption it's generally just a case of warnings in logs/zpool status (which will suggest restoring the file from backup), and IO errors trying to access that specific file. The pool itself should remain intact and online. It's less clear cut if it's important metadata that's damaged, but as you mention, ZFS is quite aggressive about maintaining multiple copies even on standalone devices.
- ryao 11y ago> The reason is that when ZFS detects corruption, it'll lock down the whole fs... and prevent reading/recovery data from it, as recovering data from raidz is the expected solution in that case. ZFS has duplicate metadata by default, so it can recover from corrupted metadata blocks unless too much is gone. If the data blocks are corrupted and there is no resundancy, you should get EIO. There is no code to "lock down the FS", although if you have severe damage (like zeroing all copies of important metadata or losing all members of a mirror), it will die and you will see faulted status. That is a situation no storage stack can survive and is why people should have backups.