Configure MSR for NFS¶
You can configure your MSR replicas to store images on an NFS partition, to thus enable all replicas to share the same storage back end.
Before configuring MSR for NFS¶
Verify that the NFS server has the correct configuration.
Verify that the NFS server has a fixed IP address.
Verify that all hosts that are running MSR have the correct NFS libraries.
Verify that the hosts can connect to the NFS server by listing the directories exported by your NFS server:
showmount -e <nfsserver>
Mount one of the exported directories:
mkdir /tmp/mydir && sudo mount -t nfs <nfs server>:<directory> /tmp/mydir
Install MSR with NFS¶
The manifest examples herein are offered for demonstration purposes only. They do not exist in the Mirantis repository and thus are not available for use. To use NFS with MSR 3.0.x, you must enlist an external provisioner, such as NFS Ganesha server and external provisioner or NFS subdir external provisioner.
Define the NFS service:
kubectl create -f examples/staging/volumes/nfs/provisioner/nfs-server-gce-pv.yaml
Create an NFS server and service:
Create the NFS server from the service definition:
kubectl create -f examples/staging/volumes/nfs/nfs-server-rc.yaml
Expose the NFS server as a service:
kubectl create -f examples/staging/volumes/nfs/nfs-server-service.yaml
Verify that the Pods are correctly deployed:
kubectl get pods -l role=nfs-server.
Create the persistent volume claim:
Locate the cluster IP for your server:
kubectl describe services nfs-server
Edit the NFS persistent volume to use the correct IP address. Because there are not yet any service names, you must hard-code the IP address.
Set up the persistent volume to use the NFS service:
kubectl create -f examples/staging/volumes/nfs/nfs-pv.yaml kubectl create -f examples/staging/volumes/nfs/nfs-pvc.yaml
Switching MSR to NFS
As MSR does not migrate storage content when it switches back ends, you must migrate the content prior to changing the MSR storage configuration.