* [9fans] union mount
@ 2005-01-31 10:22 Matthias Teege
2005-01-31 14:37 ` Richard Miller
0 siblings, 1 reply; 2+ messages in thread
From: Matthias Teege @ 2005-01-31 10:22 UTC (permalink / raw)
To: 9fans
Moin,
looks like, I don't understand the union mount not completly. I have
a directory called "foo" with some documents. Now I need some files
from another dir called "bar". New files should go to foo.
% mkdir /usr/mtg/foo
% touch /usr/mtg/foo/hello
% bind -ac /usr/mtg/bar /usr/mtg/foo
but if I now create a new file in /usr/mtg/foo it goes to bar.
So I try
% bind -bc /usr/mtg/foo /usr/mtg/foo
% bind -ac /usr/mtg/bar /usr/mtg/foo
and the it works. New files goes to foo but a ls show me the files in
foo two times (which I understand).
What is wrong in the first case?
Matthias
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [9fans] union mount
2005-01-31 10:22 [9fans] union mount Matthias Teege
@ 2005-01-31 14:37 ` Richard Miller
0 siblings, 0 replies; 2+ messages in thread
From: Richard Miller @ 2005-01-31 14:37 UTC (permalink / raw)
To: mtg, 9fans
Lots of people (like me) miss this detail at first.
mount(1) says:
... When a
new file is created in a union directory, it is
placed in the first element of the union that has
been bound or mounted with the -c flag.
But foo was not a union directory before you bound
bar onto it, so it didn't have a -c flag. The trick is
to start by making a union with just foo in it:
mkdir /usr/mtg/foo
bind -c /usr/mtg/foo /usr/mtg/foo
bind -a /usr/mtg/bar /usr/mtg/foo
will have the desired effect.
-- Richard
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-01-31 14:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-31 10:22 [9fans] union mount Matthias Teege
2005-01-31 14:37 ` Richard Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).