Zfs: failed with error 6 in FreeBSD
Environment:
After the kernel is re-compiled by zf under FreeBSD and the kernel is installed and restarted, the following prompt is displayed: zfs: failed with error 6, and then mountroot>.
This is a rare zfs error code, usually 2 or 19.
Tracking:
Looking at the last line, A guid is still displayed, so it is suspected that the problem still exists in the gpt.
After adding two lines to loader. conf, the problem persists:
Kern. geom. label. gptid. enable = "0"
Kern. geom. label. disk_ident.enable = "0"
The reason for adding these two lines is that during installation, the target is "adap3". If the two lines are not available, the disk is displayed as the guid format, and the zfs pool cannot find the disk, thus Error 2 is generated. [Helper's house www.bkjia.com]
Add the following line to display zfs debugging information. However, the last line is still in guid format because the USB keyboard is unavailable.
Vfs. zfs. debug = "1"
Boot_pause = "YES"
Finally, we re-filtered the kernel configuration and found that three items were commented out:
Options GEOM_PART_GPT # GUID Partition Tables.
# Options GEOM_RAID # Soft RAID functionality.
Options GEOM_LABEL # Provides labequalation
These three items are closely related to guids, and are suspected to be related to them. Therefore, add the following two lines to loader. conf and restart:
Geom_label_load = "YES"
Geom_part_gpt_load = "YES"
It started successfully!
Cause:
If the GEOM-related options are disabled in the kernel, The geom system does not work properly.
Solution:
Note: Re-compile the kernel:
Options GEOM_PART_GPT # GUID Partition Tables.
# Options GEOM_RAID # Soft RAID functionality.
Options GEOM_LABEL # Provides labequalation
This article permanently updates the link address: