[Ocfs2-tools-devel] [PATCH 07/14] o2cb: mount debugfs when load config

Joseph Qi joseph.qi at huawei.com
Tue Apr 12 20:18:38 PDT 2016


On 2016/4/1 11:10, Junxiao Bi wrote:
> o2hbmonitor depends on debugfs to work, mount it when
> load the config.
> 
> Signed-off-by: Cathy A Avery <cathy.avery at oracle.com>
> Signed-off-by: Adnan G Misherfi <adnan.misherfi at oracle.com>
> Signed-off-by: Junxiao Bi <junxiao.bi at oracle.com>

Reviewed-by: Joseph Qi <joseph.qi at huawei.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 e2f80f797680..dedb408f1317 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
>  }
>  
>  #
> 





More information about the Ocfs2-tools-devel mailing list