VMware Cloud Community
Dennis2
Contributor
Contributor

Force NFS read-only with esxcfg-nas?

Is there a way to choose wether to connect with reod-only or not from the ESX using the esxcfg-nas command?

The help doesn't list any suitable switches.

The GUI in VC-client however, has an option to mount read-only.

I know you can limit the permision from the NAS altogeter but I would like to have a choice.

Reply
0 Kudos
4 Replies
inktvis75
Contributor
Contributor

/usr/bin/vimsh -n -e "hostsvc/datastore/nas_create +label+ +ip+ +mountpoint+ readonly"

Reply
0 Kudos
Dennis2
Contributor
Contributor

The command mounts the NFS on my ESX 3.5, but still not as readonly.

Reply
0 Kudos
baptista
Enthusiast
Enthusiast

Did you ever find a way to do this? I am currently trying to perform the same action.

Robert

Reply
0 Kudos
mattpound
Hot Shot
Hot Shot

It does work. I used the following syntax:

/usr/bin/vimsh -n -e "hostsvc/datastore/nas_create testimages testhost.test.co.uk /home/share/images 1"

Reply
0 Kudos