NFS Share

jerome_teano

New Member
Joined
Jul 22, 2022
Messages
2
Reaction score
0
Credits
21
Im trying to mount an existing NFS share to an existing directory to the client server. My NFS share is already mounted to another directory to my client server. The /etc/exports config goes like this.

/directory1 (clientIP) (rw,sync,no_root_squash,insecure)
/directory2 (clientIP) (rw,sync,no_root_squash,insecure)

When I run the command, mount -t nfs NFSserverIP:/directory2 /clientsidedir/subdir1/subdir2/subdir3, I got successful results. The problem is that I cannot see the existing files and sub directories on my client server directory when mounting the nfs share.
 


KUPI

New Member
Joined
Aug 30, 2019
Messages
20
Reaction score
4
Credits
128
Im trying to mount an existing NFS share to an existing directory to the client server. My NFS share is already mounted to another directory to my client server. The /etc/exports config goes like this.

/directory1 (clientIP) (rw,sync,no_root_squash,insecure)
/directory2 (clientIP) (rw,sync,no_root_squash,insecure)

When I run the command, mount -t nfs NFSserverIP:/directory2 /clientsidedir/subdir1/subdir2/subdir3, I got successful results. The problem is that I cannot see the existing files and sub directories on my client server directory when mounting the nfs share.
yes. That's how Linux works.

Before nfs mount, /clientsidedir/subdir1/subdir2/subdir3 was a local directory. You were able to see all the contents inside this path.

As soon as you mount a nfs, or local file system on this mount point /clientsidedir/subdir1/subdir2/subdir3, it will mount the filesystem and start showing the contents of the filesystem.
 
OP
J

jerome_teano

New Member
Joined
Jul 22, 2022
Messages
2
Reaction score
0
Credits
21
Is there another option so that I can retain the existing files from my client side dir?
 

KUPI

New Member
Joined
Aug 30, 2019
Messages
20
Reaction score
4
Credits
128
Is there another option so that I can retain the existing files from my client side dir?
if you use the same path as mount point, then you cannot view the files which is available in that path.

you have to create a new mount point and mount the nfs share. So that you can view both.
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Linux.org Hosting Donations
Consider making a donation

Members online


Latest posts

Top