Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I caused a stupid accident in a single-disk ZFS pool, seemingly in the same way as the person in this mailing list thread, i. e., I seem to have overwritten important metadata. Can this be restored from the actual payload, or is there a way to retrieve the payload without the metadata?

Here's what I did, exactly:

  • had a ZFS pool running with a single disk on one machine
  • wanted to migrate it to a new ZFS pool on another machine
  • forgot to zpool export it on the first machine
  • when zpool create complained that the device was in use, I thought "No problem, I just took down the host, it's not in use anymore" and did zpool create -f

What I should have done (as I realised after RTFM) is import instead of create on the new host. Now I have a working zfspool, but the filesystems are gone / invisible.

I tried to reimport the device on the old host, and later tried import -D, but, quite obviously, both didn't work.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Well first things first I'd get a bit stream copy of the disk before trying anything.

Does a zpool import -D do anything?

If I'm honest I don't think it because the new pool has overwritten all labels, blocks and pointer blocks of the original pool.

share|improve this answer
    
No, import -D doesn't do anything, which is probably not surprising, as I didn't destroy the old pool, I "just" overwrote it. Ouch. –  Hanno Fietz Mar 2 '10 at 12:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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