{"id":66,"date":"2016-04-15T15:49:39","date_gmt":"2016-04-15T13:49:39","guid":{"rendered":"http:\/\/www.b00z.nl\/blog\/?p=66"},"modified":"2016-04-15T15:49:39","modified_gmt":"2016-04-15T13:49:39","slug":"juniper-srx-error-could-not-format-alternate-root-solution","status":"publish","type":"post","link":"https:\/\/www.b00z.nl\/blog\/2016\/04\/juniper-srx-error-could-not-format-alternate-root-solution\/","title":{"rendered":"Juniper SRX &#8211; error: Could not format alternate root | Solution"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignright size-medium wp-image-69\" src=\"http:\/\/www.b00z.nl\/blog\/wp-content\/uploads\/2016\/04\/srx-01-300x142.png\" alt=\"srx-01\" width=\"300\" height=\"142\" srcset=\"https:\/\/www.b00z.nl\/blog\/wp-content\/uploads\/2016\/04\/srx-01-300x142.png 300w, https:\/\/www.b00z.nl\/blog\/wp-content\/uploads\/2016\/04\/srx-01.png 395w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/>This week I encountered this error for the first time in the years I&#8217;m working with JunOS now. Last week I installed two SRX&#8217;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:<\/p>\n<blockquote><p>onno@net&gt; show system snapshot media internal<br \/>\nInformation for snapshot on\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 internal (\/dev\/da0s1a) (backup)<br \/>\nCreation date: Aug 29 13:54:23 2015<br \/>\nJUNOS version on snapshot:<br \/>\njunos\u00a0 : 12.1X44-D35.5-domestic<br \/>\nInformation for snapshot on\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 internal (\/dev\/da0s2a) (primary)<br \/>\nCreation date: Apr 7 13:29:14 2016<br \/>\nJUNOS version on snapshot:<br \/>\njunos\u00a0 : 12.1X46-D40.2-domestic<\/p>\n<p>onno@net&gt; request system snapshot slice alternate<br \/>\nFormatting alternate root (\/dev\/da0s1a)&#8230;<br \/>\nCopying &#8216;\/dev\/da0s2a&#8217; to &#8216;\/dev\/da0s1a&#8217; .. (this may take a few minutes)<br \/>\nThe following filesystems were archived: \/<\/p><\/blockquote>\n<p>Then I wanted to double check it both partitions contained the same version, and then I got the error:<\/p>\n<blockquote><p>onno@net&gt; show system snapshot media internal<br \/>\nerror: cannot mount \/dev\/da0s1a<\/p><\/blockquote>\n<p>Eehhh .. wait .. what? That&#8217;s not something you want to see on a SRX more than 6000km away. (this is a location with, for now, single internet connection)<br \/>\nSo I retried the request snapshot command, without success:<\/p>\n<blockquote><p>onno@net&gt; re\b\b\b\bquest system snapshot slice alternate<br \/>\nFormatting alternate root (\/dev\/da0s1a)&#8230;<br \/>\nerror: Could not format alternate root<\/p><\/blockquote>\n<p>After digging around I found similar issues on EX&#8217;s which were cause by the backup partition still mounted. However I didn&#8217;t find the \/dev\/da0s1a mounted, but did find the following:<\/p>\n<blockquote><p>onno@net&gt; start shell<br \/>\n% mount<br \/>\n(snip)<br \/>\n\/dev\/altroot on \/altroot (ufs, local, noatime, soft-updates)<br \/>\n(snip)<\/p><\/blockquote>\n<h2>Solution<\/h2>\n<p>Looking at the other SRX, there was no \/dev\/altroot mounted. So I just unmounted it, and ran the same commands again. Now there&#8217;s no error and all fine:<\/p>\n<blockquote><p>onno@net&gt; start shell<br \/>\n% su &#8211;<br \/>\nPassword:<br \/>\nroot@net% umount \/altroot<br \/>\nroot@net% exit<br \/>\nlogout<br \/>\n% exit<br \/>\nexit<br \/>\nonno@net&gt; request system snapshot slice alternate<br \/>\nFormatting alternate root (\/dev\/da0s1a)&#8230;<br \/>\nCopying &#8216;\/dev\/da0s2a&#8217; to &#8216;\/dev\/da0s1a&#8217; .. (this may take a few minutes)<br \/>\nThe following filesystems were archived: \/<\/p>\n<p>onno@net&gt; show system snapshot media internal<br \/>\nInformation for snapshot on\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 internal (\/dev\/da0s1a) (backup)<br \/>\nCreation date: Apr 15 07:30:11 2016<br \/>\nJUNOS version on snapshot:<br \/>\njunos\u00a0 : 12.1X46-D40.2-domestic<br \/>\nInformation for snapshot on\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 internal (\/dev\/da0s2a) (primary)<br \/>\nCreation date: Apr 7 13:29:14 2016<br \/>\nJUNOS version on snapshot:<br \/>\njunos\u00a0 : 12.1X46-D40.2-domestic<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>This week I encountered this error for the first time in the years I&#8217;m working with JunOS now. Last week I installed two SRX&#8217;s at a remote datacenter location in NJ, US. All working fine and once back in my &hellip; <a href=\"https:\/\/www.b00z.nl\/blog\/2016\/04\/juniper-srx-error-could-not-format-alternate-root-solution\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[36,12,20,38,35,37,14],"class_list":["post-66","post","type-post","status-publish","format-standard","hentry","category-juniper","tag-alternate-root","tag-juniper-2","tag-junos","tag-request-system-snapshot","tag-snapshot","tag-solution","tag-srx"],"_links":{"self":[{"href":"https:\/\/www.b00z.nl\/blog\/wp-json\/wp\/v2\/posts\/66","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.b00z.nl\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.b00z.nl\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.b00z.nl\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.b00z.nl\/blog\/wp-json\/wp\/v2\/comments?post=66"}],"version-history":[{"count":2,"href":"https:\/\/www.b00z.nl\/blog\/wp-json\/wp\/v2\/posts\/66\/revisions"}],"predecessor-version":[{"id":70,"href":"https:\/\/www.b00z.nl\/blog\/wp-json\/wp\/v2\/posts\/66\/revisions\/70"}],"wp:attachment":[{"href":"https:\/\/www.b00z.nl\/blog\/wp-json\/wp\/v2\/media?parent=66"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.b00z.nl\/blog\/wp-json\/wp\/v2\/categories?post=66"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.b00z.nl\/blog\/wp-json\/wp\/v2\/tags?post=66"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}