Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F158006048
D26333.id76677.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D26333.id76677.diff
View Options
Index: libexec/rc/rc.d/dumpon
===================================================================
--- libexec/rc/rc.d/dumpon
+++ libexec/rc/rc.d/dumpon
@@ -13,6 +13,9 @@
desc="Dump kernel corefiles from swap to disk"
start_cmd="dumpon_start"
stop_cmd="dumpon_stop"
+extra_commands="startzvol stopzvol"
+startzvol_cmd="dumpon_startzvol"
+stopzvol_cmd="dumpon_stopzvol"
dumpon_try()
{
@@ -39,7 +42,7 @@
# early so a crash early in the boot process can be caught.
#
case ${dumpdev} in
- [Nn][Oo] | '')
+ [Nn][Oo] | '' | /dev/zvol/*)
;;
[Aa][Uu][Tt][Oo])
dev=$(/bin/kenv -q dumpdev)
@@ -61,10 +64,34 @@
esac
}
+dumpon_startzvol()
+{
+ # Enable dumpdev on zvol
+ case ${dumpdev} in
+ /dev/zvol/*)
+ dumpon_try "${dumpdev}"
+ ;;
+ *)
+ ;;
+ esac
+}
+
+dumpon_stopzvol()
+{
+ case ${dumpdev} in
+ /dev/zvol/*)
+ rm -f /dev/dumpdev
+ /sbin/dumpon -v off
+ ;;
+ *)
+ ;;
+ esac
+}
+
dumpon_stop()
{
case ${dumpdev} in
- [Nn][Oo] | '')
+ [Nn][Oo] | '' | /dev/zvol/*)
;;
*)
rm -f /dev/dumpdev
Index: libexec/rc/rc.d/zpool
===================================================================
--- libexec/rc/rc.d/zpool
+++ libexec/rc/rc.d/zpool
@@ -4,7 +4,7 @@
#
# PROVIDE: zpool
-# REQUIRE: hostid
+# REQUIRE: hostid disks
# BEFORE: zvol mountcritlocal
# KEYWORD: nojail
Index: libexec/rc/rc.d/zvol
===================================================================
--- libexec/rc/rc.d/zvol
+++ libexec/rc/rc.d/zvol
@@ -5,7 +5,6 @@
# PROVIDE: zvol
# REQUIRE: zpool
-# BEFORE: dumpon
# KEYWORD: nojail
. /etc/rc.subr
@@ -19,6 +18,9 @@
zvol_start()
{
+ if [ -x /etc/rc.d/dumpon ] ; then
+ /etc/rc.d/dumpon startzvol
+ fi
# 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
@@ -41,6 +43,9 @@
;;
esac
done
+ if [ -x /etc/rc.d/dumpon ] ; then
+ /etc/rc.d/dumpon stopzvol
+ fi
}
load_rc_config $name
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, May 28, 10:14 AM (14 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33583352
Default Alt Text
D26333.id76677.diff (1 KB)
Attached To
Mode
D26333: Make zpool on GELI work again.
Attached
Detach File
Event Timeline
Log In to Comment