Skip to content

Commit

Permalink
Merge pull request #901 from oalbrigt/Filesystem-submount-check
Browse files Browse the repository at this point in the history
Filesystem: check if there are any mounts mounted under the mountpoint
  • Loading branch information
krig committed Dec 15, 2016
2 parents f341fdf + 09e27d0 commit e955cab
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions heartbeat/Filesystem
Expand Up @@ -395,6 +395,12 @@ fstype_supported()
#
Filesystem_start()
{
# Check if there are any mounts mounted under the mountpoint
if list_mounts | grep -q -E " $MOUNTPOINT/\w+" >/dev/null 2>&1; then
ocf_log err "There is one or more mounts mounted under $MOUNTPOINT."
return $OCF_ERR_CONFIGURED
fi

# See if the device is already mounted.
if Filesystem_status >/dev/null 2>&1 ; then
ocf_log info "Filesystem $MOUNTPOINT is already mounted."
Expand Down

0 comments on commit e955cab

Please sign in to comment.