2 # Copyright (c) 2005 Oracle
5 # chkconfig: 2345 25 19
6 # description: Mount OCFS2 volumes at boot.
9 # Source function library
10 . /etc/rc.d/init.d/functions
13 . /etc/sysconfig/network
16 [ -f /etc/sysconfig/ocfs2 ] && . /etc/sysconfig/ocfs2
18 # Check that networking is up.
19 if is_yes "${NETWORKING}"; then
20 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
21 msg_network_down OCFS2
42 LC_ALL=C awk '$3 == "ocfs2" { print $2 }' /proc/mounts
47 LC_ALL=C awk '!/^#/ && $3 == "ocfs2" && $4 !~ /noauto/ { print $2 }' /etc/fstab
54 if [ ! -f /var/lock/subsys/ocfs2 ]; then
55 if [ -n "`ocfs2fstab`" ] ; then
56 run_cmd "Mounting OCFS2 filesystems" mount -a -t ocfs2
57 touch /var/lock/subsys/ocfs2
60 msg_already_running "OCFS2 filesystems"
64 show "Oracle Cluster File System (OCFS2) "
66 remaining="`ocfs2mounts`"
69 while [ -n "$remaining" -a "$retry" -gt 0 ]
71 if [ "$retry" -lt 3 ]; then
72 echo -n "Retry stopping Oracle Cluster File System (OCFS2) "
74 umount -a -t ocfs2 > /dev/null 2>&1
77 remaining="`ocfs2mounts`"
78 [ -z "$remaining" ] && break
79 failure_status "Unable to unmount OCFS2 filesystems"
81 /sbin/fuser -k -m $sig $remaining
86 [ -z "$remaining" ] && ok
87 rm -f /var/lock/subsys/ocfs2
94 if [ -f /proc/mounts ] ; then
95 [ -n "`ocfs2fstab`" ] && {
96 echo "Configured OCFS2 mountpoints: " `ocfs2fstab`
99 [ -n "`ocfs2mounts`" ] && {
100 echo "Active OCFS2 mountpoints: " `ocfs2mounts`
103 echo -n "Checking OCFS2 mountpoints: "
107 try-restart|condrestart)
114 msg_usage "$0 {start|stop|status|reload|force-reload|restart|try-restart}"