LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Filesystem type questions (https://www.linuxquestions.org/questions/linux-general-1/filesystem-type-questions-803544/)

computergeek7 04-22-2010 11:10 AM

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!

catkin 04-22-2010 11:12 AM

Duplicate thread reported. Original is http://www.linuxquestions.org/questi...stions-803541/

catkin 04-22-2010 11:16 AM

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.

computergeek7 04-22-2010 11:23 AM

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?

GazL 04-22-2010 11:26 AM

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?

computergeek7 04-22-2010 11:30 AM

okay I see what your saying thanks...but is there any way to access that file without having to ummount the /data filesystem again?

pixellany 04-22-2010 12:20 PM

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.