I created a NFS datastore on a NetApp at 192.168.5.x and only used the default vswitch which had the VM group and management group on it. I have now created a seperate vswitch for the NFS traffic, created vifs on the NetApp and setup that subnet on a 172.16.10.x subnet. I tried adding the same datastore with the new subnet and same volume through the Add Storage link in the vSphere client but it gave an error. How can I do this? Do I need to re-export the NFS volume? I have a few VMs on the datastore and I dont want to lose any data. What is the best way to do this?
Thanks
Hi!
You have to unmount the datastore first.
Here's a CLI version of how to do it:
Shut down the VMs residing on the datastores (via vSphere Client)
- Enter maintenance mode:
$ vimsh -n -e /hostsvc/maintenance_mode_enter
- For each datastore, delete the old, and re-add it with new address (and exact same label):
$ esxcfg-nas -d <label>
$ esxcfg-nas -a --host <new_name> --share <remote_nfs_share_path> <label>
- Mount the datastore
$ esxcfg-nas -r
-Exit maintenance mode:
$ vimsh -n -e /hostsvc/maintenance_mode_exit
You can do it in vSphere Client aswell
--- Martin
If I delete the old will I lose any data? What about the VM's that are on that datastore?
Isn't there something that I need to do on the NetApp?