VMware Cloud Community
ale97dro
Contributor
Contributor
Jump to solution

NFS datastore mounted as read-only

Hi everyone,

I'm doing my first experience in ESXi configuration from scratch and I'm trying to configure a NFS datastore on my ESXi.

I'm exporting the share from a RHEL9 server (firewalld disabled):

  • in /etc/exports, /mnt/datastore01/datastore01 192.168.0.201/24 (rw,sync,no_subtree_check,no_root_squash)

  • I've setted the share with chmod 1777 and chown nobody:nobody

  • on the ESXi, I've successufully added the datastore: 2023-08-05T18:53:48.839Z In(182) vmkernel: cpu2:263967 opID=d04b2b00)NFS41: NFS41FSAPDNotify:6184: Restored connection to the server 192.168.0.200 mount point Datastore01, mounted as 6ba94681-8cbb59df-0000-000000000000 ("/mnt/datastore01/datastore01")

  • when I try to create a directory on the datastore from ESXi (or create a new VM aswell) I see the following error in the vmkernel log:
    2023-08-05T18:56:07.113Z Wa(180) vmkwarning: cpu5:263958 opID=1eda8e5a)WARNING: NFS41: NFS41FileDoCreateDir:3983: Failed to process the create directory task: Read only
    2023-08-05T18:56:07.113Z Wa(180) vmkwarning: cpu5:263958 opID=1eda8e5a)WARNING: NFS41: NFS41FileOpCreateFile:4267: Failed to create file "test" of type 2: Read only

What am I doing wrong? Am I missing a configuration on the ESXi that prevent it from writing on the datastore or I have to change the export option on the RHEL repository?

Thank you in advance for your help!

0 Kudos
1 Solution

Accepted Solutions
ale97dro
Contributor
Contributor
Jump to solution

Hi,

I did some more tests with a Synology NAS and I found out they use another parameter in the /etc/exports which is "insecure_locks" so I edited mine:

  • /mnt/datastore01/datastore01 192.168.0.201/24 (rw,sync,no_subtree_check,no_root_squash,insecure_locks)

After that I was able to mount my NFS datastore.

 

Alessandro

View solution in original post

0 Kudos
3 Replies
Alfista_PS
Hot Shot
Hot Shot
Jump to solution

Hi,
have you check if you have correctly set the export on RHEL system?
How you have mounted the NFS? Have you do it over Adding NFS datastore in datastore menu from GUI or over standard command esxcli command?
It looks that there is the problem. I have mounted many NFS datastore and without any problems.
Alfista
----------------------
Audio-Video Accessories
Selling and Integration of Audio & Video Accessories and Technology
If my answer has resolved your problem please mark as RESOLVED or if it has only was a good help then give me the KUDOS. Thanks.
0 Kudos
maksym007
Expert
Expert
Jump to solution

When you mounted NFS Datastore there is such option - add as a read only. 
try to unmount and add again only properly now

0 Kudos
ale97dro
Contributor
Contributor
Jump to solution

Hi,

I did some more tests with a Synology NAS and I found out they use another parameter in the /etc/exports which is "insecure_locks" so I edited mine:

  • /mnt/datastore01/datastore01 192.168.0.201/24 (rw,sync,no_subtree_check,no_root_squash,insecure_locks)

After that I was able to mount my NFS datastore.

 

Alessandro

0 Kudos