VMware Cloud Community
ighaniem
Contributor
Contributor

Mount shared server after reboot

Hello,

I am working on esxi 6.0 server, it went down accidentally but after reboot, the NFS was not mounting automatically which caused all VMs to be down so it has been mounted manually using:

[user@esxi6:~] # esxcli storage nfs add -H <NFS_IP or NFS_HOSTNAME> -s <directory of shared NFS> -v <Volume-Name>

and I have run each VM again,

Please provide advice on how to mount the shared server automatically after reboot and let the running VMs to run again automatically not manually?

Reply
0 Kudos
2 Replies
TheBobkin
Champion
Champion

Hello ighaniem

Are you perchance using STP and not have the switch ports set to portfast?:

https://kb.vmware.com/s/article/2078204

You can use 'esxcfg-nas -r' to remount all and/or add this to a script run at start-up.

A common issue appears to be devices trying to mount before DNS is up and thus you can try using IP instead of DNS-name (if applicable).

Bob

Reply
0 Kudos
ighaniem
Contributor
Contributor

Thank you TheBobkin​, I appreciate your reply.

I have tried "esxcfg-nas -r" but no action has been done, then I have tried to create a script and wrote in it the same command:

esxcli storage nfs add -H <NFS_IP or NFS_HOSTNAME> -s <directory of shared NFS> -v <Volume-Name> 

And then added the script directory to /etc/rc.load.d/rc.load

and after rebooting it is mounting successfully but the need to run each VM separately.

Reply
0 Kudos