Access to one or more NFS servers. Creating an NFS server is outside the scope of this document. This example assumes access to the following NFS servers and mount points:
192.168.1.200:/storage
192.168.1.201:/storage
192.168.1.202:/storage
This example demonstrates the use of with this driver with multiple NFS servers. Multiple servers are not required. One is usually enough.
Add your list of NFS servers to the file you specified with the
nfs_shares_config
option. For example, if the value of this option was set to/etc/cinder/shares.txt
, then:# cat /etc/cinder/shares.txt 192.168.1.200:/storage 192.168.1.201:/storage 192.168.1.202:/storage
Comments are allowed in this file. They begin with a
#
.Configure the
nfs_mount_point_base
option. This is a directory wherecinder-volume
mounts all NFS shares stored inshares.txt
. For this example,/var/lib/cinder/nfs
is used. You can, of course, use the default value of$state_path/mnt
.Start the
cinder-volume
service./var/lib/cinder/nfs
should now contain a directory for each NFS share specified inshares.txt
. The name of each directory is a hashed name:# ls /var/lib/cinder/nfs/ ... 46c5db75dc3a3a50a10bfd1a456a9f3f ...
You can now create volumes as you normally would:
$ nova volume-create --display-name myvol 5 # ls /var/lib/cinder/nfs/46c5db75dc3a3a50a10bfd1a456a9f3f volume-a8862558-e6d6-4648-b5df-bb84f31c8935
This volume can also be attached and deleted just like other volumes. However, snapshotting is not supported.