This week I encountered this error for the first time in the years I’m working with JunOS now. Last week I installed two SRX’s at a remote datacenter location in NJ, US. All working fine and once back in my home country I added some monitoring checks to the devices and thought, well lets sync the JunOS alternate partition with the primary. This went just fine:
onno@net> show system snapshot media internal
Information for snapshot on internal (/dev/da0s1a) (backup)
Creation date: Aug 29 13:54:23 2015
JUNOS version on snapshot:
junos : 12.1X44-D35.5-domestic
Information for snapshot on internal (/dev/da0s2a) (primary)
Creation date: Apr 7 13:29:14 2016
JUNOS version on snapshot:
junos : 12.1X46-D40.2-domesticonno@net> request system snapshot slice alternate
Formatting alternate root (/dev/da0s1a)…
Copying ‘/dev/da0s2a’ to ‘/dev/da0s1a’ .. (this may take a few minutes)
The following filesystems were archived: /
Then I wanted to double check it both partitions contained the same version, and then I got the error:
onno@net> show system snapshot media internal
error: cannot mount /dev/da0s1a
Eehhh .. wait .. what? That’s not something you want to see on a SRX more than 6000km away. (this is a location with, for now, single internet connection)
So I retried the request snapshot command, without success:
onno@net> request system snapshot slice alternate
Formatting alternate root (/dev/da0s1a)…
error: Could not format alternate root
After digging around I found similar issues on EX’s which were cause by the backup partition still mounted. However I didn’t find the /dev/da0s1a mounted, but did find the following:
onno@net> start shell
% mount
(snip)
/dev/altroot on /altroot (ufs, local, noatime, soft-updates)
(snip)
Solution
Looking at the other SRX, there was no /dev/altroot mounted. So I just unmounted it, and ran the same commands again. Now there’s no error and all fine:
onno@net> start shell
% su –
Password:
root@net% umount /altroot
root@net% exit
logout
% exit
exit
onno@net> request system snapshot slice alternate
Formatting alternate root (/dev/da0s1a)…
Copying ‘/dev/da0s2a’ to ‘/dev/da0s1a’ .. (this may take a few minutes)
The following filesystems were archived: /onno@net> show system snapshot media internal
Information for snapshot on internal (/dev/da0s1a) (backup)
Creation date: Apr 15 07:30:11 2016
JUNOS version on snapshot:
junos : 12.1X46-D40.2-domestic
Information for snapshot on internal (/dev/da0s2a) (primary)
Creation date: Apr 7 13:29:14 2016
JUNOS version on snapshot:
junos : 12.1X46-D40.2-domestic
Thanks Onno,
your post solved same issue on SRX650. Many thanks.
Hi Edin,
Good to hear! Thanks for letting me know it was helpful.
– Onno
Great post. Very helpfull. You saved me. Thanks a lot
Hi,
Great it helped! Thanks for letting me know.
-Onno.
Great, thank you!!!
Great it helped!
Hi John,
Glad it helped you! Thanks for mentioning it.
– Onno.
Helped very much on a SRX 650! Thank you
Hi Simon,
You’re welcome. Good to hear it helped. Thanks!
– Onno
Muchas Gracias
Excelente Dato
Great post.
Very useful.
Thanks again helped on SRX650
Awesome! Thank you that was helpful!
Thanks, this was very helpful when I encountered exactly the same error.
Thank you!! works on a SRX300
Years later, but still usefull 😉 Solves same issue as well on SRX320.
Many thanks.
(I’ve discovered that this happens, if you previously started “request system snapshot slice alternate” and did not wait for it to finish and close your ssh session. In this case, the altroot will not be unmounted)
thank you. this worked
It’s very helpful for me. Thanks a lot!
Many thanks!