misc/129539: ZFS Boot from single drive or mirror with raidz data
pack
Paul Wootton
paul at fletchermoorland.co.uk
Tue Dec 9 15:10:02 PST 2008
>Number: 129539
>Category: misc
>Synopsis: ZFS Boot from single drive or mirror with raidz data pack
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Dec 09 23:10:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Paul Wootton
>Release: FreeBSD 8.0
>Organization:
>Environment:
FreeBSD wasp.caspersworld.co.uk 8.0-CURRENT FreeBSD 8.0-CURRENT #1: Sat Dec 6 22:49:23 UTC 2008 paul at wasp.caspersworld.co.uk:/usr/obj/usr/src/sys/WASP amd64
>Description:
When booting from a single ZFS disk or mirror pack with a raidz pack also present, the system just cyclic boots with the following error
ZFS: can only boot from disk or mirror vdevs
ZFS: inconsistent nvlist contents
This is caused because we forgot to check the return code of vdev_init_from_nvlist(vdevs, &top_vdev) from with the vdev_probe() function in /usr/src/sys/boot/zfs/zfsimple.c on line 726
>How-To-Repeat:
Set up bootable ZFS single drive or mirror pack and then introduce a raidz pack as well
>Fix:
Check the return code of vdev_init_from_nvlist(vdevs, &top_vdev) from with the vdev_probe() function in /usr/src/sys/boot/zfs/zfsimple.c on line 726
Patch attached with submission follows:
*** zfsimpl.c Wed Nov 19 16:59:19 2008
--- zfsimpl.c.fix Tue Dec 9 22:48:36 2008
***************
*** 721,731 ****
if (nvlist_find(nvlist,
ZPOOL_CONFIG_VDEV_TREE,
DATA_TYPE_NVLIST, 0, &vdevs)) {
return (EIO);
}
! vdev_init_from_nvlist(vdevs, &top_vdev);
/*
* Add the toplevel vdev to the pool if its not already there.
*/
STAILQ_FOREACH(pool_vdev, &spa->spa_vdevs, v_childlink)
--- 721,733 ----
if (nvlist_find(nvlist,
ZPOOL_CONFIG_VDEV_TREE,
DATA_TYPE_NVLIST, 0, &vdevs)) {
return (EIO);
}
! int initRetVal = vdev_init_from_nvlist(vdevs, &top_vdev);
! if(initRetVal)
! return initRetVal;
/*
* Add the toplevel vdev to the pool if its not already there.
*/
STAILQ_FOREACH(pool_vdev, &spa->spa_vdevs, v_childlink)
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list