On Fri, Oct 24, 2014 at 01:41:53PM -0500, Tilghman Lesher wrote:
> I have an issue for which I haven't been able to come up with a good
> solution.  We have a backup solution whereby multiple disks, attached
> via USB, are used for backups.  Normally, those disks are mounted
> automatically with udev, so backups can proceed normally.  The problem
> comes in when the disks are not attached, and the backup process runs,
> writing to the same directory, which fills up the root disk.
> 
> What I'd like to have is the ability to designate specific directories
> as mount-only and deny all writes to those directories, if the disk
> normally mounted there is missing.  Any ideas on how to do something
> like this?  Currently, we're using the workaround of removing the
> mount point when the disk is unmounted, but that tends to be fragile,
> as we've already found out (where a directory didn't get removed and
> the root disk was filled).

Tested and works on linux.  chattr +i the mount point.  Nothing,
including root, can write to the directory itself however mounts on top
of the directory work fine.




                                                        John
-- 
I do not envy people who think they have a complete explanation of the
world, for the simple reason that they are obviously wrong.

-- Salman Rushdie (1947-), Indian-born British author, Salman Rushdie
   Talking with David Frost (1993)

Attachment: pgpfszNT6XeJU.pgp
Description: PGP signature

Reply via email to