My fileserver has a two mirror vdevs striped and it's fully bootable Root on ZFS setup. It was initially two different mirrors, one for system and other one for data but I merged them into one. I didn't do anything special to merge them, I created a second vdev out of the other pair of disks that first cleared of any labels and zpool added them to the pool.
[/code]
I have been a regular user of FreeBSD for about 10 seperate servers for about 12 years. I am currently trying to build a development/file server for our developers. I started with FreeNAS 9.3 because I wanted to try that, had not used ZFS before and thought this might be an easy way to get going. It works fine, but because it's sort of nanoBSD there is zero package management I cannot customise it outside the GUI without breaking it. However, since this box is multi purpose (combining the functions of 4 older separate boxes in our office), I need to customise it. I made it work with some jails, a virtualbox instance with a FreeBSD 10.2 virtual machine inside. Anyway, it's messy, and I now want to ditch FreeNAS and just install plain FreeBSD and set it up the way I want.
The challenge it this: The box has 4 x 4TB WD disks. Currently (in FreeNAS) they are in 2 mirrored vdevs (gives 8TB storage and good response to IOPS). The freeNAS OS sits on a USB flash drive. I want to install zfs on root so that the whole machine incl the OS is protected by ZFS integrity (the 4 boxes it is replacing all had hardware raid). Installing the OS on the USB flash drive is not a good idea, due to limited life of that medium.
With FreeBSD 10.2 RELEASE, obviously I can even just use the bsdinstall "gui" to install ZFS on root and then build the machine from there. The bsdinstall utility allows creating my first vdev mirror. The idea was, once the OS is installed, to then just combine disks3&4 into a second mirror vdev and add that to the zpool which is mounted on root.
However, after searching around I found that this is "
not really supported", eg:
Code:
zpool add -f rpool log c0t6d0s0
cannot add to 'rpool': root pool can not have multiple vdevs or separate logs
I have found the unofficial workaround in
several places:
Code:
I found that most people use the "unset bootfs property, add vdev, set bootfs again" trick to have a working
multiple-vdev root pool under FreeBSD.
All of these links are quite old, 2012 and earlier. Is the "single vdev and no SLOG" restriction for "rpools" still present in FreeBSD 10.2? (I haven't had the opportunity to try, without nuking my new box.
If so, is it "safe" to use that "set bootfs" trick? Does it make the system vulnerable during boot?
kpa Your solution seems very neat (no swap and boot partitions on the vdev data drives) and just a tiny /boot partition on an SSD which is dual use for swap. How did you manage to get to this configuration? You only said:
Code:
I didn't do anything special to merge them, I created a second vdev out of the other pair of disks that first cleared of any labels and zpool added them to the pool.
I don't have an SSD, but could just add that, if that's what's required for the nice, clean 2 x 2 mirror zfs-on-root setup.
Many thanks, sorry for digging up this ancient thread, but it was the most recent one I could find that's really relevant.