3

Description: I ran into a weird issue with my VMs using NFS. Both of my VMs are using linux. The server-side is using RHEL and the client-side using CentOS 7. My host machine is running Windows 7.

My client-side VM is starting or initializing a website using nodejs. I made a folder directory where both the server-side and the client-side can share files using NFS.

Issue: When I create a file/folder from the shared directory in the client-side, the website was able to detect the change from the shared directory and post the change in the website.

However, in the server-side, when I create a file/folder in the shared directory, the change is not detected in the website. Although, The created file/folder is visible in the shared directory from the client-side.

NFS Configurations: I will paste the configurations I made for both server and client:

Server-side NFS configuration on /etc/exports:

    /home/awsim2/config  192.168.56.101(rw,sync,no_root_squash,no_all_squash,no_subtree_check)
    /home/awsim2/scenarios 192.168.56.101(rw,sync,no_root_squash,no_all_squash,no_subtree_check)
   #/home/awsim2/config 192.168.56.101(rw,sync,all_squash,anonuid=503,anongid=502)
   #/home/awsim2/scenarios 192.168.56.101(rw,sync,all_squash,anonuid=503,anongid=502)

NOTE: I tried other methods to solve this issue...

Client-side NFS configuration on /etc/fstab:

    192.168.56.102:/home/awsim2/config /var/nfs_awsim_share/ nfs rw,sync,user,auto,bg,hard,intr,nolock 0 0
    192.168.56.102:/home/awsim2/scenarios /var/nfs_awsim_scenarios_share/ nfs rw,sync,user,auto,bg,hard,intr,nolock 0 0

I hope this is enough information to explain my issue.

Thank you for your time!

2
  • When you create the file on the server side, what are the permissions on the file? Who is the owner? Sep 29, 2015 at 18:44
  • @JedDaniels the the owner is "anonuid=503,anongid=502" from the shared directory folder. In addition, that is user = "awsim2" , group = "afmsttgroup" from the server-side. The client-side user is vagrant. I am seeing the server-side user, awsim2, that owns the shared directory. Sep 29, 2015 at 18:54

1 Answer 1

1

I did enough research to find that NFS and a shared directory approach is not a possible solution because there is an issue between the Linux kernel subsystem, inotify. The inotify acts to extend filesystems to notice changes to the filesystem, and report those changes to applications. Sadly, nodejs is not able to detect those changes because of a bug in Virtual box that involves with the Linux kernel subsystem, inotify.

Source: https://www.virtualbox.org/ticket/10660

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .