3 ms·
Can I add another gotcha - if you have a failed device in zfs and you can't import the pool anymore, don't think you can walk the drive and put the blocks back
by benjohnson 6y ago
Can I add another gotcha - if you have a failed device in zfs and you can't import the pool anymore, don't think you can walk the drive and put the blocks back together manually.
You can do this in FAT and mostly in NTFS and UFS - especially if your drive is defragmented.
But the complicated data structures of ZFS makes this really hard if not close to impossible - there are tools and ways of using ZFS code to help you do this, but they are exceedingly hard to use.
Source: took me 52 hours to retrieve a 16k file from a failed device. Granted it would take me less time now, but I now think of devices the have failed as if they has completely disappeared from our universe.
- mulmen 6y ago> I now think of devices the have failed as if they has completely disappeared form our universe. I interpret this in the same way as “The network is compromised.” It may not be literally true but you can avoid pain by always assuming it is true and acting accordingly.
- dehrmann 6y ago10-ish years ago, I had a pool where my log device was irrecoverable. I just lose the last ~minute of writes, right? Nope; the pool wouldn't mount. I had to research the internals of zfs and create a dummy log device and rewrite the id the pool expected. I'm told this has been fixed.
- simcop2387 6y agoIt has been, I had a log device fail and was able to import the pool just fine. Had to do it manually though because the automated scripts at boot didn't like it which is a fine default since erroring out by default when something is fishy is a good idea.
- pstrateman 6y agoThat's been fixed for... 10-ish years. You can now mount a pool without the log device and only lose what was in the log, with just a flag to import.
- economusty 6y agoThat would make for a great tutorial.
- unilynx 6y agoReiserFS could apparently actually do that, rebuilding the FS by scanning the blocks... and would even merge contained ReiserFS images (for eg. virtual machines) into the top level FS. No personal experience though, but see https://lwn.net/Articles/470517/ https://lwn.net/Articles/470517/