Description

The alternate partition is corrupt and the following error is observed:

error: /dev/da0s2a is not a JUNOS snapshot

Symptoms

The following error is seen on the alternate partition:

root> show system snapshot media internal
fpc0:
------------------------------------------------------------------
Information for snapshot on       internal (/dev/da0s1a) (primary)
Creation date: Nov 12 13:48:58 2018
JUNOS version on snapshot:
jbase  : ex-12.3R9.4
jkernel-ex: 12.3R9.4
jcrypto-ex: 12.3R9.4
jdocs-ex: 12.3R9.4
jswitch-ex: 12.3R9.4
jpfe-ex42x: 12.3R9.4
jroute-ex: 12.3R9.4
jweb-ex: 12.3R9.4
fips-mode-powerpc: 12.3R9.4
error: /dev/da0s2a is not a JUNOS snapshot

Solution

The alternate root partition might have been corrupted, which lead to this error condition.

  1. Check the traces of bad blocks:

    INCORRECT BLOCK COUNT I=133 (156 should be 152)
    CORRECT? no
    
    ** Phase 2 - Check Pathnames
    ** Phase 3 - Check Connectivity
    ** Phase 4 - Check Reference Counts
    ** Phase 5 - Check Cyl groups
    FREE BLK COUNT(S) WRONG IN SUPERBLK
    SALVAGE? no
    
    SUMMARY INFORMATION BAD
    SALVAGE? no
    
    BLK(S) MISSING IN BIT MAPS
    SALVAGE? no
  2. Perform nand-mediack checks and clear to clean up the file system:

    root@uer02:RE:0% nand-mediack -C
    Media check on da0 on ex platforms
    root@uer02:RE:0%
    root@uer02:RE:0% nand-mediack
    Media check on da0 on ex platforms
  3. Proceed with one system reboot.

  4. After the reboot, if the error still exists, un-mount the temporary mount point for the alternate partition:

    root@uer02:RE:0% fsck -f -y /dev/da0s2a
    ** /dev/da0s2a
    ** Last Mounted on /tmp/snap-tmp.1736/mnt.1736 <<<<<<
    ** Phase 1 - Check Blocks and Sizes
    ** Phase 2 - Check Pathnames
    ** Phase 3 - Check Connectivity
    ** Phase 4 - Check Reference Counts
    ** Phase 5 - Check Cyl groups
    4 files, 4 used, 94098 free (34 frags, 11758 blocks, 0.0% fragmentation)
    
    root@uer02:RE:0% umount /tmp/snap-tmp.1736/mnt.1736
    umount: /tmp/snap-tmp.1736/mnt.1736: statfs: No such file or directory
    umount: /tmp/snap-tmp.1736/mnt.1736: unknown file system
  5. The error still exists:

    error: /dev/da0s2a is not a JUNOS snapshot
  6. Snapshot slice alternate formatted the alternate root partition slice da0s2a 

    root> request system snapshot media internal slice alternate
    fpc0:
    --------------------------------------------------------------------------
    Formatting alternate root (/dev/da0s2a)...
    Copying '/dev/da0s1a' to '/dev/da0s2a' .. (this may take a few minutes)
    The following filesystems were archived: /
    
    {master:0}
    root> show system snapshot media internal
    fpc0:
    --------------------------------------------------------------------------
    Information for snapshot on       internal (/dev/da0s1a) (primary)
    Creation date: Nov 12 13:48:58 2018
    JUNOS version on snapshot:
    jbase  : ex-12.3R9.4
    jkernel-ex: 12.3R9.4
    jcrypto-ex: 12.3R9.4
    jdocs-ex: 12.3R9.4
    jswitch-ex: 12.3R9.4
    jpfe-ex42x: 12.3R9.4
    jroute-ex: 12.3R9.4
    jweb-ex: 12.3R9.4
    fips-mode-powerpc: 12.3R9.4
    Information for snapshot on       internal (/dev/da0s2a) (backup)
    Creation date: Dec 12 17:51:58 2018
    JUNOS version on snapshot:
    jbase  : ex-12.3R9.4
    jkernel-ex: 12.3R9.4
    jcrypto-ex: 12.3R9.4
    jdocs-ex: 12.3R9.4
    jswitch-ex: 12.3R9.4
    jpfe-ex42x: 12.3R9.4
    jroute-ex: 12.3R9.4
    jweb-ex: 12.3R9.4
    fips-mode-powerpc: 12.3R9.4