Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 09 Apr 2007 10:51:34 +0200
From:      Alex Dupre <ale@FreeBSD.org>
To:        Alexander Leidinger <Alexander@Leidinger.net>
Cc:        freebsd-fs@FreeBSD.org, freebsd-current@FreeBSD.org
Subject:   Re: ZFS: amd64, devd, root file system.
Message-ID:  <4619FE96.2010508@FreeBSD.org>
In-Reply-To: <20070409102240.u6yxvjr72888cc04@webmail.leidinger.net>
References:  <20070409011723.GB74547@garage.freebsd.pl> <20070409102240.u6yxvjr72888cc04@webmail.leidinger.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Alexander Leidinger wrote:
> Do you have a quick guide how to do this?

It's the same as having a graid3 or geli root fs: you need a simple ufs
partition with /boot and then everything else on zfs.

> I'm a little bit puzzled how the FS layout would look like. Just from
> thinking about it I would do the following, but I like to know if this
> is the right way:
>  - ad0s1a -> contains a / with contains only the boot directory
>  - some zpool which contains / with everything except the boot
>    directory

It's not mandatory to remove the boot directory from zfs, but yes,
that's the idea. Usually you have ad0s1a on a removable media, or
(g)mirror all the adXs1a partitions so that a disk failure doesn't
prevent booting into a usable system.

> In one scenario I would just hope that ZFS DTRT magically, but this
> would imply that ZFS does some kind of union/overlay/underlay mount.
> 
> So I lean more towards a ad0s1a mounted by hand to somewhere else in the
> ZFS namespace and a symlink from the zfs /boot directory to the real
> location where the UFS is mounted.

Why a symlink? You can mount it exactly there.

> In both scenarios I'm not sure how the fstab would look like.

Currently I'm using a removable media, so I don't automatically mount
/boot from it, but I have a copy. If you use the gmirrored disk slices,
you can design your /etc/fstab like:

/dev/zfs/tank/root	/
/dev/gmirror/boot	/boot
/dev/zvol/tank/swap	<swap>
/dev/zfs/tank/usr	/usr
...

(This is the general idea, I haven't looked how zfs fs entries should
appear in fstab, yet, so I cannot give you the exact fstab dump).

--
Alex Dupre



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