Solved Zfs cannot import pool anymore but all files still readable in readonly mode

Hi,

All trouble on one day, a few hours ago my VM crashed and now all a sudden I cannot start it anymore. I can import the pool in readonly modus and can see my files. But from the moment i import it in Read Write it gives a kernel panic and reboots.

I would like to do 2 things:
1. Secure my data
2. Know the rootcause
3. Try to fix it still if possible

There is 1 snapshot on the filesystem, this snapshot should work. But more recent data is on the system, all the data is there but i cannot open it.

Any thoughts here?

Best Regards,

R
 
* Meanwhile I tried to attach a device to resilver the new device (more space) to have a copy but that does not seem to work from a readonly pool.
* In a second attemp I tried to send the snapshots to a new device with a new pool, that worked. But I get a error that it cannot find the bootloader, althought i did following command:
Code:
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada1
 
Hi,

Here is the output of gpart show:

VirtualBox_vm1_13_01_2020_19_41_40.png


Don't care about ada1, that's a disk i attached to copy some important data.

How can i check the boot legacy BIOS or UEFI? But i think it's legacy bios it's VM in windows running in Virtualbox.

There is only 1 disk, and I am stuck because i cannot even revert to snapshot as i get kernel panic as soon as the zroot pool opens. I choose a default installation for that VM , with only 1 pool (name: zroot). It run perfect for 1,5 year and now suddenly this. No major changes done lately , 1 week ago some port upgrades that's it.

Thanks for your reply.

Best Regards,

R
 
Here some more snaps:
VirtualBox_vm1_13_01_2020_19_49_40.png


VirtualBox_vm1_13_01_2020_19_49_16.png


VirtualBox_vm1_13_01_2020_19_50_55.png


But above data is all i see when importing the pool from single boot mode via life cd , importing the pool in readonly mode.
 
ada1, for the best I can see, doesn't have a freebsd-boot partition.
So, when you executed gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada1, you must have destroyed the beginning of ada1p1 (unless some error messages have appeared) which is a freebsd-zfs partition where you copied your important data if I well understood.

VirtualBox is able to boot either in legacy BIOS or UEFI (configuration of the VM, system / motherboard). Your installation on ada0 seems to be able to boot in both modes.

However, I think I can't help you for the recovery of your freebsd-zfs partition. But for sure, some people here can.

An advice: just describe what you get when you try to boot your original configuration (just ad0 plugged).
 
ada1, for the best I can see, doesn't have a freebsd-boot partition.
So, when you executed gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada1, you must have destroyed the beginning of ada1p1 (unless some error messages have appeared) which is a freebsd-zfs partition where you copied your important data if I well understood.

VirtualBox is able to boot either in legacy BIOS or UEFI (configuration of the VM, system / motherboard). Your installation on ada0 seems to be able to boot in both modes.

However, I think I can't help you for the recovery of your freebsd-zfs partition. But for sure, some people here can.

An advice: just describe what you get when you try to boot your original configuration (just ad0 plugged).
Hi,

Ok, some context I did not described, one hour ago ada1 had the same structure as ada0 when I did a gpart show. What i mean is that i created also a freebsd-boot, freebsd-swap and freebsd-zfs. I did not receive any error when executing gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada1 . I thought normally that should do it but for some reason not. Then I erased ada1 again and just created a simple standalone pool to use the cp -a so at least I have the data somewhere.

Ok i will give it another shot, the kernel panic is so quick i cannot really see the error, even when recording it I could not see it.
 
Hi,

I am going to delete this VM state, I need to space assigned to it. But would still be useful that somebody would help me with the general steps to find out the root cause in this kind of situation.
Best Regards,

R
 
Back
Top