ZFS The pool metadata is corrupted, how to get your data out of the corrupted zpool?

I have to double check, but I am not sure, the /root home folder, where GPG keys are stored is that located under zroot/ROOT/default? Or does that come via zroot , the highest level ...
Correct the root is located in the dataset zroot/ROOT/default, all mount points that are not specified separately, such as zroot/var, will depend on and be located in zroot/ROOT/default.

zfs list -o name,mountpoint
 
Hi,

To summarize these are the steps, some of the actions you need to repeat for each dataset:

Source:
1. Start your machine in single boot modus
2. Choose shell
3. Set keyboard layout with kbdmap
4. Decrypt disk with geli: geli attach ada0p3
5. Set ip: ifconfig em1 inet 10.0.2.10 netmask 255.255.255.0
6. Next get object id of dataset to send to another server
zdb -d zroot/media/book -e

Destination:
1. Start the destination also in single boot modus
2. Choose shell
3. Set keyboard layout with kbdmap
4. Decrypt disk with geli: geli attach ada0p3
5. Import pool:
zpool import zroot
6. The destination server is 10.0.2.11:
ifconfig em1 inet 10.0.2.11 netmask 255.255.255.0
7. Destination listens and receive it in a new dataset:
nc -l 4242 | zfs receive zroot/media/book

Source:
1. Then I copy it to another machine:
zdb -B zroot/115478 -e | nc 10.0.2.11 -p 4242
2. When the command fails with a dump error, I think it means that this dataset is corrupt.

Then the destination will try to mount the new dataset but that will fail. Ignore that error.

When finished with all datasets reboot the destination and start normally. Then all datasets will be visible and mounted.

It's quiet time-consuming.
 
I do notice a difference in one dataset when comparing space on zfs versus du:

Code:
user1@vm1:/usr/home % zfs list zroot/usr/home
NAME             USED  AVAIL  REFER  MOUNTPOINT
zroot/usr/home  8.10G  2.93G  8.10G  /usr/home

user1@vm1:/usr/home % du -chxs *
327M    user1
327M    total
user1@vm1:/usr/home %

There are no reservations, no duplication, no hidden folders, ...
 
Back
Top