[Openstack] Openstack - cinder - volume driver NFS
Benoit ML
ben42ml at gmail.com
Tue Jan 15 10:41:43 UTC 2013
Hello,
(plz ignore my previous mail)
I'm sorry because I probabably misunderstand something.
I have :
- configured cinder like the file you show (thank you again) (apport
the nfs_mount_point_base = /etc/cinder/volumes and volumes_dir =
/etc/cinder/volumes )
- mounted the nfs share in /etc/cinder/volumes
- echo '/etc/cinder/volumes' > /var/lib/cinder/nfsshare && chown
cinder /var/lib/cinder/nfsshare
And when I try to create a volume, it doesn't work. The volume is in
"error" state and in the log (with debug/verbose activated) :
- cinder try to create a lv : why create a lv ? not create a file on the nfs ?
- cinder try to "stat" a directory inside the nfs_share but failed
because it doesn't existe (of course does not create it before)
==============================================================
2013-01-15 11:32:08 29896 DEBUG cinder.openstack.common.rpc.amqp [-]
received {u'_context_roles': [u'KeystoneAdmin', u'admin',
u'KeystoneServiceAdmin'], u'_context_request_id':
u'req-0ed3bc1e-d5a1-43c6-8b88-3401734695ca', u'_context_quota_class':
None, u'args': {u'image_id': None, u'snapshot_id': None, u'volume_id':
u'014cd61e-14a2-4aa5-b9f6-a3d80c44f302'}, u'_context_auth_token':
'<SANITIZED>', u'_context_is_admin': True, u'_context_project_id':
u'295b7cf015664e02ab54eb56eb95ee0c', u'_context_timestamp':
u'2013-01-15T10:32:08.523949', u'_context_read_deleted': u'no',
u'_context_user_id': u'108305fe03e24aa98626344b0f47e3a3', u'method':
u'create_volume', u'_context_remote_address': u'192.168.11.101'}
_safe_log /usr/lib/python2.6/site-packages/cinder/openstack/common/rpc/common.py:195
2013-01-15 11:32:08 29896 DEBUG cinder.openstack.common.rpc.amqp [-]
unpacked context: {'user_id': u'108305fe03e24aa98626344b0f47e3a3',
'roles': [u'KeystoneAdmin', u'admin', u'KeystoneServiceAdmin'],
'timestamp': u'2013-01-15T10:32:08.523949', 'auth_token':
'<SANITIZED>', 'remote_address': u'192.168.11.101', 'quota_class':
None, 'is_admin': True, 'request_id':
u'req-0ed3bc1e-d5a1-43c6-8b88-3401734695ca', 'project_id':
u'295b7cf015664e02ab54eb56eb95ee0c', 'read_deleted': u'no'} _safe_log
/usr/lib/python2.6/site-packages/cinder/openstack/common/rpc/common.py:195
2013-01-15 11:32:08 INFO cinder.volume.manager
[req-0ed3bc1e-d5a1-43c6-8b88-3401734695ca
108305fe03e24aa98626344b0f47e3a3 295b7cf015664e02ab54eb56eb95ee0c]
volume volume-014cd61e-14a2-4aa5-b9f6-a3d80c44f302: creating
2013-01-15 11:32:08 DEBUG cinder.volume.manager
[req-0ed3bc1e-d5a1-43c6-8b88-3401734695ca
108305fe03e24aa98626344b0f47e3a3 295b7cf015664e02ab54eb56eb95ee0c]
volume volume-014cd61e-14a2-4aa5-b9f6-a3d80c44f302: creating lv of
size 10G create_volume
/usr/lib/python2.6/site-packages/cinder/volume/manager.py:133
2013-01-15 11:32:08 DEBUG cinder.utils
[req-0ed3bc1e-d5a1-43c6-8b88-3401734695ca
108305fe03e24aa98626344b0f47e3a3 295b7cf015664e02ab54eb56eb95ee0c]
Running cmd (subprocess): sudo cinder-rootwrap
/etc/cinder/rootwrap.conf stat /etc/cinder/volumes/6614325979630346338
execute /usr/lib/python2.6/site-packages/cinder/utils.py:163
2013-01-15 11:32:08 DEBUG cinder.utils
[req-0ed3bc1e-d5a1-43c6-8b88-3401734695ca
108305fe03e24aa98626344b0f47e3a3 295b7cf015664e02ab54eb56eb95ee0c]
Result was 1 execute
/usr/lib/python2.6/site-packages/cinder/utils.py:180
2013-01-15 11:32:08 WARNING cinder.volume.driver
[req-0ed3bc1e-d5a1-43c6-8b88-3401734695ca
108305fe03e24aa98626344b0f47e3a3 295b7cf015664e02ab54eb56eb95ee0c]
Exception during mounting Unexpected error while running command.
Command: sudo cinder-rootwrap /etc/cinder/rootwrap.conf stat
/etc/cinder/volumes/6614325979630346338
Exit code: 1
Stdout: ''
Stderr: "/usr/bin/stat: impossible d'\xc3\xa9valuer
\xc2\xab\xc2\xa0/etc/cinder/volumes/6614325979630346338\xc2\xa0\xc2\xbb:
Aucun fichier ou dossier de ce type\n"
2013-01-15 11:32:08 DEBUG cinder.volume.driver
[req-0ed3bc1e-d5a1-43c6-8b88-3401734695ca
108305fe03e24aa98626344b0f47e3a3 295b7cf015664e02ab54eb56eb95ee0c]
Available shares [] _ensure_shares_mounted
/usr/lib/python2.6/site-packages/cinder/volume/nfs.py:200
2013-01-15 11:32:09 29896 ERROR cinder.openstack.common.rpc.amqp [-]
Exception during message handling
2013-01-15 11:32:09 29896 TRACE cinder.openstack.common.rpc.amqp
Traceback (most recent call last):
2013-01-15 11:32:09 29896 TRACE cinder.openstack.common.rpc.amqp
File "/usr/lib/python2.6/site-packages/cinder/openstack/common/rpc/amqp.py",
line 276, in _process_data
2013-01-15 11:32:09 29896 TRACE cinder.openstack.common.rpc.amqp
rval = self.proxy.dispatch(ctxt, version, method, **args)
2013-01-15 11:32:09 29896 TRACE cinder.openstack.common.rpc.amqp
File "/usr/lib/python2.6/site-packages/cinder/openstack/common/rpc/dispatcher.py",
line 145, in dispatch
2013-01-15 11:32:09 29896 TRACE cinder.openstack.common.rpc.amqp
return getattr(proxyobj, method)(ctxt, **kwargs)
2013-01-15 11:32:09 29896 TRACE cinder.openstack.common.rpc.amqp
File "/usr/lib/python2.6/site-packages/cinder/volume/manager.py", line
163, in create_volume
2013-01-15 11:32:09 29896 TRACE cinder.openstack.common.rpc.amqp
volume_ref['id'], {'status': 'error'})
2013-01-15 11:32:09 29896 TRACE cinder.openstack.common.rpc.amqp
File "/usr/lib64/python2.6/contextlib.py", line 23, in __exit__
2013-01-15 11:32:09 29896 TRACE cinder.openstack.common.rpc.amqp
self.gen.next()
2013-01-15 11:32:09 29896 TRACE cinder.openstack.common.rpc.amqp
File "/usr/lib/python2.6/site-packages/cinder/volume/manager.py", line
135, in create_volume
2013-01-15 11:32:09 29896 TRACE cinder.openstack.common.rpc.amqp
model_update = self.driver.create_volume(volume_ref)
2013-01-15 11:32:09 29896 TRACE cinder.openstack.common.rpc.amqp
File "/usr/lib/python2.6/site-packages/cinder/volume/nfs.py", line 84,
in create_volume
2013-01-15 11:32:09 29896 TRACE cinder.openstack.common.rpc.amqp
volume['provider_location'] = self._find_share(volume['size'])
2013-01-15 11:32:09 29896 TRACE cinder.openstack.common.rpc.amqp
File "/usr/lib/python2.6/site-packages/cinder/volume/nfs.py", line
220, in _find_share
2013-01-15 11:32:09 29896 TRACE cinder.openstack.common.rpc.amqp
raise exception.NfsNoSharesMounted()
2013-01-15 11:32:09 29896 TRACE cinder.openstack.common.rpc.amqp
NfsNoSharesMounted: No mounted NFS shares found
2013-01-15 11:32:09 29896 TRACE cinder.openstack.common.rpc.amqp
2013-01-15 11:32:40 29896 DEBUG cinder.manager [-] Running periodic
task VolumeManager._publish_service_capabilities periodic_tasks
/usr/lib/python2.6/site-packages/cinder/manager.py:164
2013-01-15 11:32:40 29896 DEBUG cinder.manager [-] Running periodic
task VolumeManager._report_driver_status periodic_tasks
/usr/lib/python2.6/site-packages/cinder/manager.py:164
2013-01-15 11:33:40 29896 DEBUG cinder.manager [-] Running periodic
task VolumeManager._publish_service_capabilities periodic_tasks
/usr/lib/python2.6/site-packages/cinder/manager.py:164
2013-01-15 11:33:40 29896 DEBUG cinder.manager [-] Running periodic
task VolumeManager._report_driver_status periodic_tasks
/usr/lib/python2.6/site-packages/cinder/manager.py:164
2013-01-15 11:34:40 29896 DEBUG cinder.manager [-] Running periodic
task VolumeManager._publish_service_capabilities periodic_tasks
/usr/lib/python2.6/site-packages/cinder/manager.py:164
2013-01-15 11:34:40 29896 DEBUG cinder.manager [-] Running periodic
task VolumeManager._report_driver_status periodic_tasks
/usr/lib/python2.6/site-packages/cinder/manager.py:164
2013-01-15 11:35:40 29896 DEBUG cinder.manager [-] Running periodic
task VolumeManager._publish_service_capabilities periodic_tasks
/usr/lib/python2.6/site-packages/cinder/manager.py:164
2013-01-15 11:35:40 29896 DEBUG cinder.manager [-] Running periodic
task VolumeManager._report_driver_status periodic_tasks
/usr/lib/python2.6/site-packages/cinder/manager.py:164
2013-01-15 11:36:40 29896 DEBUG cinder.manager [-] Running periodic
task VolumeManager._publish_service_capabilities periodic_tasks
/usr/lib/python2.6/site-packages/cinder/manager.py:164
2013-01-15 11:36:40 29896 DEBUG cinder.manager [-] Running periodic
task VolumeManager._report_driver_status periodic_tasks
/usr/lib/python2.6/site-packages/cinder/manager.py:164
==============================================================
Any help will be greatly appreciate !
2013/1/14 Benoit ML <ben42ml at gmail.com>:
> Hello,
>
> Thank you for your configuration, it will help me a lot.
>
> One last question : what is the data in the file of
> "nfs_shares_config" : /var/lib/cinder/nfsshare plz ?
>
> Thx in advance
>
> 2013/1/14 Ray Sun <qsun01185 at cienet.com.cn>:
>> Here's my configuration for cinder using NFS, also I submit bug for creating
>> volume snapshot and volume from snapshot here, I already fixed it in my
>> local, not submit yet:
>> https://bugs.launchpad.net/cinder/+bug/1097266
>>
>> /etc/cinder/cinder.conf
>> [DEFAULT]
>> rootwrap_config=/etc/cinder/rootwrap.conf
>> sql_connection =
>> mysql://cinder:cinder-administrator@controller.cienet.com.cn/cinder
>> api_paste_confg = /etc/cinder/api-paste.ini
>> iscsi_helper=ietadm
>> volume_name_template = volume-%s
>> volume_group = vg_cinder
>> #volume_group = cinder-volumes
>> verbose = True
>> auth_strategy = keystone
>> #osapi_volume_listen_port=5900
>> volumes_dir=/var/lib/cinder/volumes/
>> rabbit_host=controller.cienet.com.cn
>> volume_driver=cinder.volume.nfs.NfsDriver
>> ######## defined in cinder.volume.drivers.nfs ########
>> nfs_shares_config=/var/lib/cinder/nfsshare
>> nfs_mount_point_base=/var/lib/cinder/volumes
>> nfs_disk_util=df
>> nfs_sparsed_volumes=true
>>
>> /etc/cinder/rootwrap.d/volume.filters add
>> # cinder/volume/nfs.py
>> 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/nova/nova.conf add
>> # for cinder use volume as nfs
>> libvirt_volume_drivers="iscsi=nova.virt.libvirt.volume.LibvirtISCSIVolumeDriver,local=nova.virt.libvirt.volume.LibvirtVolumeDriver,fake=nova.virt.libvirt.volume.LibvirtFakeVolumeDriver,rbd=nova.virt.libvirt.volume.LibvirtNetVolumeDriver,sheepdog=nova.virt.libvirt.volume.LibvirtNetVolumeDriver,nfs=nova.virt.libvirt.volume_nfs.NfsVolumeDriver"
>>
>> - Ray
>> Yours faithfully, Kind regards.
>>
>> CIeNET Technologies (Beijing) Co., Ltd
>> Email: qsun01185 at cienet.com.cn
>> Office Phone: +86-01081470088-7079
>> Mobile Phone: +86-13581988291
>>
>>
>> On Mon, Jan 14, 2013 at 10:22 PM, Benoit ML <ben42ml at gmail.com> wrote:
>>>
>>> Hello,
>>>
>>> I've installed openstack Folsom on centos with the epel repo.
>>> Basically the all things works on 4 nodes configuration(controller,
>>> network and 2 compute). Quantum is configured with GRE and L3
>>> services.
>>>
>>> At my point, i'd like to go futher on the storage part.
>>>
>>> I'm trying to use the cinder NFS driver to manage volume. From what I
>>> read, the driver is basic : créate/delete volume on an NFS share.
>>> Well but I didn't manage to get it work ... can you help me please ?
>>> what I must do ?
>>>
>>> When I look into the cinder/volume.log, I see that cinder first create
>>> a LV, and try to stat </nfsPath/><bigUUID> and fail. Why cinder try
>>> to créate a LV ? and try to access a directory on the nfs share thaht
>>> is not create before ?
>>>
>>>
>>> Moreover if you have any advice for a "good" basic shared storage
>>> architecture with Openstack, plz shared the information ;)
>>>
>>> In cinder.conf :
>>> -----------------------------------------------------------------
>>> volume_driver=cinder.volume.nfs.NfsDriver
>>> state_path = /var/lib/cinder
>>> nfs_shares_config=/etc/cinder/shares.conf
>>> nfs_mount_point_base = /mnt/exports/volumes/
>>> #nfs_sparsed_volumes = True
>>> #nfs_disk_util = df
>>> lock_path = /var/lib/cinder/tmp
>>> -----------------------------------------------------------------
>>>
>>>
>>> Thank you in advance.
>>>
>>> Regards,
>>>
>>> --
>>> --
>>> Benoit
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~openstack
>>> Post to : openstack at lists.launchpad.net
>>> Unsubscribe : https://launchpad.net/~openstack
>>> More help : https://help.launchpad.net/ListHelp
>>
>>
>
>
>
> --
> --
> Benoit
--
--
Benoit
More information about the Openstack
mailing list