Doubt in NFS mounting

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 ?

> 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.

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.

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…

Using 'screen' for session sharing, The Simple Edition
Step 1: user starts session with command: screen
Step 2: other user (logged in with same user account) connects with command: screen -x
Done. Both users are connected to the same CLI sessio…

Learn several ways to interact with files and get file information from the bash shell.
ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…