1

The following line:

/path1  /path2  posixovl    none    0   0

fails with the error:

/sbin/mount.posixovl: invalid option -- 'o'
Usage: /sbin/mount.posixovl [-F] [-S source] mountpoint [-- fuseoptions]

This is because mount.posixovl uses a non standard mount syntax, and fstab will call it assuming default mount syntax, eg.

mount.posixovl /path1 /path2 -o [whatsoever_/etc/fstab_options]

EDIT #1: Same problem, solved with an uglier hack in this linuxquestions.org Q&A titled: [SOLVED] How to get a fuse-posixovl partition mounted at bootup?

1

I wrote a wrapper for mount.posixovl that enables it to be used with fstab

First, rename /sbin/mount.posixovl to something else, like /sbin/mount.posixovl.orig

Finally, create a new file /sbin/mount.posixovl whith the following contents:

#!/bin/bash
# wrapper for mount.posixovl to conform with common mount syntax
# with this wrapper posixovl can be used in fstab

# location of the original mount.posixovl
origposixovl="/sbin/mount.posixovl.orig"

# gather inputs
while [ $# -gt 0 ]; do
        if [[ "$1" == -* ]]; then
                # var is an input switch
                # we can only use the -o or -F switches
                if [[ "$1" == *F* ]]; then
                        optsF="-F"
                else
                        optsF=""
                fi
                if [[ "$1" == *o* ]]; then
                        shift
                        optsfuse="-- -o $1"
                else
                        optsfuse=""
                fi
                shift
        else
                # var is a main argument
                sourcedir="$1"
                shift
                if [[ "$1" != -* ]]; then
                        targetdir="$1"
                        shift
                else
                        targetdir="$sourcedir"
                fi
        fi
done

# verify inputs
if [ "$sourcedir" == "" ]; then
        echo "no source specified"
        exit 1
fi
if [ "$targetdir" == "" ]; then
        echo "no target specified"
        exit 1
fi

# build mount.posixovl command
"$origposixovl" $optsF -S "$sourcedir" "$targetdir" $optsfuse

Naturally, set the newly created /sbin/mount.posixovl to be executeable (chmod +x /sbin/mount.posixovl)

I hope this can help someone in the future with mounting posixovl trough fstab

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.