Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
As of r364746 (OpenZFS import) existing ZPOOLs are not imported
prior to zvol and mountcritlocal resulting in ZVOLs (swap and virtual machine UFS filesystems) being unavailable, leading to boot failures. We move the zpool import from zfs to a new zpool script, with the -N option to avoid mounting datasets while making the ZPOOL's datasets available for "legacy" mount (mountpoint=legacy) and ZVOLs available for subsequent use for swap (in the zvol rc sript) or for UFS or other filesystems in fstab(5), mounted by mountcritlocal. Reviewed by: freqlabs (previous version) Differential Revision: https://reviews.freebsd.org/D26185
- Loading branch information
Showing
5 changed files
with
34 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -318,6 +318,7 @@ CONFGROUPS+= ZFS | |
ZFS+= zfs | ||
ZFS+= zfsbe | ||
ZFS+= zfsd | ||
ZFS+= zpool | ||
ZFS+= zvol | ||
.endif | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/sh | ||
# | ||
# $FreeBSD$ | ||
# | ||
|
||
# PROVIDE: zpool | ||
# REQUIRE: hostid | ||
# BEFORE: zvol mountcritlocal | ||
# KEYWORD: nojail | ||
|
||
. /etc/rc.subr | ||
|
||
name="zpool" | ||
desc="Import ZPOOLs" | ||
rcvar="zfs_enable" | ||
start_cmd="zpool_start" | ||
required_modules="zfs" | ||
|
||
zpool_start() | ||
{ | ||
local cachefile | ||
|
||
for cachefile in /boot/zfs/zpool.cache /etc/zfs/zpool.cache; do | ||
if [ -r $cachefile ]; then | ||
zpool import -c $cachefile -a -N | ||
fi | ||
done | ||
} | ||
|
||
load_rc_config $name | ||
run_rc_command "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
# | ||
|
||
# PROVIDE: zvol | ||
# REQUIRE: hostid | ||
# REQUIRE: zpool | ||
# BEFORE: dumpon | ||
# KEYWORD: nojail | ||
|
||
|