3

I'm trying to connect a NFS share to XenCenter. The NFS server is a ZFSGuru distro (uses FreeBSD).

The zfs volume was exported like this:

/sbin/zfs set sharenfs="on" temppool/share

According to "showmount", it's available:

showmount -e
/temppool/share   Everyone

However, when I try to connect to it with XenServer (so it can be used as storage for VHD), I get the following error:

Internal error:Failure("Storage_access failed with: SR_BACKEND_FAILURE_73: [; NFS mount error[opterr=mount failed with return code 32]; ]")

Anyone got an idea?

Update:

This is from the log on the NFS server:

Sep 3 16:23:10 zfsguru mountd[962]: mount request from 192.168.10.217 for non existent path /temppool/share/7c8d3f2f-e0e0-5263-ccad-1cd32a4139cf

Sep 3 16:23:10 zfsguru mountd[962]: mount request denied from 192.168.10.217 for /temppool/share/7c8d3f2f-e0e0-5263-ccad-1cd32a4139cf

Sep 3 16:23:11 zfsguru mountd[962]: mount request from 192.168.10.217 for non existent path /temppool/share/7c8d3f2f-e0e0-5263-ccad-1cd32a4139cf

Sep 3 16:23:11 zfsguru mountd[962]: mount request denied from 192.168.10.217 for /temppool/share/7c8d3f2f-e0e0-5263-ccad-1cd32a4139cf

Sep 3 16:28:20 zfsguru mountd[962]: mount request denied from 192.168.10.217 for /temppool/share/17922178-0dfb-edf3-0037-2eddd79b9d02

Sep 3 16:28:43 zfsguru last message repeated 5 times

Sep 3 16:35:00 zfsguru mountd[962]: mount request denied from 192.168.10.217 for /temppool/share/b5735ccf-1997-8d77-83a0-2f34e37dda8d

Sep 3 16:35:33 zfsguru last message repeated 4 times

Sep 3 16:35:34 zfsguru mountd[962]: mount request denied from 192.168.10.217 for /temppool/share/b5735ccf-1997-8d77-83a0-2f34e37dda8d

It seems XenServer is able to create the directories, but is enable to mount them afterwards.

longneck
  • 22,793
  • 4
  • 50
  • 84
Jeroen Jacobs
  • 1,276
  • 3
  • 15
  • 24
  • I don't know much about ZFS, but when using NFS on Windows you need to enable anonymous access for XenServer to work and the error is exactly the same. Does this help at all? – Dan Sep 03 '12 at 13:04
  • 1
    XenServer is Linux and ZFSGuru is on FreeBSD. I don't see what Windows has to do with this. – Jeroen Jacobs Sep 03 '12 at 13:08
  • Sorry, I was unclear. When trying to mount to a Windows NFS share using XenServer, one has to enable anonymous access specifically. Though with hindsight, I think the error code was slightly different as Googling SR_BACKEND_FAILURE_73 doesn't really return much – Dan Sep 03 '12 at 13:12

4 Answers4

1

XenServer tries to directly mount the subfolders under your share (e.g. /temppool/share/7c8d3f2f-e0e0-5263-ccad-1cd32a4139cf). These folders have to be exported via your NFS-Server.

Striker_84
  • 429
  • 2
  • 6
0

try to mount it manually via XenServer CLI. Also check permissions (full read/write access is required).

  • How do specify that the nfs share should be read/writable to all hosts in my network? I tried something like this: 'zfs sharenfs="192.168.10.0/24:rw" temppool/share' but that only gives me an error: bad host 192.168.10.0.24:rw". – Jeroen Jacobs Sep 03 '12 at 13:30
  • I tried again with this: zfs sharenfs=rw=192.168.10.108 Still no luck, it still complains that this is not a valid host as soon as I put the 'rw' in. I don'tget it! I'm using the same syntax that I find in all the examples on the Internet. What am I doing wrong ??? – Jeroen Jacobs Sep 03 '12 at 13:45
  • zfs set sharenfs=rw=192.168.10.108 zpool01/home/abc doesn't work? – Striker_84 Sep 03 '12 at 13:54
  • Well, it seems if I just share without specifying "rw", it's exported in rw mode anyway. So the issue must be something else. I suspect it might have something to do with the file permissions on the exported folder itself. – Jeroen Jacobs Sep 03 '12 at 14:03
  • ok. verify it via XenServer CLI. Check with "showmount -e hostname" if your share is visible. then try to mount it "mount -t nfs servername:/NFSShare /whatever". – Striker_84 Sep 03 '12 at 14:10
  • I can mount the volume via the CLI. I was also able to create a text file on the volume once I mounted it. So it doens't seem to be a permission issue either... – Jeroen Jacobs Sep 03 '12 at 14:24
  • 1
    ok, here are more hints: - XS requires NFSv3 over TCP for storage repositories. If NFSv4 is enabled on serverside, please disable it. - The NFS server must be configured to export the specified path to all XenServer hosts in the pool (if you're using one) - XenServer will create a new folder on the nfs-share. Is this possible? – Striker_84 Sep 04 '12 at 09:12
  • Extra info added to the question. – Jeroen Jacobs Sep 05 '12 at 15:15
  • Added "-no_subtree_check" and "-alldirs", but no luck... – Jeroen Jacobs Sep 05 '12 at 15:38
  • Have you tried "-alldirs -maproot=root"? If it's connecting as root and you haven't mapped root requests to root (or another local user) it may not have permission to create files/folders inside your NFS root. – USD Matt Feb 01 '13 at 13:28
0

Try to use nfsd with exports Try out following solution link http://myitnotes.info/doku.php?id=en:jobs:freebsd_zfs_nfs_for_vmware

Alexey
  • 1
  • 1
    Was there something specific on that page that the OP should try? If so can you please reference it directly within your answer. Providing just a link as an answer is discouraged on this site. – slm Feb 01 '13 at 12:59
  • Please note that setting sync=disabled as mentioned on that page is dangerous. They shouldn't mention it without making it clear that is may corrupt your VM data if the NFS server crashes. – USD Matt Feb 01 '13 at 13:33
0

It appears to be trying to mount to folders below your NFS export so you may need to add the alldirs option to the exports.

zfs set sharenfs="-alldirs -maproot=root" dataset

This doesn't explain why it's trying to mount non-existent folders though so this may not be a full solution.

Edited to add maproot as apparently just alldirs made no difference. Without mapping root to local root (or another local user) the client might not have permission to create entries on the NFS server.

USD Matt
  • 5,321
  • 14
  • 23