I have a zpool consisting of two mirrored drives, storing all my personal data. I wanted to add another mirror drive, since the other drives have been in use for several years now. Instead, I managed to cripple the pool and cannot import it any longer.
This was the original layout of the pool (called "vault") before I did anything:
vault
mirror-0
sdd
sdh
I tried to add another drive by issuing zpool add vault /dev/sdc
, and got a warning from zpool (something about expecting a vdev, but scd being a disk). I ignored the warning, and forced the operation with -f
(yes, that was pretty stupid ... )
I ended up with the following pool configuration:
vault
mirror-0
sdd
sdh
sdc
Noticing that sdc was not part of the mirror, I tried to remove it from the pool again and realized that this is not possible. I ignored the extra drive and rebooted, and assumed that my data is already safe inside the mirror-0 and decided to use repurpose sdc and use another drive instead, overwriting the first 100MB of sdc with zeros: dd if=/dev/zero of=/dev/sdc bs=1MB count=100
(yes, I am particularly stupid today ... )
Now when I try to import my zpool, I get the following error:
root@atlas:~# zpool import
pool: vault
id: 3553551207657826252
state: UNAVAIL
status: One or more devices are missing from the system.
action: The pool cannot be imported. Attach the missing
devices and try again.
see: http://zfsonlinux.org/msg/ZFS-8000-6X
config:
vault UNAVAIL missing device
mirror-0 ONLINE
sdd ONLINE
sdh ONLINE
Additional devices are known to be part of this pool, though their
exact configuration cannot be determined.
The data in the mirror on these drives is extremely important to me, and I really hope there is a way of restoring the data from the "partial" pool. Since I had rebooted a few minutes after the bogus add
operation, I am assuming that the metadata for the file system was wiped, and that there is a way to access the raw data somehow. But I have no clue where to start.
Can anyone help me with this?