This weekend was one of thoses weekend … Sunday morning while trying to destroy an unused jail i got a zfs warning: “pool is degraded”.
As it turn out i was missing a drive in my zfs mirror setup, so heck .. no fun.
After a few email with the hosting company they recommended i migrate over a new server, which is running ok if you’re reading this ;).
I needed to make a backup of the old system, not wanting to reinstall everything from scratch, i dig a bit and made two “files” from the original server:
1/ a backup of the geometry:
which gave me something like that:
2/ a backup of the filesystem:
And voila ! i just had to put this two file over an ftp server.
(well actually the first time i tried using the -D option of zfs send to further shrink the stream, as it turn out it wasn’t a great idea, the recv method didn’t like it).
The new serveur was made available at around 20:00 sunday evening, thanks to some limitation in the cloud tools provided i had to start an automated pre-scripted install before being able to “hack over” the hardware. So i did started the process just before going over to the movie (latest Blade Runner, fine by the way but so slow … ).
So after the movie, the server was up and running and i only had to … reboot it in rescue mode. The rescue mode is a PXE-booted environment that come in multiple “flavor”, including three FreeBSD version, that allow an ssh acces and will allow the reset everything easily.
When the freebsd/rescue is booted /tmp is mounted as a tmpfs, lucky me the memory available on the server is greated that the size of the zfs backup stream so i downloaded everything over it.
The drives where re-partitionned using:
Boot code was installed using:
Apparently the swap took care of itself ;)
The only thing left was .. the file system, this get a bit tricky and it took quite a bit to get it done right but the process should be only:
If, like me, you had to restart the server in rescue mode because the first boot didn’t get you there, there is a few interesting command to consider:
anyway, short things short the new server was up and running after only a 15 minutes service interruption !