no .zfs access through nfs share

Status
Not open for further replies.

steph10200

Cadet
Joined
Sep 11, 2017
Messages
3
Hi,

I encountered a problem with the .zfs directory when it is accessed by an NFS mount.

I have no problem for cd in the directory, but an ls never hands me back.
I must kill the process ls ( 100% cpu on nfs client )

this does not happen directly on the server file system, the .zfs directory, and subdirectory open and list perfectly. but appear only when accessing via NFS.

Server FreeNAS : FreeNAS v11 nightlies ( tried with stable v11 but same issue )
config nfs : ( /etc/exports )
/mnt/data/backup -mapall="root":"wheel" server1 server2



Clients : Differents linux debian, with nfsv3
/etc/fstab :
freenas:/mnt/data/backup /mnt/backup nfs rw,soft,intr 0 0

result on client :

Code:
server1:/mnt/backup# cd .zfs
server1:/mnt/backup/.zfs# ls -l


( no prompt , no escape solution, I must kill -9 the ls process )



I have an "old" FreeNAS v9, I have not this issue with .zfs


I don't see how accessing to my zfs snapshot easily.
thanks for your help.

Stephane
 
Last edited by a moderator:

Artion

Patron
Joined
Feb 12, 2016
Messages
331
even if it's not a good idea to expose your hidden .zfs snapdir you can enable it by changing the dataset snapdir property: zfs set snapdir=visible pool/dataset
run this on the FN shell changing pool/dataset to your needs

a better idea is to mount the desired snapshots as needed on a shared mountpoint: mount -t zfs /mnt/pool/dataset@snapshot /sharedmountpoint

Also take in count that snapshots are always read only
 

steph10200

Cadet
Joined
Sep 11, 2017
Messages
3
Hi,

Thanks for your reply,

the visibility is not a problem, this is a backup server who is only accessible by administrator

With visible or hidden, the problem is the same,

I can cd to .zfs directory, but when i want to list the content of directory, the server ( nfs client ) don't list, process ls loop with 99% of cpu usage.

I have an another freenas server without this problem.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
How many snapshots?
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Well my only other suggest is don't export the .zfs path since it goes against best practices. You should clone a snapshot when needed and export that new dataset.
 
Status
Not open for further replies.
Top