Hello,
Does anyone have any idea about this? These datastores are mounted on a dedicated machine from a freenas node and I’m having a hard time getting them to cooperate.
[oneadmin@neb 108]$ ls /var/lib/one/datastores/ -all
total 4
drwxr-x---. 2 oneadmin oneadmin 26 Oct 26 18:58 .
drwxr-x---. 9 oneadmin oneadmin 4096 Oct 26 18:58 ..
lrwxrwxrwx 1 oneadmin oneadmin 23 Oct 26 18:27 108 -> /mnt/opennebula/system/
lrwxrwxrwx 1 oneadmin oneadmin 22 Oct 26 18:30 109 -> /mnt/opennebula/images
[oneadmin@neb 108]$ ls /mnt/opennebula/ -all
total 25
drwxr-xr-x. 4 root root 32 Oct 26 09:28 .
drwxr-xr-x. 3 root root 23 Oct 26 09:28 ..
drwxrwxrwx 2 1003 1003 4 Oct 26 18:54 images
drwxrwxrwx 3 1003 1003 8 Oct 26 18:54 system
1003 being the ID of ‘oneadmin’ on the freenas node (I’m not sure if this matters or not, I can write files to these directories so I’m assuming the permissions are correct?)
“mount” displays (Please ignore the volume name structure, this is simply proof of concept at the moment):
xxx.xxx.xxx.xxx:/mnt/vol1/openstack on /mnt/opennebula/system type nfs (rw,relatime,vers=3,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=xxx.xxx.xxx.xxx,mountvers=3,mountport=844,mountproto=udp,local_lock=none,addr=xxx.xxx.xxx.xxx)
xxx.xxx.xxx.xxx:/mnt/vol1/openstack2 on /mnt/opennebula/images type nfs (rw,relatime,vers=3,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=xxx.xxx.xxx.xxx,mountvers=3,mountport=897,mountproto=udp,local_lock=none,addr=xxx.xxx.xxx.xxx)
Testing this I can write files in these directories in terminal but trying to copy the template into the system directory throws permission errors.
[oneadmin@neb 109]$ touch test.txt
[oneadmin@neb 109]$ echo "it works" > test.txt
[oneadmin@neb 109]$ cat test.txt
it works
[oneadmin@neb 109]$ cd ../108
[oneadmin@neb 108]$ touch test.txt
[oneadmin@neb 108]$ echo "it works" > test.txt
[oneadmin@neb 108]$ cat test.txt
it works
[oneadmin@neb 108]$ cp /var/lib/one/datastores/109/9ed83b36b653e4555816334401c8fd71 /var/lib/one/datastores/108/10/disk.0
cp: cannot create regular file ‘/var/lib/one/datastores/108/10/disk.0’: Permission denied
The file I create in terminal uses oneadmin and the template is using 1003 - I have no idea why FreeNAS uses the users ID or if it’s even a problem… I’m hoping someone here might know.
-rwxrwxrwx 1 1003 1003 41943040 Oct 26 18:32 9ed83b36b653e4555816334401c8fd71
-rw-rw-r-- 1 oneadmin 1003 9 Oct 26 18:54 test.txt
Here is the full error:
Wed Oct 26 19:04:51 2016 [Z0][VM][I]: New state is ACTIVE
Wed Oct 26 19:04:51 2016 [Z0][VM][I]: New LCM state is PROLOG
Wed Oct 26 19:04:52 2016 [Z0][TM][I]: Command execution fail: /var/lib/one/remotes/tm/shared/clone neb.master01.shifthosting.com:/var/lib/one//datastores/109/9ed83b36b653e4555816334401c8fd71 neb.slave01.shifthosting.com:/var/lib/one//datastores/108/10/disk.0 10 109
Wed Oct 26 19:04:52 2016 [Z0][TM][I]: clone: Cloning /var/lib/one/datastores/109/9ed83b36b653e4555816334401c8fd71 in neb.slave01.shifthosting.com:/var/lib/one//datastores/108/10/disk.0
Wed Oct 26 19:04:52 2016 [Z0][TM][E]: clone: Command "cd /var/lib/one/datastores/108/10; rm -f /var/lib/one/datastores/108/10/disk.0; cp /var/lib/one/datastores/109/9ed83b36b653e4555816334401c8fd71 /var/lib/one/datastores/108/10/disk.0 ; qemu-img resize /var/lib/one/datastores/108/10/disk.0 500M" failed: cp: cannot stat '/var/lib/one/datastores/109/9ed83b36b653e4555816334401c8fd71': No such file or directory
Wed Oct 26 19:04:52 2016 [Z0][TM][I]: qemu-img: Could not open '/var/lib/one/datastores/108/10/disk.0': Could not open '/var/lib/one/datastores/108/10/disk.0': No such file or directory
Wed Oct 26 19:04:52 2016 [Z0][TM][E]: Error copying neb.master01.shifthosting.com:/var/lib/one//datastores/109/9ed83b36b653e4555816334401c8fd71 to neb.slave01.shifthosting.com:/var/lib/one//datastores/108/10/disk.0
Wed Oct 26 19:04:52 2016 [Z0][TM][I]: ExitCode: 1
Wed Oct 26 19:04:52 2016 [Z0][TM][E]: Error executing image transfer script: Error copying neb.master01.shifthosting.com:/var/lib/one//datastores/109/9ed83b36b653e4555816334401c8fd71 to neb.slave01.shifthosting.com:/var/lib/one//datastores/108/10/disk.0
Wed Oct 26 19:04:52 2016 [Z0][VM][I]: New LCM state is PROLOG_FAILURE
Any advice greatly appreciated.
Regards,
Zac