[Hampshire] Mount, bind, and autofs

Top Page

Reply to this message
Author: Chris Dennis
Date:  
To: Hampshire
Subject: [Hampshire] Mount, bind, and autofs
Hello HantsLUGgers

I want to make a backup drive available to users, but only in read-only
mode.

I can do this:

    mount /dev/backupdrive /backups
    mount --bind /backups /backups-readonly
    mount -o remount,ro /backups-readonly


which has the desired effect. (Note that --bind and -o ro can't be used
in the same mount command.)

The tricky bit is that I want to do this via autofs. I can't find a way
to make autofs run two mount commands. Its scripting feature only
creates dynamic configuration files, which doesn't seem to help.

Does anyone have any ideas?

cheers

Chris
-- 
Chris Dennis                                  cgdennis@???
Fordingbridge, Hampshire, UK