Tonight I made a simple, yet destructive (or at least partly) mistake: when I told FreeBSD which disk to destroy, I accidentally gave it the system disk of my little home server. This happened because it had the same size as the external SSD I had just plugged in, and I got confused.

I lost some reproducible configurations (the server’s name was in fact tempfbsd01), but I took the chance to run an experiment. My home server runs FreeBSD in read-only mode (that's the part I destroyed). From there, I manually enable the external drives (encrypted with GELI) and, in turn, the ZFS pools. Then I start the various jails and the (single, Proxmox Backup Server) VM.

Since I also have another test box running SmartOS, I decided to experiment: I connected the disks to it, created a FreeBSD bhyve VM on SmartOS, and passed the entire disks through to the VM. I reconfigured the FreeBSD VM with the bare minimum and booted it all up. The jails with BastilleBSD started without any issues - obviously the Proxmox Backup Server VM itself is still missing, but I’ll deal with that later.

I’m tempted to leave everything like this for a while.

And yes, for anyone wondering: I had fun 🙂

#FreeBSD#RunBSD #illumos#SmartOS#DisasterRecovery#IT#SysAdmin#Homelab

@stefano
What I'm doing to avoid this kind of faults is to use labels instead of raw geom and/or drive/partition UUID whenever possible.

Raw geom can change if somehow interfaces connected to the drives are shuffled, and UUID are hard to remember.😅

Labels naming myself (i.e., parttype_interface+num like ESP_N012 for ESP in 12th NVMe drive, Swap_S003 for swap in 3rd SATA drive). Of course, these kind of naming should be defined to make it harder to forget and easier to maintain.

And ZFS on FreeBSD (both legacy ZoF and OpenZFS) accepts partition labels on creating pools. Not sure for other OS'es.

@chimay the usual suspect=me 😆
I was testing a mfsbsd installation into an external disk. I didn't look at the device names/brands but just the size (I was in a hurry) - forgetting that the internal ssd and the external ones are the same size. I think they're also the same brand, too. So a nice dd before starting, then mfsbsd. It installed - but replacing the internal OS 😆
@stefano I still have semi-nightmares about when I switched to Linux, was having difficulties during the installation (this was back when Red Hat 6.2 was current; no, *not* RHEL 6.2, Red Hat!) and on the umpteenth attempt, I managed to format the wrong disk (as I recall I had two HDDs at the time, one of which was pretty much brand new and held all my files that I wanted to keep).

I did manage to recover much from backups, but I think there's a gap of a few months I never did get back…