Article about using and configuration of NetappNFSdriver in Cinder in OpenStack Folsom
This article describes necessary configuration steps to successfully utilize Netapp storage by Openstack Cinder service and use NFS protocol to store Cinder volumes on Netapp volumes directly. NFS driver from Netapp brings possibility to create Cinder volume snapshots by Netapp technology directly on storage box.
There is no useful documentation in the time of writing article, so we had to do configuration by studying the source codes.
We used OpenStack Folsom installed on Ubuntu Server 12.04 from ubuntu-cloud.archive repositories (deb http://ubuntu-cloud.archive.canonical.com/ubuntu precise-updates/folsom main).
I have to say, that packages are not ready after installation in a way that you just edit configuration files and restart services. There are few caveats which I would like to describe here.
All configuration is done in /etc/cinder directory.
Here are options which needs to be added to cinder.conf in order to NetappNFS driver works correctly:
# Make sure that you don't use nova.volume.netapp_nfs.NetAppNFSDriver
volume_driver=cinder.volume.netapp_nfs.NetAppNFSDriver
# Where the file with shares is located
nfs_shares_config=/etc/cinder/shares.conf
# Where to mount volumes
nfs_mount_point_base=/mnt/cinder-volumes
# Driver sends command to create clones and snapshots via DFM,
# so we need to configure, it
netapp_wsdl_url=http://172.21.1.22/dfm.wsdl
netapp_login=dfmlogin
netapp_password=dfmpassword
netapp_server_hostname=172.21.1.21
# I'm not sure whether it is necessary to define
# netapp_storage_service
netapp_storage_service=Test-Cloud
This file includes Netapp volume/qtree paths on filer which will be mounted to control-node and used for cinder volume creation. Add one path per line in following format:
filername:/vol/CINDER_VOLUMES
Here I have to mention two things which you need to be aware of
-
Assure that there is no empty line in the file, because cinder is dumb and will try to mount empty path, which ends up with error.
-
It is necessary to use hostnames of filers instead of IP addresses. These hostnames has to be same as hostnames of filers in DFM (OnCommand) otherwise snapshot creation will fail with message:
2012-12-12 13:21:03 16643 TRACE cinder.openstack.common.rpc.amqp WebFault: Server raised fault: '(22255:EOBJECTNOTFOUND) There is no host, aggregate, volume, qtree, resource group, resource pool, or dataset named 192.168.0.2.'
There are commands which needs to added to this file. Just append following lines to the end of the file.
stat: CommandFilter, /usr/bin/stat, root
mount: CommandFilter, /bin/mount, root
df: CommandFilter, /bin/df, root
truncate: CommandFilter, /usr/bin/truncate, root
chmod: CommandFilter, /bin/chmod, root
rm: CommandFilter, /bin/rm, root
[filter:authtoken] section has to be configured as it is described in cinder installation guide.
After all that configuration you can restart cinder services:
$ sudo service cinder-volume restart
$ sudo service cinder-api restart
$ sudo service cinder-scheduler restart
Now you can try to create volume from CLI:
$ cinder create --display_name test 1
or via Dashboard/Horizon
We had to patch the file nova/virt/libvirt/driver.py and add NfsDriver to the list of drivers. More info here
https://blueprints.launchpad.net/cinder/+spec/netapp-nfs-cinder-driver