Deploy MSR on NFS¶
You can configure MSR to store Docker images in a Network File System (NFS) directory.
Note
Changing storage backends involves initializing a new metadata store, rather than reusing an existing volume, which facilitates online garbage collection.
Prepare your environment¶
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
Configure NFS for MSR¶
You can configure MSR to use an NFS directory at install time:
docker run -it --rm mirantis/dtr:2.9.21 install \
--nfs-storage-url <nfs-storage-url> \
<other options>
Use the format nfs://<nfs server>/<directory>
for the NFS storage URL.
To support NFS v4, you can specify additional options when running the
install command with the --nfs-storage-url
option.
Note
When you join replicas to an MSR cluster, the replicas pick up your storage configuration, and thus it is not necessary to respecify the configuration.
Reconfigure MSR to use NFS¶
Use the --storage-migrated option with the reconfigure command to indicate the migration status of your storage data during a reconfigure.
To reconfigure MSR to use an NFSv4 volume as a storage backend:
docker run --rm -it \
mirantis/dtr:2.9.21 reconfigure \
--ucp-url <mke_url> \
--ucp-username <mke_username> \
--nfs-storage-url <msr-registry-nf>
--async-nfs
--storage-migrated
To reconfigure MSR to stop using NFS storage, leave the --nfs-storage-url option blank:
docker run -it --rm mirantis/dtr:2.9.21 reconfigure \
--nfs-storage-url ""