From owner-freebsd-fs@FreeBSD.ORG Mon Feb 2 14:33:44 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 132B1106566B for ; Mon, 2 Feb 2009 14:33:44 +0000 (UTC) (envelope-from markus.gebert@hostpoint.ch) Received: from mail.adm.hostpoint.ch (mail.adm.hostpoint.ch [217.26.48.124]) by mx1.freebsd.org (Postfix) with ESMTP id C7D888FC24 for ; Mon, 2 Feb 2009 14:33:43 +0000 (UTC) (envelope-from markus.gebert@hostpoint.ch) Received: from adsl-202-186-fixip.tiscali.ch ([212.254.202.186]:56264 helo=dynip72.office.hostpoint.internal) by mail.adm.hostpoint.ch with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69 (FreeBSD)) (envelope-from ) id 1LTzrq-000E80-9M; Mon, 02 Feb 2009 15:33:42 +0100 Message-Id: <71E28FE1-0A16-499B-B240-A7D9BAC2D8FF@hostpoint.ch> From: Markus Gebert To: Andrei Kolu In-Reply-To: <4986F7E3.6020404@bsd.ee> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Mon, 2 Feb 2009 15:33:41 +0100 References: <4986E2F2.8070903@bsd.ee> <4986F7E3.6020404@bsd.ee> X-Mailer: Apple Mail (2.930.3) Cc: freebsd-fs@freebsd.org 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 14:33:44 -0000 Andrei Kolu wrote: >> >> >>> 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!? Yes, you can, because that directory is part of the 'data/' filesystem and used (by zfs on the server) as a mount point for the 'data/ configuration' filesystem. > If I understand correctly then NFS can't use "filesystem on > filesystem" for example my case with "data/configuration"? Well, at least nfsv3 and lower don't have this ability for sure. I once heard that nfsv4 might do it, but I at least for me, that didn't work on FreeBSD (tested with 7.0 which has only quite basic nfsv4 support AFAIK). But you can mount all your zfs filesystems on the client, i.e.: # mkdir /mnt/data # mount_nfs -3 server:/data /mnt/data # mount_nfs -3 server:/data/configuration /mnt/data/configuration > Can I compress "data" then? You could, since data is just another zfs filesystem. But if you mount like stated above, you should already have achieved your goal. > All other subfilesystems will be compressed also? 'compression' is a zfs property. If you set a property on the top- level zfs of a pool, then usually it will be inherited by all filesystems within the pool. But you can override properties for subfilesystems. > How can I see what compression ratio I got on compressed filesystem? # zfs get compressratio data/configuration btw: # man zfs Markus