Add new geli-encrypted ZFS disk under FreeBSD 10.1

If you used the installer to put everything on one disk, only to figure out later you’d like to use another disk too, here are short notes how to add one:

1. Clean the other/new disk:

gpart -F destroy ada1

2. Create partition for new ZFS disk:

gpart add -t freebsd-zfs ada1

2a. Check all with:

gpart show

3. Make a label for a tidy approach:

glabel label -v tank /dev/ada1p1

4. If it moves – encrypt it:

geli init -b -s4096 -l256 /dev/label/tank
Enter new passphrase:
Reenter new passphrase:

5. Attach the newly-created eli partition:

geli attach /dev/label/tank
Enter passphrase:

6. Make zpool:

zpool create tank /dev/label/tank.eli

7. Make ZFS and set mountpoint:

zfs create tank/home
zfs set mountpoint=/home tank/home

You’re done! 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *