<html><head></head><body><div>I think your settings are incorrect since nfs needs to be as anonymous are those settings under selinux? Not sure your env so it is hard to see what steps you are missing <br /><br /><div class="acompli_signature">Inviato da IPhone </div><br /></div><br /><br /><br />
<div class="gmail_quote">On Thu, Jul 30, 2015 at 6:10 PM -0700, "Francesc Pinyol Margalef" <span dir="ltr"><<a href="mailto:francesc.pinyol.m@gmail.com" target="_blank">francesc.pinyol.m@gmail.com</a>></span> wrote:<br />
<br />

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="3D"ltr"">
<div dir="ltr"><div><div><div><div><div><div><div>Hi,<br /></div>I'm trying to configure Cinder with NFS from a Fujitsu Eternus DX.<br /></div>Mounting the remote resource works fine, but when I try to create<br /></div>a volume, I get a "Permission denied" in the logs.<br /></div><br /></div>The Fujitsu Eternus DX (192.168.1.101) unit has a directory exported:<br />$ showmount -e 192.168.1.101<br />Export list for <a href="http://192.168.1.101">192.168.1.101</a>:<br />/mnt/nas/ <a href="http://192.168.0.0/22">192.168.0.0/22</a><br /><br /></div><div>This directory is owned by uid=102 and gid=201.<br /></div><div><br /></div><div><br /></div><div>In the storage node, the configuration files are:<br /><br /></div>- /etc/cinder/cinder.conf<br /></div>[DEFAULT]<br /><div>nfs_shares_config = /etc/cinder/nfsshares<br />volume_driver = cinder.volume.drivers.nfs.NfsDriver<br />[...]<br /><br />- /etc/cinder/nfsshares<br />192.168.1.101:/mnt/nas/<br /><br /></div><div>I have changed the uid and gid of the user cinder, in order to have the<br /></div><div>mentioned uid and gid:<br /># id cinder<br />uid=102(cinder) gid=201(cinder) groups=201(cinder),99(nobody)<br /></div><div><br /></div><div>When I start the service, the remote resource is mounted:<br />$ df -h<br />Filesystem                             Size  Used Avail Use% Mounted on<br />[...]<br />192.168.1.101:/mnt/nas/   59T  423G   58T   1% /var/lib/cinder/mnt/9ae799cf301b19940950ae49dd800c51<br /><br /># ls -l /var/lib/cinder/mnt/9ae799cf301b19940950ae49dd800c51/<br />drwxrwxr-x. 15 cinder cinder       1024 Jul 30 09:55 cust<br /><br /># ls -ln /var/lib/cinder/mnt/9ae799cf301b19940950ae49dd800c51/<br />drwxrwxr-x. 15 102 201       1024 Jul 30 09:55 cust<br /><br /><br /></div><div>But when I try to create a volume from another node (controller) with:<br />$ cinder create --display-name myvol 1<br /><br /></div><div>I get the following message in the storage node (/var/log/cinder/volume.log):<br />2015-07-31 02:45:19.325 28370 ERROR oslo_messaging.rpc.dispatcher [req-047ed05d-cd56-410a-afa6-85a4db59728a 751edd7ef0494970bbeecaa5d2861450 f3680324d5124f8ca5937c310881cdb7 - - -] Exception during message handling: Unexpected error while running command.<br />Command: None<br />Exit code: -<br />Stdout: u"Unexpected error while running command.\nCommand: sudo cinder-rootwrap /etc/cinder/rootwrap.conf truncate -s 1G /var/lib/cinder/mnt/9ae799cf301b19940950ae49dd800c51/volume-4ee83412-bf7d-4cd2-ae74-cffd5af3adc7\nExit code: 1\nStdout: u''\nStderr: '/bin/truncate: cannot open \\xe2\\x80\\x98/var/lib/cinder/mnt/9ae799cf301b19940950ae49dd800c51/volume-4ee83412-bf7d-4cd2-ae74-cffd5af3adc7\\xe2\\x80\\x99 for writing: Permission denied\\n'"<br />Stderr: None<br /><br /></div><div><div><div><div><div><div><div><div><br />As expected, if I try to manually run the same problematic command as root, I get the same error:<br /># sudo cinder-rootwrap /etc/cinder/rootwrap.conf truncate -s 1G /var/lib/cinder/mnt/9ae799cf301b19940950ae49dd800c51/volume-4ee83412-bf7d-4cd2-ae74-cffd5af3adc7<br />/bin/truncate: cannot open ‘/var/lib/cinder/mnt/9ae799cf301b19940950ae49dd800c51/volume-4ee83412-bf7d-4cd2-ae74-cffd5af3adc7’ for writing: Permission denied<br /><br /></div><div>But if I run it as cinder user, all is fine:<br />[root@storage-node cinder]# su -c "truncate -s 1G /var/lib/cinder/mnt/9ae799cf301b19940950ae49dd800c51/volume-4ee83412-bf7d-4cd2-ae74-cffd5af3adc7" cinder<br />[root@storage-node cinder]# ls -l /var/lib/cinder/mnt/9ae799cf301b19940950ae49dd800c51/volume-4ee83412-bf7d-4cd2-ae74-cffd5af3adc7<br />-rw-r--r--. 1 cinder cinder 1073741824 Jul 31 02:51 /var/lib/cinder/mnt/9ae799cf301b19940950ae49dd800c51/volume-4ee83412-bf7d-4cd2-ae74-cffd5af3adc7<br /><br /><br /></div><div>Why Cinder is not able to write to the mounted directory?<br /></div><div>Should Cinder be forced to write to the mounted directory as cinder user? How?<br /></div><div><br /><br /></div><div>Francesc<br /></div><div><br /><br /></div><div><div><div><div><br />-- <br /><div class="gmail_signature"><div dir="ltr">Francesc Pinyol Margalef<br /><a href="http://www.francescpinyol.cat/" target="_blank">http://www.francescpinyol.cat/</a></div></div>
</div></div></div></div></div></div></div></div></div></div></div></div>


!DSPAM:1,55bacb09153191570613895!
</div>

</blockquote>
</div>
</body></html>