Ask Your Question
0

**libvirtError: Cannot access storage file XXX (as uid:107, gid:107): No such file or directory**

asked 2016-03-30 03:35:37 -0600

ntinutr gravatar image

Sorry for crossposting, Oracle community seems the wrong place to ask...

I've installed an OpenStack POC with Oracle OpenStack (using kolla).

I tested cinder volume attachment with the default lvm-driver and if works smoothly.

I need to use nfs4 (on Netapp and probably on other NAS providers), so I configured the cinder nfs driver :

[root@oos-master config]# cat /etc/kolla/config/cinder.conf

[DEFAULT]
enabled_backends = lvmdriver-1,nfs-1


[nfs-1]
volume_driver = cinder.volume.drivers.nfs.NfsDriver
#nfs_mount_options = "vers=3,nolock"
nfs_shares_config = /etc/cinder/nfs_shares
nfs_sparsed_volumes = True
volume_backend_name=nfs-1

and redeployed the cinder service and create by hand in the docker container the file /etc/cinder/nfs_shares:

[root@oos-ctrl1 ~]# docker exec -it cinder_volume bash
[root@oos-ctrl1 /]# cat /etc/cinder/nfs_shares
<OMISSIS>:/volOOSTest
[root@oos-ctrl1 /]# exit

I do manage also to create a volume on nfs, BUT... when I try to attach this volume on a instance it does not succed and I get an error in the nova log service docker container:

# here the vm:
#
[root@oos-master config]# docker-ostk nova list
+--------------------------------------+--------------------+---------+------------+-------------+----------------------+
| ID                                   | Name               | Status  | Task State | Power State | Networks             |
+--------------------------------------+--------------------+---------+------------+-------------+----------------------+
| 03d5906f-18ee-40ce-98a4-03e4fe1473c3 | cirros-instance--5 | ACTIVE  | -          | Running     | test=192.168.235.101 |
+--------------------------------------+--------------------+---------+------------+-------------+----------------------+

# here the volumes, the first one is on nfs:
#
[root@oos-master config]# docker-ostk nova volume-list
+--------------------------------------+-----------+--------------+------+-------------+--------------------------------------+
| ID                                   | Status    | Display Name | Size | Volume Type | Attached to                          |
+--------------------------------------+-----------+--------------+------+-------------+--------------------------------------+
| 6a7fd5d3-02d9-47a9-be2f-1bff71c28aaa | available |              | 5    | nfs         |                                      |
| f24a3fe0-d994-49f6-be4c-6e62c021fea6 | available |              | 1    | lvm         |                                      |
| e539e48a-788c-4e75-b081-4641648f909b | available |              | 1    | -           | 6f630fc1-0299-4b0f-b8b9-77bb98f3cf94 |
+--------------------------------------+-----------+--------------+------+-------------+--------------------------------------+

trying to attach the nfs volume on a instance

#
[root@oos-master config]# docker-ostk nova volume-attach 03d5906f-18ee-40ce-98a4-03e4fe1473c3 6a7fd5d3-02d9-47a9-be2f-1bff71c28aaa
+----------+--------------------------------------+
| Property | Value                                |
+----------+--------------------------------------+
| device   | /dev/vdb                             |
| id       | 6a7fd5d3-02d9-47a9-be2f-1bff71c28aaa |
| serverId | 03d5906f-18ee-40ce-98a4-03e4fe1473c3 |
| volumeId | 6a7fd5d3-02d9-47a9-be2f-1bff71c28aaa |
+----------+--------------------------------------+

... but the volume is not attached

#
[root@oos-master config]# docker-ostk nova volume-list
+--------------------------------------+-----------+--------------+------+-------------+--------------------------------------+
| ID                                   | Status    | Display Name | Size | Volume Type | Attached to                          |
+--------------------------------------+-----------+--------------+------+-------------+--------------------------------------+
| 6a7fd5d3-02d9-47a9-be2f-1bff71c28aaa | available |              | 5    | nfs         |                                      |
| f24a3fe0-d994-49f6-be4c-6e62c021fea6 | available |              | 1    | lvm         |                                      |
| e539e48a-788c-4e75-b081-4641648f909b | available |              | 1    | -           | 6f630fc1-0299-4b0f-b8b9-77bb98f3cf94 |
+--------------------------------------+-----------+--------------+------+-------------+--------------------------------------+
[root@oos-master config]#

and in the nova service log I get:

2016-03-29 09:47:29.335 1 INFO nova.compute.manager [req-88e88adb-eeaa-4e94-a21e-26daff128281 fb769977a9454ec3a1d27ad2d3757a2e 7fa49cadeda84a27b9b9c38e813ac826 - - -] [instance: 03d5906f-18ee-40ce-98a4-03e4fe1473c3] Attaching volume 6a7fd5d3-02d9-47a9-be2f-1bff71c28aaa to /dev/vdb
2016-03-29 09:47:30.910 1 ERROR nova.virt.libvirt.driver [req-88e88adb-eeaa-4e94-a21e-26daff128281 fb769977a9454ec3a1d27ad2d3757a2e 7fa49cadeda84a27b9b9c38e813ac826 - - -] [instance: 03d5906f-18ee-40ce-98a4-03e4fe1473c3] Failed to attach volume at mountpoint: /dev/vdb
2016-03-29 09:47:30.910 1 TRACE nova.virt.libvirt.driver [instance: 03d5906f-18ee-40ce-98a4-03e4fe1473c3] Traceback (most recent call last):
2016-03-29 09:47:30.910 1 TRACE nova.virt.libvirt.driver [instance: 03d5906f-18ee-40ce-98a4-03e4fe1473c3]   File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 1092, in attach_volume
2016-03-29 09:47:30.910 1 TRACE nova.virt.libvirt.driver [instance: 03d5906f-18ee-40ce-98a4-03e4fe1473c3]     virt_dom.attachDeviceFlags(conf.to_xml(), flags)
2016-03-29 09:47:30.910 1 TRACE nova.virt.libvirt.driver [instance: 03d5906f-18ee-40ce-98a4-03e4fe1473c3]   File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 183, in doit
2016-03-29 09:47:30.910 1 TRACE nova.virt.libvirt.driver [instance: 03d5906f-18ee-40ce-98a4-03e4fe1473c3]     result = proxy_call(self._autowrap, f, *args, **kwargs)
2016-03-29 09:47:30.910 1 TRACE nova.virt.libvirt.driver [instance: 03d5906f-18ee-40ce-98a4-03e4fe1473c3]   File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 141, in proxy_call
2016-03-29 09:47:30.910 1 TRACE nova.virt.libvirt.driver [instance: 03d5906f-18ee-40ce-98a4-03e4fe1473c3]     rv = execute(f, *args, **kwargs)
2016-03-29 09:47:30.910 1 TRACE ...
(more)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-06-16 06:06:31 -0600

Paul Bourke gravatar image

Sorry for late reply. Based on the time of posting, you were most likely using the 2.0.1 release of Oracle OpenStack in which NFS for Cinder wasn't supported. Here is the upstream commit where this was added (https://review.openstack.org/#/c/279913/), this was after Oracle OpenStack 2 released. If you retry on the latest release this should work.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

Stats

Asked: 2016-03-30 03:35:37 -0600

Seen: 3,268 times

Last updated: Mar 30 '16