[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Doubt in NFS mounting

Posted on 2007-03-25
4
Medium Priority
?
308 Views
Last Modified: 2013-12-16
Hello Experts,

Lets assume a NFS server (say nfsserver1) sharing a folder 'share1' for all the clients in the network. In a client   named 'client1', assume there is one folder /dir1 which consists some files (say f1, f2 and f3).  Now assume that we are mounting the nfs share folder on this folder /dir1.

root@client1# mount -t nfs nfsserver1:/share1 /dir1
root@client1# cd /dir1
root@client1# ls
<Files in nfs shared folder>
...................................
After mounting, I could see the nfs shared files under /dir1. Now where will the actual files (f1, f2.f3)  under /dir1 get stored.  Is it possible to access those files ?

Thanks,
Ashok
0
Comment
Question by:rdashokraj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 10

Assisted Solution

by:Luxana
Luxana earned 450 total points
ID: 18790952
> Now where will the actual files (f1, f2.f3)  under /dir1 get stored.  Is it possible to access those files ?

well those files will remain on the same place(same hdd and same partition) as they were before but they will not be accessible. Remember /dir1 doest not represent filesystem but only mount point. If you do this you will confuse "du" and "df" tools because thay will show different results.

hope this helps

 
0
 
LVL 10

Assisted Solution

by:ssvl
ssvl earned 450 total points
ID: 18791755
mounting (nfs or any) is like a covering a dir with another dir.

so if if mount a dir1 in another dir2 it (dir1) hides the dir2 s condents.

if u unmounted it you will see the contents of the dir.
0
 
LVL 8

Accepted Solution

by:
eager earned 600 total points
ID: 18804692
Mounting a file system hides the contents of the directory where it is mounted.

You can see files in the hidden directory, but it is a bit awkward.
Before you mount the nfs file system, create a new directory:  mkdir /alias-dir1.
Create *hard* links to the files in dir1:
  cd /alias-dir1
  ln /dir1/f1 .
  ln /dir1/f2 .
  ln /dir1/f3 .
After mounting the nfs file system, the files in /dir will be hidden, but you should
be able to access them by cd'ing to /alias-dir1.
0
 

Author Comment

by:rdashokraj
ID: 18816505
Thanks for your explanation.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question