OK, I have Neth running now on ZFS. It’s too much for me to write up at the moment, but in short, I started with a minimal CentOS 7 installation, moved that onto ZFS following (mostly) these instructions (though updated for the current CentOS using the information from the ZFS on Linux wiki), then installed Neth following the documentation.
That got Neth running on a single-disk pool. My goal would be to (1) run it on a multi-disk pool so I’d have redundancy, and (2) use large (>2 TiB) disks, which appear to require a GPT partition table. I’d also need either of the disks to be bootable–otherwise, if the wrong disk fails, the system won’t boot, which kind of defeats the purpose. This blog post has the instructions I followed to GPT partition two more virtual disks, both larger than the first. Added partition two of both of those virtual disks to the pool with zpool attach
(so, for the time being, it’s a three-way mirror), and installed grub to the boot block of each with grub2-install /dev/sdb
(and /dev/sdc
). The pool is now resilvering (resyncing), and in the meantime, I’m configuring the test server, installing stuff from the software center, etc.
For some reason, the instructions I followed do not create the pool with the autoexpand
property turned on. You’d want that. zpool set autoexpand=on rpool
resolves this.
Once the resilver completes, I expect I should be able to zpool detach
the first virtual disk, and the pool will then become a two-way mirror. It should also automatically expand to the size of the new virtual disks.
Edit: Well, that mostly worked. I did zpool detach rpool scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-part1
, and in a few seconds, I was returned to the command prompt. zpool status
now showed a two-way mirror, and zpool list
showed that it had grown to the size of the new (larger) virtual disks. Getting it to boot took a little bit of doing, though; the system didn’t initially see either of the two new virtual disks as bootable. Once I removed the old one, and reassigned the SCSI IDs of the remaining disks, the system booted. I’m thinking this wouldn’t be an issue with actual, physical disks.
Something I’m noticing, and don’t have a ready explanation for: any time I make a change to the pool, rebooting fails and drops me to a dracut>
prompt. The error says that it’s unable to import the pool. At the dracut>
prompt, I run zpool import -f rpool
, and it imports without issues. I then reboot, and it’s fine.
Edit 2: I’ve realized that when I partitioned those two virtual disks, I didn’t create swap partitions. Probably should have done that.
Hope this is useful to someone else–I’m mostly posting it so I’ll have the links handy for my own sake in the future, but it should be enough for others to get started with.