ZFS: amd64, devd, root file system.

Alex Dupre ale at FreeBSD.org
Mon Apr 9 08:51:37 UTC 2007


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


More information about the freebsd-fs mailing list