Recovering a Faulty ZFS Root FreeBSD System

Why this post?

I am running a FreeBSD system with a ZFS root filesystem.  This was described in a previous post, here.  I suspected the one of the drives is faulty and hoped this would prove a useful test for RAIDZ1.  But two days ago, the system refused to boot because it couldn’t mount the root filesystem.  This describes how I recovered the system.


1 Boot the host from the FreeBSD Install DVD.

2. Begin installation; select keyboard and hostname, then drop out to the shell at the first opportunity.

3. Import and repair the root filesystem.

# zpool import -f -o altroot=/mnt zroot
# zpool scrub zroot

4. Check the progress of the repair and wait until it’s finished.

# zpool status

5. Reboot the system

# reboot

Further Comments

Interestingly, zpool status did not report any problems with the physical disks.  Once repaired, the system worked correctly.


~ by kbw333 on September 3, 2012.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: