Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Dec 2009 10:45:45 -0600
From:      Scot Hetzel <swhetzel@gmail.com>
To:        Mel Flynn <mel.flynn+fbsd.current@mailing.thruhere.net>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Some notes on RootOnZFS article in wiki
Message-ID:  <790a9fff0912210845i5a78ee0fl133b0701a4fc9078@mail.gmail.com>
In-Reply-To: <200912210728.31761.mel.flynn%2Bfbsd.current@mailing.thruhere.net>
References:  <200912210600.46044.mel.flynn%2Bfbsd.current@mailing.thruhere.net> <d36406630912210803g3e482d5wc289ad3f667f917c@mail.gmail.com> <200912210728.31761.mel.flynn%2Bfbsd.current@mailing.thruhere.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 12/21/09, Mel Flynn <mel.flynn+fbsd.current@mailing.thruhere.net> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?790a9fff0912210845i5a78ee0fl133b0701a4fc9078>