Re: Some notes on RootOnZFS article in wiki

From: Scot Hetzel <swhetzel_at_gmail.com>
Date: Mon, 21 Dec 2009 10:45:45 -0600
On 12/21/09, Mel Flynn <mel.flynn+fbsd.current_at_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
Received on Mon Dec 21 2009 - 15:45:46 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:59 UTC