[OpenAFS] inserting a mount point
Tino Schwarze
tino.schwarze@informatik.tu-chemnitz.de
Wed, 13 Mar 2002 01:00:34 +0100
On Tue, Mar 12, 2002 at 06:22:40PM -0500, David R Boldt wrote:
> is there any way, given the path
>
> b/c
>
> where c is a mount point and b is a directory, to replace directory b
> with a mount point named "b", without having to unmount and remount c?
Hmm... I guess, you want to avoid downtime or interruption. The easiest
case would be to have the volume where b resides read-only cloned with
all of the accesses going to the clone. Then you can simply replace b
with a mount point and "vos release" the appropiate volume. This should
be almost transparent for clients.
If there is no such read-only clone, I'd suggest the following:
1 create the new "b" volume - volb
2 fs mkm bnew volb
3 fs mkm bnew/c volc
3.1 prepare everything in bnew to be an exact copy of b
4 mv b bold ; mv bnew b
The critical part is 4 - the interruption should be minimal, open files
are not affected (I just tried that, it actually worked.)
Locking the volume containing b and volb might help to catch the race
when it is tried to open a file inbetween the two moves.
I think it depends on what want to achieve.
Bye, Tino.
--
* LINUX - Where do you want to be tomorrow? *
http://www.tu-chemnitz.de/linux/tag/