cancel
Showing results for 
Search instead for 
Did you mean: 

RHEL5 refresh unionfs mount

DavidJ
Regular Advisor

RHEL5 refresh unionfs mount

Gurus Good day,

 

I have setup a "unionfs mount" on one of my Linux systems, RHEL5, and would like to know how I can 'refresh' the mount point.

 

As an example I have deleted a file on the unionfs mount, unmounted it and remounted it, the file I removed still 'appears to be deleted, even though I can see it in the actual directory.

 

How can I  force a refresh of the unionfs mount?

Below is the script I used to unmount and remount, I have tried to mount -t unionfs ........ (as in the script, with a remount option but get the error below

 

fuse: unknown option `remount'
FATAL: unionfs mount failed!

 

#!/bin/bash

# Manage local unionfs mounts
MOUNTPOINT="$HOME/local"
DEFAULTBASE="/code/dev"
DEFAULTOVERLAY="$HOME/adminsys"

function die() {
        echo "FATAL: $@"
        exit 1
}

while getopts "b:o:u" OPT ; do
        case "$OPT" in
        "b") BASE="$OPTARG";;
        "o") OVERLAY="$OPTARG";;
        "u") UNDO=1;;
        esac
done

BASE=${BASE:-$DEFAULTBASE}
OVERLAY=${OVERLAY:-$DEFAULTOVERLAY}

                fusermount -u "$MOUNTPOINT"
echo "Unmounting file system, please wait............................"
sleep 10

if mount | grep -q "$MOUNTPOINT"; then
        #Mounted
        :
else
        # Not Mounted
         unionfs -o cow,uid=$(id -u),gid=$(id -g),umask=022,allow_other "$OVERLAY=RW:$BASE=RO" "$MOUNTPOINT" || die "unionfs mount failed!"
fi
~

 

Any ideas.................

 

Regards

 

David

Everyday I beat my own previous record for number of consecutive days I've stayed alive.