OpenStack Discussions

Cannot snapshot cinder volumes

lionel
3,551 Views

Hi all,

I've successfully configured cinder (juno) so that it can creates and attach correctly volumes to instances. Here's my config in cinder.conf:

 

volume_driver = cinder.volume.drivers.netapp.common.NetAppDriver
netapp_storage_family = ontap_cluster
netapp_storage_protocol = nfs
netapp_vserver = vserver01
netapp_server_hostname = 192.168.248.250
netapp_server_port = 80
netapp_login = admin
netapp_password = ******
nfs_shares_config = /etc/cinder/nfs_shares

 

Unfortunately, when I trigger a volume snapshot through horizon, I get this stacktrace from cinder-volume.log:

 

2014-11-25 16:52:28.728 9965 INFO cinder.volume.manager [req-b9c7b50f-8a8f-4b5c-855f-4e525b61f6cf a31d3cd990384179af37782c44a3d015 7bbf5e8585954bef8088b7728436030c - - -] snapshot 4258b044-7ed8-4ede-bdbd-3b929da5d703: creating
2014-11-25 16:52:28.730 9965 DEBUG cinder.volume.manager [req-b9c7b50f-8a8f-4b5c-855f-4e525b61f6cf a31d3cd990384179af37782c44a3d015 7bbf5e8585954bef8088b7728436030c - - -] snapshot 4258b044-7ed8-4ede-bdbd-3b929da5d703: creating create_snapshot /usr/lib/python2.7/dist-packages/cinder/volume/manager.py:521
2014-11-25 16:52:29.203 9965 ERROR oslo.messaging.rpc.dispatcher [req-b9c7b50f-8a8f-4b5c-855f-4e525b61f6cf a31d3cd990384179af37782c44a3d015 7bbf5e8585954bef8088b7728436030c - - -] Exception during message handling: No volume on cluster with vserver
vserver01 and junction path /vol_cinder_juno/volumes

2014-11-25 16:52:29.203 9965 TRACE oslo.messaging.rpc.dispatcher Traceback (most recent call last):
2014-11-25 16:52:29.203 9965 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 134, in _dispatch_and_reply
2014-11-25 16:52:29.203 9965 TRACE oslo.messaging.rpc.dispatcher incoming.message))
2014-11-25 16:52:29.203 9965 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 177, in _dispatch
2014-11-25 16:52:29.203 9965 TRACE oslo.messaging.rpc.dispatcher return self._do_dispatch(endpoint, method, ctxt, args)
2014-11-25 16:52:29.203 9965 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 123, in _do_dispatch
2014-11-25 16:52:29.203 9965 TRACE oslo.messaging.rpc.dispatcher result = getattr(endpoint, method)(ctxt, **new_args)
2014-11-25 16:52:29.203 9965 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/osprofiler/profiler.py", line 105, in wrapper
2014-11-25 16:52:29.203 9965 TRACE oslo.messaging.rpc.dispatcher return f(*args, **kwargs)
2014-11-25 16:52:29.203 9965 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/volume/manager.py", line 536, in create_snapshot
2014-11-25 16:52:29.203 9965 TRACE oslo.messaging.rpc.dispatcher {'status': 'error'})
2014-11-25 16:52:29.203 9965 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/openstack/common/excutils.py", line 82, in __exit__
2014-11-25 16:52:29.203 9965 TRACE oslo.messaging.rpc.dispatcher six.reraise(self.type_, self.value, self.tb)
2014-11-25 16:52:29.203 9965 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/volume/manager.py", line 527, in create_snapshot
2014-11-25 16:52:29.203 9965 TRACE oslo.messaging.rpc.dispatcher model_update = self.driver.create_snapshot(snapshot_ref)
2014-11-25 16:52:29.203 9965 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/volume/drivers/netapp/nfs.py", line 124, in create_snapshot
2014-11-25 16:52:29.203 9965 TRACE oslo.messaging.rpc.dispatcher snapshot['volume_id'])
2014-11-25 16:52:29.203 9965 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/volume/drivers/netapp/nfs.py", line 856, in _clone_volume
2014-11-25 16:52:29.203 9965 TRACE oslo.messaging.rpc.dispatcher (vserver, exp_volume) = self._get_vserver_and_exp_vol(volume_id, share)
2014-11-25 16:52:29.203 9965 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/volume/drivers/netapp/nfs.py", line 866, in _get_vserver_and_exp_vol
2014-11-25 16:52:29.203 9965 TRACE oslo.messaging.rpc.dispatcher exp_volume = self._get_vol_by_junc_vserver(vserver, export_path)
2014-11-25 16:52:29.203 9965 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/volume/drivers/netapp/nfs.py", line 926, in _get_vol_by_junc_vserver
2014-11-25 16:52:29.203 9965 TRACE oslo.messaging.rpc.dispatcher """) % msg_fmt)
2014-11-25 16:52:29.203 9965 TRACE oslo.messaging.rpc.dispatcher NotFound: No volume on cluster with vserver
2014-11-25 16:52:29.203 9965 TRACE oslo.messaging.rpc.dispatcher vserver01 and junction path /vol_cinder_juno/volumes
2014-11-25 16:52:29.203 9965 TRACE oslo.messaging.rpc.dispatcher
2014-11-25 16:52:29.203 9965 TRACE oslo.messaging.rpc.dispatcher

 

 

I'm pretty confident with my settings since volume creating, resize and attachment work correctly.

 

Any idea what else could I check?

 

thank you,

cheers

 

1 REPLY 1

lionel
3,530 Views

Hi there,

I figured out what the problem was.

Actually, the junction path for the export in Netapp was /vol_cinder_juno.

I then created a "volumes" folder and told cinder to mount this path in the /etc/cinder/nfs_shares:

192.168.20.100:/vol_cinder_juno/volumes

 

This does not work. One needs to specify the exact junction path for the NFS server. So I changed my nfs_shares file to:

192.168.20.100:/vol_cinder_juno

 

and everything works correctly.

 

Please notice that once you did this change, you need to

1. delete all cinder volumes you have created

2. stop all cinder services

3. manually umount NFS mountpoint on the controller (or the server on which cinder-volume runs) in /var/lib/cinder/mnt/#UUID

4. start all cinder services

5. create volume

6. snapshot the volume

 

 

should work

 

cheers

 

 

Public