I’m new to zfs, so .. I have an HDD, entire disk is zfs. It was created on a FreeBSD machine with zpool create command, and is the only disk in the pool. Data was copied into that pool. I’ve then removed the disk and plugged it into another computer. I didn’t do the zpool export, or anything else, I’ve simply powered off the computer and took the disk out. I suppose what I did next was a mistake: I've used zpool create -f, and gave the pool another name. That created new, empty pool. Nothing was written into that pool. Typing zpool import returns name of the new pool, and nothing else. Is there a way to recover my old pool and the data?


I found the answer here, https://superuser.com/questions/985279/restore-zfs-pool-after-creating-over-it

recovery would be next to impossible in my case, So I'd have to copy the data again

  • Sorry, it's bad news. You will need to restore from backup. Also be aware that zpool create gives a warning, but it isn't specific about destroying the data. Other people who read this in the future should be aware of those warnings and double check that there isn't wanted data before creating the new zpool. Feb 16 '19 at 15:42
  • It did give the warning. Somehow, it sounded similar to NTFS, when windows doesn't close properly and then you mount that disk you have to force the write mode. I agree, the warning should be more explicit, like fdisk warning when you rewrite partition table.
    – Pav El
    Feb 16 '19 at 16:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.