Skip to main content

Could Not Format Alternate Root

(2021-01-26)

Problem

rancid@s-reserve> request system snapshot slice alternate
fpc0:
--------------------------------------------------------------------------
Formatting alternate root (/dev/da0s1a)…
error: Could not format alternate root

Solution

{master:0}
rancid@s-reserve> start shell
% su -
Password:
root@s-reserve:RE:0% umount /altroot
root@s-reserve:RE:0% exit
logout
% exit
exit

{master:0}
rancid@s-reserve> request system snapshot slice alternate
fpc0:
--------------------------------------------------------------------------
Formatting alternate root (/dev/da0s1a)…
Copying '/dev/da0s2a' to '/dev/da0s1a' .. (this may take a few minutes)
The following filesystems were archived: /

{master:0}
rancid@s-reserve>

Commentary

I got into this state by trying to run the "snapshot" command through a jlogin loop. jlogin seems to enforce timeouts more aggressively when a bunch of target systems are specified at the same time; and when jlogin disconnects, the snapshot command seems to abort, leaving the altroot still mounted.

Stepping through the switches one at a time and manually running the snapshot command after unmounting altroot worked properly for most of my switches (I think one or two have flash that's going bad, but that's a separate issue).