You can change the NFS share for your VMware Cloud Director appliance after deployment.
Procedure
- Quiesce and stop the
vmware-vcd
service on all appliances in the VMware Cloud Director server group./opt/vmware/vcloud-director/bin/cell-management-tool -u admin_username cell --shutdown
- Stop the
appliance-sync.timer
service on all appliances in the server group.systemctl stop appliance-sync.timer
- On the primary appliance, copy the data from the old NFS share to the new one.
- Create a new NFS share mount point.
mkdir /opt/vmware/vcloud-director/data/transfer-new/
- Mount the new NFS server share on the new mount point.
mount -t nfs NFS_server_IP_address:/data/transfer /opt/vmware/vcloud-director/data/transfer-new
- Copy the files from the old transfer share to the new transfer share.
Note: The time it takes to copy the files depends on the number of catalog items cached in the transfer folder share.
cp -aR /opt/vmware/vcloud-director/data/transfer/* /opt/vmware/vcloud-director/data/transfer-new/
- When you copy the files successfully, confirm that the contents of the old NFS share are in new NFS share by verifying the contents of /opt/vmware/vcloud-director/data/transfer-new or running the following command.
diff -r --brief /opt/vmware/vcloud-director/data/transfer/ /opt/vmware/vcloud-director/data/transfer-new/
- Unmount the new NFS share from the temporary mount point.
umount /opt/vmware/vcloud-director/data/transfer-new/
- Delete the temporary mount point.
rmdir /opt/vmware/vcloud-director/data/transfer-new/
- Create a new NFS share mount point.
- Update the /etc/fstab file, replacing the NFS line with the path to the new NFS server.
NFS_server_IP_address:/data/transfer_appliance /opt/vmware/vcloud-director/data/transfer/ nfs defaults 0 0
- Unmount the old NFS share.
umount /opt/vmware/vcloud-director/data/transfer/
- Mount the new NFS share.
mount -a
- Confirm that you mounted the NFS share successfully by verifying that the output of the mount command lists the mounted NFS share.
- Change the ownership of the transfer directory from
root
tovcloud
using the following command.chown -R vcloud:vcloud /opt/vmware/vcloud-director/data/transfer
- Restart the
appliance-sync.timer
service.systemctl start appliance-sync.timer
- Repeat steps 4 through 9 on all the nodes in the server group.
- One node at a time, restart the
vmware-vcd
service.systemctl start vmware-vcd
- Verify that
vmware-vcd
works correctly on all nodes in the server group.