Misrepresented snapshots in NFS share

Status
Not open for further replies.

ibawolf

Cadet
Joined
May 14, 2012
Messages
4
Hi, Everyone. I did some searches, and didn't find anything similar to my problem. Was just wondering if anyone else has seen this too. I setup a FreeNAS system. I created a ZFS volume (a mirror of two drives), and then shared the volume via NFS. I setup ZFS to snapshot this volume every hour during the times I'm home and might be changing things. I mounted the share on an Ubuntu Linux 11.04 workstation, and everything in the actual data looks fine, but if I go to <mountpoint>/.zfs/snapshot directory I see the following:

drwxr-xr-x 2 root root 2 2012-05-11 12:12 auto-20120511.1231-1m
drwxr-xr-x 2 developer developer 2 2012-05-11 13:00 auto-20120511.1331-1m
-rw-r--r-- 1 developer developer 91 2012-04-17 15:32 auto-20120511.1431-1m
-rw-r--r-- 1 developer developer 254 2012-04-17 15:32 auto-20120511.1531-1m
-rw-r--r-- 1 developer developer 270 2012-04-17 15:32 auto-20120511.1631-1m
drwxrwxrwx 62 root root 62 2012-05-11 16:23 auto-20120511.1731-1m
-rw-r--r-- 1 developer developer 92 2012-04-17 15:32 auto-20120514.0900-1m
drwxrwxrwx 62 root root 62 2012-05-11 16:23 auto-20120514.1000-1m
-rw-r--r-- 1 developer developer 91 2012-04-17 15:32 auto-20120514.1100-1m
drwxr-xr-x 4 developer developer 4 2012-04-17 15:32 auto-20120514.1200-1m
-rw-r--r-- 1 developer developer 254 2012-04-17 15:32 auto-20120514.1300-1m
drwxrwxrwx 64 root root 64 2012-05-14 11:21 auto-20120514.1400-1m
drwxr-xr-x 2 developer developer 4 2012-04-17 15:32 auto-20120514.1500-1m
drwxr-xr-x 3 developer developer 165 2012-04-17 15:32 auto-20120514.1600-1m
-rw-r--r-- 1 developer developer 85 2012-04-17 15:32 auto-20120514.1700-1m
drwxrwxrwx 63 root root 64 2012-05-14 15:05 auto-20120514.1800-1m
drwxrwxrwx 63 root root 64 2012-05-14 15:05 auto-20120515.0900-1m
root@lobo:/home/developer/shared/.zfs/snapshot# df -h .
dotcomnas:/mnt/exports/shared
227G 36G 191G 16% /home/developer/shared


But when I ssh to the FreeNAS server and display the same directory I see:

drwxr-xr-x 2 root wheel 2 May 11 12:12 auto-20120511.1231-1m/
drwxr-xr-x 2 developer developer 2 May 11 13:00 auto-20120511.1331-1m/
drwxr-xr-x 2 developer developer 2 May 11 13:00 auto-20120511.1431-1m/
drwxr-xr-x 17 root wheel 17 May 11 15:23 auto-20120511.1531-1m/
drwxrwxrwx 62 root wheel 62 May 11 16:23 auto-20120511.1631-1m/
drwxrwxrwx 62 root wheel 62 May 11 16:23 auto-20120511.1731-1m/
drwxrwxrwx 62 root wheel 62 May 11 16:23 auto-20120514.0900-1m/
drwxrwxrwx 62 root wheel 62 May 11 16:23 auto-20120514.1000-1m/
drwxrwxrwx 62 root wheel 62 May 11 16:23 auto-20120514.1100-1m/
drwxrwxrwx 64 root wheel 64 May 14 11:21 auto-20120514.1200-1m/
drwxrwxrwx 64 root wheel 64 May 14 11:21 auto-20120514.1300-1m/
drwxrwxrwx 64 root wheel 64 May 14 11:21 auto-20120514.1400-1m/
drwxrwxrwx 63 root wheel 63 May 14 14:18 auto-20120514.1500-1m/
drwxrwxrwx 63 root wheel 64 May 14 15:05 auto-20120514.1600-1m/
drwxrwxrwx 63 root wheel 64 May 14 15:05 auto-20120514.1700-1m/
drwxrwxrwx 63 root wheel 64 May 14 15:05 auto-20120514.1800-1m/
drwxrwxrwx 63 root wheel 64 May 14 15:05 auto-20120515.0900-1m/
[root@dotcomnas] /mnt/exports/shared/.zfs/snapshot#

when viewing the directory on the FreeNAS Server everything appears fine, all list as directories, and if I view the contents of each, they show what I expect to see. When I view the same directory through the NFS mount on my Ubuntu workstation, I see some of the snapshots as FILES, not directories, and some of the directories, ownership is not the same, Some directories that show as directories on both, The NFS view of the directory shows only a subset of files and subdirectories. I only see this on the snapshot portiion of the share, the actual files in the share (non-snapshot) show exactly what I would expect.

Has anyone else seen this behavior?

Thanks,

Ron
 

William Grzybowski

Wizard
iXsystems
Joined
May 27, 2011
Messages
1,754
.zfs is a special node from ZFS, it was not meant for sharing like that...

If you want to share a snapshot you should clone it beforehand...
 

peterh

Patron
Joined
Oct 19, 2011
Messages
315
the problem is that each snapshot is exported as a different filesystem ( discussed in another thread)
It's inherent in zfs and the same under solaris.
 

ibawolf

Cadet
Joined
May 14, 2012
Messages
4
any chance I could get you to tell me what other thread it was discussed in, since my searches didn't find anything?
 

peterh

Patron
Joined
Oct 19, 2011
Messages
315
The other thread is :
Mounting snapshot directory using NFS from linux broken
created by rstumbaum 02-21-2012, 11:46 AM
in "help & supprt " -> "sharing"
 
Status
Not open for further replies.
Top