Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Feb 2009 14:32:23 +0100
From:      Markus Gebert <markus.gebert@hostpoint.ch>
To:        Andrei Kolu <antik@bsd.ee>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: zfs compression and nfs
Message-ID:  <A20E3FB0-4825-41A1-95E8-17FCB29883E6@hostpoint.ch>
In-Reply-To: <4986E2F2.8070903@bsd.ee>
References:  <4986E2F2.8070903@bsd.ee>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Andrei

Am 02.02.2009 um 13:11 schrieb Andrei Kolu:

> I encouontered strange problem with zfs compressed volume that is  
> shared out over nfs.
>
> volume is created with command:
>
> # zpool create example /dev/da1
>
> # zfs set compression=gzip data/configuration

Since 'zfs set' is usually used on a file system (i.e. not a  
directory), I assume 'data/configuration' is a zfs filesystem separate  
from 'data/'.


> Now my "data" is shared with NFS and all servers have access to  
> "configuration" volume. All NFS clients can write to volume and show  
> written files over network. What is missing is files from server  
> side- it does not show any file on compressed volume that is written  
> by clients over NFS. If I copy same files/directories to nfs root  
> eg. "data" then I can access files from server. Where are my files?


I don't think this is related to compression.

If 'data/' and 'data/configuration' really happen to be different  
filesystems and you're mounting only 'data/' on the client, the  
behaviour you're seeing is expected. What's happening is that you're  
client is able to to see the configuration _directory_ inside the  
mounted 'data/' filesystem. But since the nfsclient won't be able to  
cross filesystem boundaries on the server (nfs restriction), changing  
to that directory and writing a file on the client will actually  
result in the file being written to the 'data/' filesystem on the  
server (inside it's 'configuration' _directory_). You are not seeing  
these files on the server, because there 'data/configuration' is  
actually you're compressed zfs filesysten that never got a write. You  
should be able to make the lost files visible on the server by  
umounting 'data/configuration':

# zfs umount data/configuration

Of course this does not solve your problem. I guess you need to export  
'data/configuration' too and mount it on the client.


Markus



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A20E3FB0-4825-41A1-95E8-17FCB29883E6>