Support Support Downloads Knowledge Base Apex Support Portal Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[MX/T/M] How to recover the /var directory in the file system?



Article ID: KB13019 KB Last Updated: 22 May 2020Version: 3.0

This article explains why the Hard Disk may be seen in the show chassis hardware detail output and boot sequence sysctl -a |grep bootdev but missing in /var in the show system storage output. It also details the steps to recover from this problem.



In some cases, the HDD is present in the hardware inventory and boot sequence but the /var directory cannot be seen in the file system while issuing the show system storage command.

Below are the symptoms of the problem.

/var is not seen in the show system storage output:

re1> show system storage
Filesystem              Size       Used      Avail  Capacity   Mounted on
/dev/ad0s1a             865M       109M       687M       14%  /
devfs                   1.0K       1.0K         0B      100%  /dev
devfs                   1.0K       1.0K         0B      100%  /dev/
/dev/md0                 26M        26M         0B      100%  /packages/mnt/jbase
/dev/md1                110M       110M         0B      100%  /packages/mnt/jkernel-9.0R3.6
/dev/md2                 38M        38M         0B      100%  /packages/mnt/jpfe-T-9.0R3.6
/dev/md3                3.7M       3.7M         0B      100%  /packages/mnt/jdocs-9.0R3.6
/dev/md4                 35M        35M         0B      100%  /packages/mnt/jroute-9.0R3.6
/dev/md5                 10M        10M         0B      100%  /packages/mnt/jcrypto-9.0R3.6
/dev/md6                 22M        22M         0B      100%  /packages/mnt/jpfe-common-9.0R3.6
/dev/md7                2.0G       280K       1.8G        0%  /tmp
/dev/md8                2.0G        33M       1.8G        2%  /mfs
/dev/ad0s1e              96M        48K        88M        0%  /config
procfs                  4.0K       4.0K         0B      100%  /proc

ad1 (HDD) is listed in the hardware inventory:

re1> show chassis hardware detail | match "ad|Rou"
Routing Engine 0 REV 07   740-008883   P11123903280      RE-4.0
ad0     977 MB  SanDisk SDCFJ-1024   019314J0807J2535  Compact Flash
ad1   28615 MB  FUJITSU MHT2030AR    NN6QT52154UB      Hard Disk
Routing Engine 1 REV 07   740-008883   P11123902797      RE-4.0
ad0     977 MB  SanDisk SDCFJ-1024   012013I1807L5405  Compact Flash
ad1   28615 MB  FUJITSU MHT2030AR    NN6QT52155S7      Hard Dis

HDD is present in the boot sequence:

lab@Centre-re1> start shell
% sysctl -a |grep bootdev
machdep.guessed_bootdev: 2686451712
machdep.bootdevs: pcmcia-flash,pcmcia-flash-1,compact-flash,disk,lan
machdep.nextbootdev: pcmcia-flash
machdep.currbootdev: compact-flash



When the /var (HDD) directory is missing in multiple Routing engines, this might not be a hardware problem and this could easily be recovered by using the procedures below. If these steps do not solve the problem, the Routing Engine may need to be replaced due to a hardware issue.

The /var directory can be recovered with the following procedure:

  1. Boot up RE into single user mod. See steps 1 through 3 of KB1972 - How to recover root password for Junos.

  2. Issue the command: fsck -y /dev/ad1s1f a few times to correct any error.

  3. Issue the command: mount /var

  4. Reboot the RE again to see if /var can be successfully mounted on /dev/ad1.


Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search