ZFS ZFS - recover access to a pool that is no longer available automatically from boot?

Before I begin, I'd like to say yes, this was not wise of me.

I recently reorganized a bunch of configuration using symlinks. Everything was going great and I was totally pumped about my new organizing scheme, but upon rebooting, things went... poorly. The issue is that some of the symlinks I added replaced files that are involved in the machine's startup (like /etc/rc.conf and such), and those symlinks point to a zfs pool that's (1) different than the one that /etc (and such) are in and (2) in fact on totally different physical disks. So, the machine boots up, and to some degree works, but since it can't get to those files, a lot doesn't work.

When things were working well (i.e. before I came up with this fantastic configuration reorganization plan of mine), I had two main pools, zos and zdata. They each had a bunch of descendant file systems, but basically zos contained all of the base system -- /usr, /var, /etc, that sort of thing, and zdata was just /stuff, wherein I had, well, a bunch of stuff... including the targets of the various symlinks that I made.

If I do a zfs status, it shows zos, but not zdata. I mean not even "Warning: zdata is offline" or whatever - there is absolutely no hint that such a thing as zdata even exists.

I can recover from backups, but that will take a whole lot of time and effort. But I can do things like create/edit files (on zos), so I'm thinking instead of restoring from backups, I could manually create files (not symlinks) such as /etc/whatever in such a way that it will get far enough along that zfs knows about zdata. Unfortunately, I've been unable to figure out: At startup time, how does zfs know about the definitions of pools, what it should mount where, and so forth?

Thanks in advance for any help.
 
I should note that the drives that zdata is on are geli-encrypted, and they automatically get attached as such during the startup process (i.e. I can see /dev/ada0p1.eli and such).
 
Hah! I figured it out. Long story short, zpool import zdata. Also of possible interest for anyone who finds this thread in the future is the zdb command, e.g. zdb -l /dev/ada0p1.eli, to show information about the pool contained there.

Now to go about replacing all these symlinks that some fool made....
 
Back
Top