From owner-freebsd-fs@FreeBSD.ORG Mon Feb 2 13:40:57 2009 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89F3F106566C for ; Mon, 2 Feb 2009 13:40:57 +0000 (UTC) (envelope-from antik@bsd.ee) Received: from sorbesgroup.com (mail.sorbesgroup.com [217.159.241.118]) by mx1.freebsd.org (Postfix) with ESMTP id 14EF88FC2F for ; Mon, 2 Feb 2009 13:40:56 +0000 (UTC) (envelope-from antik@bsd.ee) Received: from localhost (localhost.localdomain [127.0.0.1]) by sorbesgroup.com (Postfix) with ESMTP id 6E4323C528F1 for ; Mon, 2 Feb 2009 15:27:46 +0200 (EET) Received: from sorbesgroup.com ([127.0.0.1]) by localhost (sorbesgroup.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 03694-07 for ; Mon, 2 Feb 2009 15:27:45 +0200 (EET) Received: from [192.168.0.80] (andrei [192.168.0.80]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sorbesgroup.com (Postfix) with ESMTP id 4BA2E3C528FF for ; Mon, 2 Feb 2009 15:27:45 +0200 (EET) Message-ID: <4986F7E3.6020404@bsd.ee> Date: Mon, 02 Feb 2009 15:40:51 +0200 From: Andrei Kolu User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 CC: freebsd-fs@freebsd.org References: <4986E2F2.8070903@bsd.ee> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at localhost Subject: Re: zfs compression and nfs X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2009 13:40:57 -0000 Markus Gebert wrote: > 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/'. > Yes, it is created with command (I forgot to add it in my first post): # zfs create data/configuration # mount data on /data (zfs, NFS exported, local) data/configuration on /data/configuration (zfs, local) data/iscsi on /data/iscsi (zfs, local) > >> 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. > But I can see "configuration" directory from NFS client!? If I understand correctly then NFS can't use "filesystem on filesystem" for example my case with "data/configuration"? Can I compress "data" then? All other subfilesystems will be compressed also? How can I see what compression ratio I got on compressed filesystem? So many questions...