J
jpaetzel
Guest
This post is howto for what to do when ZFS has failed you. Generally you'll be interested in this when FreeNAS is panicing at boot. You've discovered that the reason the system is panicing is during the ZFS pool import.
Step 1. Don't panic.
Step 2.
Reboot FreeNAS, and select the Escape to Loader option in the boot menu.
In the attached screenshot it's option 6.
enter the following commands:
set vfs.zfs.recover=1
set vfs.zfs.debug=1
boot -s
This will get you to the following screen, go ahead and press enter to start /bin/sh
# sh /etc/rc.initdiskless
Now you are ready to start trying to import your pools.
First pass is just trying a straight import:
# zpool import -R /mnt poolname
If this works, great. Backup your data and life goes on.
If you get a panic then repeat the above steps, but try:
# zpool import -o readonly=on -R /mnt poolname
If this works your pool imported read only. Backup your data and life goes on.
As a final desperation move, or after you've managed to import the pool readonly and copy everything off you can try:
# zpool import -R /mnt -FX poolname
The above command has a good chance of grenading your pool, but it also has a chance of importing it.
ZFS is very robust, but non ECC RAM and desktop drives can cause problems that it can't fix, especially in larger pool configurations.
Step 1. Don't panic.
Step 2.
Reboot FreeNAS, and select the Escape to Loader option in the boot menu.

In the attached screenshot it's option 6.
enter the following commands:
set vfs.zfs.recover=1
set vfs.zfs.debug=1
boot -s
This will get you to the following screen, go ahead and press enter to start /bin/sh

# sh /etc/rc.initdiskless
Now you are ready to start trying to import your pools.
First pass is just trying a straight import:
# zpool import -R /mnt poolname
If this works, great. Backup your data and life goes on.
If you get a panic then repeat the above steps, but try:
# zpool import -o readonly=on -R /mnt poolname
If this works your pool imported read only. Backup your data and life goes on.
As a final desperation move, or after you've managed to import the pool readonly and copy everything off you can try:
# zpool import -R /mnt -FX poolname
The above command has a good chance of grenading your pool, but it also has a chance of importing it.
ZFS is very robust, but non ECC RAM and desktop drives can cause problems that it can't fix, especially in larger pool configurations.