Solved 10.1 with ZFS Mirrored Drives

Too late I noticed the Open Issues in the Release Errata.

After the doing a straight freebsd-update(8) my ZFS volume won't mount. The errata indicates that this is what I should expect to see "while booting an unmodified GENERIC kernel." It also says that using the GENERIC kernel is "strongly discouraged."

My FreeBSD is set up as a headless server and I usually don't think about it until there's a problem. As a result I have very few troubleshooting/repair skills.

So if I shouldn't use the GENERIC kernel, what should I use and how (in general terms) would I go about installing it if I can't boot up? Or better yet under what title is it documented?

Thank you. (The family is nagging me to get their media server up!)
 
It sounds like you will have to get a USB image and boot off of that. From there you can mount your mirror and rebuilt a new kernel. Chapters 9 and 20 of the handbook will be helpful.

Many people feel that ZFS and i386 don't play nice together. Assuming your hardware supports it, have you considered installing 10.1 amd64? It might mean more work in the short term, but will make life easier in the future.
 
Thank you so much jrm. The last time I looked at the handbook's ZFS section it was pretty sparse. It's now all grown-up and it actually explains things.

I have a couple of more questions now:
  1. Wouldn't a USB image (or a CD) have the same GENERIC kernel that would keep me from mounting my ZFS volume?
  2. I want to try and keep things i386. (I guess this means no more automatic freebsd-update(8) for a while.) Would it be possible to build a ZFS kernel on another machine (a complete FreeBSD running as a virtual machine on my Mac)? Is there some way to use the "Loader Console" to transfer that kernel to /boot from a CD or USB stick?
  3. Where can I find a good tutorial on using the Loader Console? (While I use the system headlessly, I can hook up a monitor and keyboard for situations like this.) It seems like if I can mount a USB drive or a CD with a modified kernel I could change the server's /boot. Is that possible?
 
Last edited by a moderator:
-Wouldn't a USB image (or a CD) have the same GENERIC kernel that would keep me from mounting my ZFS volume?
Note that I linked to the amd64 iso images. Hopefully your hardware supports amd64. If it does than I think you should be able to build a new i386 kernel, import your pool and install the new i386 kernel. Note, I haven't tested any of this, so there might be something I'm missing. I'm pretty sure you can compile an i386 kernel from amd64. You will have to verify this first.

-I want to try and keep things i386. (I guess this means no more automatic freebsd-update(8) for a while.) Would it be possible to build a ZFS kernel on another machine (a complete FreeBSD running as a virtual machine on my Mac)? Is there some way to use the "Loader Console" to transfer that kernel to /boot from a CD or USB stick?
Yes, it's possible to build the kernel elsewhere. I'm not sure about transferring that kernel from the boot loader menu. What you could try though, is placing that kernel on your amd64 bootable usb and transferring the new kernel to the i386 system. Again, this is untested and please backup. Also, I haven't used freebsd-update(8) in awhile, but it used to allow building a new custom kernel if a custom one was installed.

-Where can I find a good tutorial on using the Loader Console? (While I use the system headlessly, I can hook up a monitor and keyboard for situations like this.) It seems like if I can mount a USB drive or a CD with a modified kernel I could change the server's /boot. Is that possible?
The only place I can think of is the handbook. I read/answered in sequence, so I think I've already addressed this?
 
Thank you again jrm.

The server is an old 32-bit Celeron. On the other hand, I hadn't realized that I could use AMD64 on my Intel Macs or any other 64-bit Intel.

It seems that unless I update my server to 64-bit, I have to find some other way to get a special kernel into /boot.

I guess my options are
  • Figure out how to do it with the Loader Console.
  • Using one of those USB<->SATA tabletop adapters mount one of the mirrored pair to a virtual session running FreeBSD AMD64 on a Mac and move the kernel. The other will assume the role of backup and hopefully, if that works, will be reattached later. I'm guessing that ZFS works at a less "physical" layer and doesn't care how the drive is "presented" to it, it will just know to use a USB driver.
  • Would it work if one of the drives was removed from the pool?
  • Swallow the cost and get a 64-bit CPU/mother board/RAM from this decade and follow your suggestion.
Any advice is really appreciated. Thanks.
 
Here's where I am:

I've built and installed a custom kernel and followed the instructions in 20.6.2 of the Handbook. I still get a double fault every time it reboots. However...

...I then physically remove the boot drive, bring it over to my Mac, boot up a Parallels virtual session of FreeBSD, attach the drive through a table-top SATA<-->USB adapter, zpool import then zpool export it, physically reinstall it in my server and power up. It comes right up!

At this point it works about as well as 10.0 has worked for me since I installed it in July of 2014. But when there's a reboot, I get the double fault. Lather, rinse, repeat.

It seems that back in July I also had a double fault and I posted (Thread 47113/) a question regarding it. As I recall, after my last post in the thread, as the last act of A Desperate Man, I tried rebooting off the drive and, lo and behold, it booted up. I the time I attributed it to divine intervention but now I guess that doing the zpool import thing (back then with the Live CD) got me back on track. The difference is that I didn't get double faults until I upgraded to 10.1, which is where I'm at now.

I realize I'll have to sooner-rather-than-latter move to AMD64, add RAM and ditch the Celeron D from 2007 (which may not support the complete instruction set that Clang thinks it does?) but that's a big logistical effort and many hours.

Meanwhile is there anything else I can do to salvage my i386 situation?

And why would the zpool import on another system work?
 
So a couple of nights after the previous post it crashed. (This has been a problem since the upgrade to v10.) This time there was data loss. (Luckily, since one of its tasks is media server, "all" that was lost was the directory with TV shows that I time shift. Who was it who referred to TV as a "vast wasteland"?). So at this point I started fresh on one of the drives as AMD64 (v10.1) then mounted the mirror, and moved the data to the AMD64. I'm still in the process of getting the various ports up and working.

So far I'm amazed. Under AMD64 it's returned to the rock-solid stability I had under v9. And ripping TV to iPhone format ffmpeg takes only 1.3 hours per hour (compared to 2.3h under v9 and 4.5h under v10 and, yes, there are probably some other factors at work here but all the optimizations work now). In fact it's working so well that I'm keeping this motherboard and I've already ordered more RAM to bring it up to 4G. (At some point I may replace the CPU with an "old" Core Duo 2.)

I still need restore mirroring but otherwise it just works.

I'm truly grateful for all the work that's provided to me by the FreeBSD community and I realize that if I have any complaints, I should grab a keyboard and contribute code not complaints. That said, may I please suggest that maybe the i386 v10 isn't quite up to FreeBSD's reputation?

Thanks again to all who helped.
 
Back
Top