From owner-freebsd-current@FreeBSD.ORG Mon Dec 21 16:45:46 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85D4F1065672 for ; Mon, 21 Dec 2009 16:45:46 +0000 (UTC) (envelope-from swhetzel@gmail.com) Received: from mail-iw0-f198.google.com (mail-iw0-f198.google.com [209.85.223.198]) by mx1.freebsd.org (Postfix) with ESMTP id 4CBFE8FC28 for ; Mon, 21 Dec 2009 16:45:46 +0000 (UTC) Received: by iwn36 with SMTP id 36so3695852iwn.3 for ; Mon, 21 Dec 2009 08:45:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=B9xLwSG8uVaAVgNl82mnRc7a6jWXfjqBtv7kB1e0xls=; b=HXk+/BfourmTFR2/3UiqXk9t8vcS3PpIs21HmCK9uytkdrUleclcroUZG8crKDYvVF 6emVZ0+8Q2scelKTEMjALZ0CBXtHBv2oeG5mXHzc/8VqxRUxALGnrgsAo/R7DDJsnVxS vBiwKKHWK6v7peRkuDVpHwnoD7SbwJLjiC7GI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=Tfzc0iUbW7xywa1mQT2nUNGz9oQsPyn63rz3yHPZnvExUre5LpRQkITwzbNwt4QT/j XYmPDBIWaK0/T9QPR0LIgcj5JDb4vIhDKcN1VbuFzTgMbgso+ypx2e8qp/SH9xF2huZS dO27gusrTRUf/DPMTI8wrhgaAyxXEVoHlENcs= MIME-Version: 1.0 Received: by 10.231.121.93 with SMTP id g29mr2166748ibr.13.1261413945688; Mon, 21 Dec 2009 08:45:45 -0800 (PST) In-Reply-To: <200912210728.31761.mel.flynn+fbsd.current@mailing.thruhere.net> References: <200912210600.46044.mel.flynn+fbsd.current@mailing.thruhere.net> <200912210728.31761.mel.flynn+fbsd.current@mailing.thruhere.net> Date: Mon, 21 Dec 2009 10:45:45 -0600 Message-ID: <790a9fff0912210845i5a78ee0fl133b0701a4fc9078@mail.gmail.com> From: Scot Hetzel To: Mel Flynn Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-current@freebsd.org Subject: Re: Some notes on RootOnZFS article in wiki X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Dec 2009 16:45:46 -0000 On 12/21/09, Mel Flynn wrote: > > > 4) The given mount points have sane defaults, however, I use cvs to > > > checkout > > > the ports. It would be nice to have one example where data is already in > > > a directory tree and how one can promote it to a zfs filesystem with > > > special properties. > > > > You cant really promote something to a file system. The ideal situation is > > you create the fs before you unpack the ports tar ball (or cvs). Otherwise, > > rename /usr/ports (/usr/ports.old/, create the fs as desired, then rsync > > the files there (or cp, or mv). Then delete the old tree. > > > Right, I was wondering if that would actually work. If I do for example: > zfs create -o compression=on zroot/usr/local/etc > > with files in there, would this result in the files being 'below' the mount > point or would they be forever lost? > I just tried this and this is the result of creating a zfs filesystem that mounts to the same location as an existing directory: dv8t01# zfs list | grep local dv8t01# ls /usr/local Adobe include lib32 man src bin info libdata modules translations diablo-jdk1.6.0 kde4 libexec sbin www etc lib live share dv8t01# zfs create -o compression=on zroot/usr/local dv8t01# ls /usr/local dv8t01# zfs umount zroot/usr/local dv8t01# ls /usr/local Adobe include lib32 man src bin info libdata modules translations diablo-jdk1.6.0 kde4 libexec sbin www etc lib live share dv8t01# zfs destroy zroot/usr/local Nothing was lost. Scot