ZFS 'mount error 5' hits production server

Michael Schmiedgen schmiedgen at gmx.net
Thu Dec 4 01:07:01 UTC 2014


On 12/04/2014 01:47, Steven Hartland wrote:
> Unfortunately error 5 isn't very helpful as that's just EIO :(
>
> When booted from the old kernel try moving out the cache file e.g.
> mv /boot/zfs/zpool.cache /boot/zfs/zpool.cache.old
>
> If for some reason your cache file and your disks are out of sync that
> might help.

Ok, will try this.

> Also ensure your loading zfs in /etc/rc.conf
> zfs_enable="YES"

It was there.

> Check you don't have anything zfs custom in /boot/loader.conf
>
> You should just have the two zfs related lines such as:
> zfs_load="YES"
> vfs.root.mountfrom="zfs:tank/root"

It was there. I commented all others out.

> Your pool layout does look a little odd from your zpool get all as
> bootfs seems to be set to just "tank" is that correct as its quite none
> standard? If not and your root is tank/root then that might also be your
> issue.

It is tank. Back in 2012 there was no installer with ZFS features,
it was done manually, with gnop trick and aligned partitions. Datasets
are used for certain purposes, but kernel and userland resides on the
root dataset 'tank'.

> Next up there should be no need for mountpoint legacy / should do just
> fine.
>
> If you do have a single partition install you might want to consider
> switching to something more standard which looks something like:
> NAME             USED  AVAIL  REFER  MOUNTPOINT
> tank             853G   292G  46.5K  none
> tank/root       21.6G   292G  21.3G  /
> tank/root/tmp   11.2M   292G  11.2M  /tmp
> tank/root/var    270M   292G   270M  /var
>
> Oh and ensure your boot loader has been updated:
> gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0
> gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada1

I have already done this, at least the gpt zfs bootcode.

So I will give the cache file a try when I am at work tomorrow and
report back.

Thank you, much appreciated!
   Michael



More information about the freebsd-stable mailing list