ESXi

 View Only
  • 1.  NFS datastore mounted as read-only

    Posted Aug 05, 2023 10:07 PM

    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!



  • 2.  RE: NFS datastore mounted as read-only

    Posted Aug 07, 2023 06:24 AM
    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.


  • 3.  RE: NFS datastore mounted as read-only

    Posted Aug 07, 2023 03:14 PM

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



  • 4.  RE: NFS datastore mounted as read-only
    Best Answer

    Posted Aug 11, 2023 10:18 PM

    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