Archive for January 14th, 2013
While not often required its sometimes nice to be able to rename the root zfs pool.
Armed with a mfsbsd cdrom this is a relatively painless process under FreeBSD (8.3-RELEASE in out case).
In this example we’re renaming the default root zpool from
1. Boot from mfsbsd cdrom
2. Import the root pool into an alternative location specifying a cachefile, this is in the important bit, as using -R sets cachefile=none which won’t generate the changes required.
zpool import -o altroot=/mnt -o cachefile=/boot/zfs/zpool.cache tank zroot
3. Copy the new cachefile to zpool updating the existing one.
cp /boot/zfs/zpool.cache /mnt/boot/zfs/zpool.cache
/mnt/boot/loader.conf with the new details e.g.
If you have more thank one pool then always best to import them all even if not renaming them to ensure the new
zpool.cache contains all your pools