Filesystem type questions
1.The first question I have is...I umounted my /data directory, and created a file using the command echo myname >/data/name.
Then when I went to re-mount the /data filesytem and tried to cat the name file again it is no longer there. Where is the file located now or where does a file from an umounted filesytem go when you re-mount it? Any help is greatly appreciated! Thanks! |
Duplicate thread reported. Original is http://www.linuxquestions.org/questi...stions-803541/
|
Any files in a directory are inaccessible when the directory is used as a Mount point; they will be accessible again when the file system is unmounted.
It is better to create one thread per topic because it gets confusing when more than one question is discussed in the same thread. EDIT: oops! I meant to reply in the original thread. |
k thanks...so your saying that the reason I can not cat the file is because it is only accessible when the filesystem is unmounted? If so, is this because I created the file when the /data filesystem was unmounted?
|
Think of it like writing on a piece of paper and then putting another sheet of paper on top of it. Where'd the writing go?
|
okay I see what your saying thanks...but is there any way to access that file without having to ummount the /data filesystem again?
|
Think of "mount" as "connecting". You connect a filesystem to the main tree in order to be able to see it. What is less intuitive is that the second mount (connection) hides the first one. In effect, it is as if the first connection was broken---except that it automatically reappears once the second connection is broken.
If something is hidden by a later mount, all you have to do to access it is mount it somewhere else. Obviously, all of this creates infinite opportunities for confusion and even loss of data---be careful!!! |
All times are GMT -5. The time now is 05:27 PM. |