Index: libexec/rc/rc.d/zvol =================================================================== --- libexec/rc/rc.d/zvol +++ libexec/rc/rc.d/zvol @@ -17,8 +17,20 @@ stop_cmd="zvol_stop" required_modules="zfs" +zvol_import() +{ + 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 +} + zvol_start() { + zvol_import # Enable swap on ZVOLs with property org.freebsd:swap=on. zfs list -H -o org.freebsd:swap,name -t volume | while read state name; do