Skip to content

Instantly share code, notes, and snippets.

@kmadac
Last active December 13, 2015 20:38
Show Gist options
  • Save kmadac/4971136 to your computer and use it in GitHub Desktop.
Save kmadac/4971136 to your computer and use it in GitHub Desktop.
NetappNFSdriver in Folsom for StackGeek
# 'title' should be 50 characters or less, as a rule of thumb
# 'summary' will be used as the article summary on some pages instead of the article text
# 'published' is an epoch timestamp. you can convert your timestamps here: http://www.epochconverter.com/
# 'type' can be one of ['post', 'guide', 'video'] and is used for routing articles to the correct pages
title: NetappNFSdriver in Folsom
author: http://github.com/kmadac
summary: Article about using and configuration of NetappNFSdriver in Cinder in OpenStack Folsom
published: 1361101244
type: post

NetappNFSdriver in Folsom

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.

Configuration files

All configuration is done in /etc/cinder directory.

/etc/cinder/cinder.conf

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

/etc/cinder/shares.conf

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

  1. 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.

  2. 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.'

/etc/cinder/rootwrap.d/volume.filters

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

/etc/cinder/api-paste.ini

[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

Bug we hit

We had to patch the file nova/virt/libvirt/driver.py and add NfsDriver to the list of drivers. More info here

Blueprint of NetappNFSDriver

https://blueprints.launchpad.net/cinder/+spec/netapp-nfs-cinder-driver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment