Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hi, yes I did - if I didn't I could have created the volume group, could I?

root@cinder:~# apt-get install lvm2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
lvm2 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@cinder:~# vgs
  VG             #PV #LV #SN Attr   VSize   VFree  
  cinder-volumes   1   0   0 wz--n- 100.00g 100.00g
root@cinder:~#

cheers Mathias

Hi, yes I did - if I didn't I could have created the volume group, could I?

root@cinder:~# apt-get install lvm2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
lvm2 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@cinder:~# vgs
  VG             #PV #LV #SN Attr   VSize   VFree  
  cinder-volumes   1   0   0 wz--n- 100.00g 100.00g
root@cinder:~#

cheers Mathias

EDIT: Hi, I just found a possible reason for this:

/etc/init.d/cinder-volume start-stop-daemon --start --quiet --background --chuid ${CINDER_USER}:cinder ...

The init scripts starts cinder-volume with the privileges of the cinder user account. Problem is, that the cinder user's $PATH does not include the location of the vgs command:

root@cinder:~# which vgs /sbin/vgs root@cinder:~# su - cinder cinder@cinder:~$ vgs -su: vgs: command not found cinder@cinder:~$ echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games cinder@cinder:~$

So it seems like

out, err = self._execute('vgs', '--noheadings', '-o', 'name', run_as_root=True)

in line 76 of /usr/lib/python2.7/dist-packages/cinder/volume/drivers/lvm.py does not work properly (run_as_root).

So I added /sbin/ to the PATH for every user in /etc/profile but now the output looks like this:

cinder@cinder:~$ vgs --noheading -o name WARNING: Running as a non-root user. Functionality may be unavailable. cinder-volumes cinder@cinder:~$

I believe the script can probably not parse the output with this WARNING message still there. I tried setting SUID for /sbin/vgs but without luck.

Any ideas?