When there are bad blocks, users may encounter the /dev/da0s1a is not a JUNOS snapshot error on EX Series switches.
/dev/da0s1a is not a JUNOS snapshot
This article explains how to recover the switch or virtual chassis from the error.
The output of show system snapshot media internal says /dev/da0s1a is not a JUNOS snapshot .
show system snapshot media internal
labroot@jtac> show system snapshot media internal fpc0: -------------------------------------------------------------------------- error: /dev/da0s1a is not a JUNOS snapshot fpc1: -------------------------------------------------------------------------- error: /dev/da0s1a is not a JUNOS snapshot
This might be because the /var/tmp directory is full or at more than 82% storage due to which the image cannot be uncompressed or because there has been an ungraceful shutdown, which has led to corruption of partitions or flash corruption.
/var/tmp
To check for any file system corruption, perform the following:
root
> start shell user root
Check if any bad blocks exist currently on the primary .
% nand-mediack –C
If there are any bad blocks, a sequence of output will be generated.
% nand-mediack % fsck –f
Check again if any bad blocks exist.
For more information, see KB20570 - [EX/SRX] Recovering from file system corruption during a system reboot, NAND media utility checks for bad blocks in the NAND flash memory [juniper.net] .
Note: After step 4, if the bad blocks still exist, perform the previous steps a few more times to clear the bad blocks. If they continue to exist, it could be a faulty hardware and there may be a need to replace it. Contact Support in this case.
If there are no more bad blocks, continue to the following steps:
request system software add <filepath> member <memberid> reboot
After the primary comes up, execute the show version command, verify the output, and then proceed to create a snapshot as follows:
show version
request system snapshot slice alternate
labroot@jtac > show system snapshot media internal fpc0: -------------------------------------------------------------------------- Information for snapshot on internal (/dev/da0s1a) (primary) Creation date: Jan 14 00:33:17 2019 JUNOS version on snapshot: jdocs-ex: 14.1X53-D40.8 junos : ex-14.1X53-D40.8 junos-ex-4300: 14.1X53-D40.8 jweb-ex: 14.1X53-D40.8 Information for snapshot on internal (/dev/da0s2a) (backup) Creation date: Jan 13 19:32:09 2019 JUNOS version on snapshot: jdocs-ex: 14.1X53-D47.6 junos : ex-14.1X53-D47.6 junos-ex-4300: 14.1X53-D47.6 jweb-ex: 14.1X53-D47.6
In case there is an issue with the primary booting up, we will have to perform a format installation through a USB.
loader>
Execute the following command:
install file:///jinstall-ex-version-domestic-signed.tgz
labroot@jtac> show version fpc0: -------------------------------------------------------------------------- Hostname: jtac-EX4300-24T-r010 Model: ex4300-24t Junos: 14.1X53-D40.8 JUNOS EX Software Suite [14.1X53-D40.8] JUNOS FIPS mode utilities [14.1X53-D40.8] JUNOS Online Documentation [14.1X53-D40.8] JUNOS EX 4300 Software Suite [14.1X53-D40.8] JUNOS Web Management Platform Package [14.1X53-D40.8] JUNOS py-base-powerpc [14.1X53-D40.8]
For more information, see KB20643 - [EX Switch] Rewrite the entire file system by issuing "install --format" command from "Loader" mode (Format Install) [juniper.net] .