Am 18.04.13 10:42, schrieb Anders Wallén:
> Explicits!
>
> I accidentally pulled the USB cord out and lost the array. The Mac Mini force-rebooted itself too.
Expected and document behavior. No reason for the operator to panic too.
> The array wouldn't automatically remount, and the manual mounting commands didn't work either,
Depending on storage technology used, this is either expected to
happen (i.e. with any kind of USB enclosure) or possible behavior in
case of bad luck (pretty much any other technology).
the reason is, that such an event can (and for USB usually will)
result in out-of-order writes and/or partial writes. As such, it
destroys the last ueberblock and possibly other meta data.
> so I re-created the array [sudo zpool create array raidz2 [list of disc names here]], which now looks empty.
Bad idea. You voluntarily destroyed the pool. Why are surprised its
empty now?
OT:
There two things I will *never* understand why people are doing it:
- Why on earth are people *first* yanking a disk (or worse: zeroing
it) and *then* issuing a "zpool replace" against the now missing or
totally blank disk?!?
Seen a couple of times on various ZFS mailing lists. That is a save
way to destroy pool.
- Why on earth are people carelessly issuing "zpool create" in various
circumstances? (No, you are not first to do that, Anders!)
/OT
> Did I just erase the whole thing? Or is there anything I can do to restore it?
Yes, you erased it.
No, recovering from this stage is possible, but an expert thing. You
need to find someone doing professional data recovery from ZFS.
Basically, the job is to scan the disk block-by-block for fragments of
the MOS and try to reassemble a recent version of the MOS. Once found,
construct a matching ueberblock, and do a modified "zfs send" (i.e.
never-ever checkpoint the send position to disk, because we don't
really know which block are free and as such save to write --
alternatively, try to also reconstruct the spacemaps (ZDB can do that)
to be able to write to the pool) of the whole pool to a new one.
> Any help would be greatly appreciated,
Sorry, but any help from this point on will probably be expensive.
Best regards
Björn
--
| Bjoern Kahl +++ Siegburg +++ Germany |
| "googlelogin@-my-domain-" +++
www.bjoern-kahl.de |
| Languages: German, English, Ancient Latin (a bit :-)) |