This article describes configuring a Netapp storage device for use with Openstack's Cinder service. It uses the NFS protocol via a NFS driver from Netapp, which allows for storing Cinder volume snapshots directly on a NetApp storage unit.
There is very little documentation available describing this process. This configuration was put together by studying the source code for the driver!
For this guide, OpenStack Folsom was installed on Ubuntu Server 12.04 using the Ubuntu Cloud Archive Repositories from http://ubuntu-cloud.archive.canonical.com/ubuntu.
The OpenStack configuration files are complex, and the configuration process for adding a NetApp box has a few caveats which are described here.
All configuration is done in /etc/cinder directory.
These are options which needs to be added to cinder.conf for the NetappNFS driver to work 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
Also, there are two things to consider when editing:
- 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).
Double check you use the correct hostname for the filers if you get a snapshot creation fail:
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.'
Append following lines to the end of this 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
The [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:
I patched the file nova/virt/libvirt/driver.py and added the NfsDriver to the list of drivers. There is more info on that process here.
The blueprints for the driver are here: https://blueprints.launchpad.net/cinder/+spec/netapp-nfs-cinder-driver