tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: mount race prevention



> So, my first question would be, what precisely is it you're trying to
> prevent?
I want to prevent B to mount something on a temporary mount point already 
in use by A. I.e., A sees the mount point is free, B sees it's free, 
A mounts, B mounts, and A operates on the wrong thing.

I have scripts that operate on snapshots they take. I.e., when I backup 
/export/home, I look for an unused fss device, take an ffs snapshot of 
/dev/dk5 on it, mount it, backup it, unmount, fssconfig -u.
The problem is I need a temporary mount point like /mnt which (highly 
unlikely) could be in use by another (incarnation of the same) script.
Yes, I guess I could be using temporary entries in /tmp.


Home | Main Index | Thread Index | Old Index