ocfs2-tools/0006-o2cb-mount-debugfs-when-load-config.patch
Goldwyn Rodrigues ba2ae35d8f Accepting request 330115 from home:ZRen:branches:network:ha-clustering:Factory
Add systemd support for o2cb and ocfs2 service. 

1. I've tested changes on opensuse13.2 and sle12 sp1. It works well. 
2. Backforward compatible.
3. It will be added into sle12 once it become mature in opensuse.

OBS-URL: https://build.opensuse.org/request/show/330115
OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/ocfs2-tools?expand=0&rev=84
2015-09-22 12:30:33 +00:00

80 lines
1.9 KiB
Diff

From: Junxiao Bi <junxiao.bi@oracle.com>
To: <ocfs2-tools-devel@oss.oracle.com>
Date: 6/29/2015 4:29 PM
Subject: [Ocfs2-tools-devel] [PATCH 4/6] o2cb: mount debugfs when load config
o2hbmonitor depends on debugfs to work, mount it when
load the config.
Signed-off-by: Cathy A Avery <cathy.avery@oracle.com>
Signed-off-by: Adnan G Misherfi <adnan.misherfi@oracle.com>
Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
---
vendor/common/o2cb.init.sh | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/vendor/common/o2cb.init.sh b/vendor/common/o2cb.init.sh
index e2f80f7..dedb408 100755
--- a/vendor/common/o2cb.init.sh
+++ b/vendor/common/o2cb.init.sh
@@ -1315,10 +1315,25 @@ check_load_module()
return 2
}
+check_debugfs_mount()
+{
+ echo "checking debugfs..."
+
+ mount | grep debugfs | grep /sys/kernel/debug > /dev/null
+ if [ "$?" -eq "1" ]
+ then
+ mount -t debugfs nodev /sys/kernel/debug
+ fi
+}
+
+
+
load()
{
PLUGIN="$(select_stack_plugin)"
+ check_debugfs_mount
+
touch_lockfile
# XXX: SPECIAL CASE! We must load configfs for configfs_path() to work
@@ -1820,6 +1835,16 @@ online_status()
online_status_$PLUGIN "$CLUSTER"
}
+debugfs_mount_status()
+{
+ if mount | grep debugfs | grep /sys/kernel/debug > /dev/null
+ then
+ echo "Debug file system at /sys/kernel/debug: mounted"
+ else
+ echo "Debug file system at /sys/kernel/debug: not mounted"
+ fi
+}
+
status()
{
load_status
@@ -1833,6 +1858,8 @@ status()
online_status "$CLUSTER"
userdlm_status
+
+ debugfs_mount_status
}
#
--
1.7.9.5
_______________________________________________
Ocfs2-tools-devel mailing list
Ocfs2-tools-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-tools-devel