ZFS and reordering drives

James R. Van Artsdalen james-freebsd-fs2 at jrv.org
Sat Dec 5 17:02:38 UTC 2009


Gary Corcoran wrote:
> If one were booting from ZFS, would you be out of luck (since you
> wouldn't
> be able to access the zpool.cache before booting), or is there a way
> around this problem?

Boot the CD, run fixit mode, mkdir -p /boot/zfs, import the pool, copy
the resulting /boot/zfs/zpool.cache file into the pool.  Import will
likely mount, in fixit, fileystems with the "mountpoint" property set
which may be a nuisance: some zfs unmounts may be needed in practice in
fixit.

> Is there any way today, to avoid using the boot assigned drive name (e.g.
> /dev/ad2) when creating the zpool?

Partition the disk GPT with gpart.  Create one partition covering the
entire disk and give that partition a label.  Use that label creating
the pool:

...
gpart add -b 34 -s 9999 -l zfs-label -t freebsd-zfs ad0
zpool create zpool /dev/gpt/zfs-label




More information about the freebsd-fs mailing list