LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Able to access the mounted folder though the actual folder is moved (http://www.linuxquestions.org/questions/linux-networking-3/able-to-access-the-mounted-folder-though-the-actual-folder-is-moved-832569/)

VGM 09-16-2010 08:07 AM

Able to access the mounted folder though the actual folder is moved
 
We have a server and target board both running on linux. We mounted a folder in the server on the target board.i.e say a folder /A/B on the server was mounted on the target to /mnt by:

mount -t nfs -o nolock IP:/A/B /mnt

We were able to access /A/B through /mnt.

Now on the server move folder B to some other location say

mv /A/B /A/B_1

But still I am able to access B (now B_1) through /mnt on board.
1)If I delete a file in /mnt, I can see it deleted in /A/B_1
2) If I create a file /A/B_1, I can view it in /mnt

What is the reason for this..?

To check that I have moved the file properly,I had mounted the path on another board.There it shows "No such file or directory".

One thing I can guess is, "mv" just renames the folder,but doesnt change any other attributes.Is that the reason?

VGM 09-16-2010 08:10 AM

But if I keep it for some time,and access /mnt,I get the following error

nfs_statfs: statfs error = 116
nfs_statfs: statfs error = 116
nfs_statfs: statfs error = 116
nfs_statfs: statfs error = 116
nfs_statfs: statfs error = 116

tredegar 09-16-2010 12:10 PM

After a mv or even rm the original file is not deleted until all applications that are currently using it have "released" the file.

Try this: Open a video or music file. Whilst it is playing, delete the file on your HDD. It continues to play until it has finished, or you close your player. Then it is gone.

Linux is often smart :)


All times are GMT -5. The time now is 03:49 PM.