zfs child fs and clones inaccessible thru parent nfs mount requiring many esxi stores

acesea

Limp Gawd
Joined
Oct 2, 2004
Messages
211
I've noticed this issue long ago and dismissed it by simply attaching individual nfs store mounts on esxi hosts for each zfs fs I require. I am in the process of creating lots of clones which are individual filesystems originating from a snapshot of a filesystem. Figuring there is a workable alternative I've been troubleshooting with sharenfs, mountpoints and acl to no avail.

Google shows this discussed before with no resolution:
http://communities.vmware.com/message/1364734
http://web.archiveorange.com/archive/v/0py0PEsiPhNUJm42s0Jf

The concern is child filesystems in zfs are inaccessible and invisible when esxi mounts the nfs parent share.

For example, assume the following filesystems:
tank/nfs/xp/vm1
tank/nfs/xp/vm2
tank/nfs/xp/vm3
...
tank/nfs/xp/vm50

If I mount tank/nfs/xp/vm1 the esxi datastore displays all the files in this filesystem. When I mount tank/nfs/xp as nfs store in esxi I can see all the folders labeled vm1 thru vm50 but when opening the folders they are empty when in fact they contains files with appropriate permissions. Is there any method of exposing the filesystems to this one datastore rather than mounting 50 datastores on esxi?
 
Last edited:
You just need to mount it using nfs4 instead of nfs3.

There isn't any real way around that issue using nfs3.
 
patrickdk is correct that this is an NFS3 issue. Unfortunately, it doesn't seem that esxi supports nfs4, so you're stuck. You could turn on dedup and use one filesystem, or deal with a plethora of datastores.
 
I remember reading about the lack of nfs4 long ago elsewhere but it did not come to mind now and couldn't find the culprit.

Thanks for the info.
 
Ah, okay. Wondering in this case if those child filesystems really need to be filesystems?
 
Ah, okay. Wondering in this case if those child filesystems really need to be filesystems?

If one wishes to use "zfs clone" to make duplicates of the original filesystems, then the answer is yes. You make a snapshot, then you can clone it many times cheaply to create your VM images... but then the clones are all filesystems.

VMware also apparently has support for creating clones, which may obviate this problem. I haven't tried it out myself; I don't know if it saves disk space/ARC space in the way that zfs clones do, but I would guess the "linked clones" option would do the trick.
 
Got that, I just hadn't seen anything in this particular scenario that was explicitly requiring filesystems in those cases...
 
Back
Top