Description

This article provides information regarding configuration file management on specific Juniper EX switches, and the /var/db/config directory sizes.

Symptoms

What is the size of the /var/db/config diretory on EX Switch platforms?

Solution

EX switch supports two types of configuration :

a) Active configuration
 This is the active running configuration and currently operating on the device.

b) Candidate configuration
Editing of active configuration is called the candidate configuration. These changes do not take effect until you commit them.
When committed, candidate configuration becomes active and a new candidate is created.

Junos will save the last 50 configuration changes and this is called rollback configuration.The most recently saved configuration is termed as number 0, and the oldest saved configuration is number 49. If you do not specify any arguments, the candidate configuration is compared against the active configuration file ( /config/juniper.conf ).

  • Rollback configurations from 0 to 3 are saved in /config/ ( /config/juniper.conf.n ) where n=0 to 3
  • Rollback configurations from 4 to 49 stored in /var/db/config/  ( /var/db/config/junipe.conf.n ) where n=4 to 49


The uncommitted, candidate configuration file is /var/rundb/juniper.db. The /var/rundb folder directory sizes are listed below, and vary based on the EX platform and junos versions.
(Also see link "Committing a Junos OS Configuration" below)

File system  Size  Used  Avail Capacity Mounted on
  /dev/md9              59M   14M  40M    26%     /var/rundb   <--EX2200 is 59M
/dev/md9      59M   11M  43M    21%     /var/rundb   <--EX3200 is 59M
/dev/md17     118M  17M  91M    16%     /var/rundb   <--Ex4200 is 118M
/dev/md16     118M  14M  94M    13%     /var/rundb   <--EX4500 is 118M
/dev/md16     236M  15M  202M   7%      /var/rundb   <--XRE is 236M
/dev/md9      236M  12M  205M   6%      /var/rundb   <--EX8200 is 236M

 

Verify /var/rundb/ file size:

root@EX> file list /var/rundb/ detail
/var/rundb/:
total 25876
drwxrwxr-x 2 root operator 512 Jan 1 00:00 .snap/
-rw-r--r-- 1 root config 1048576 Jan 1 22:23 chassisd.dynamic.db
-rw-r----- 1 root config 2621440 Jan 1 22:23 juniper.data
-rw-r----- 1 root config 2621440 Jan 2 03:08 juniper.db
-rw-r----- 1 root config 2621440 Jan 1 00:00 juniper.dyn
-rw-r----- 1 root config 2621440 Jan 1 22:23 juniper.save
drwxr-xr-x 2 root config 512 Jan 1 00:00 private/
-rw-r----- 1 root config 11534336 Jan 1 00:01 schema.db
drwxr-xr-x 2 root config 512 Jan 1 00:00 sdb/

When you commit a configuration, you commit the entire configuration in its current form. Configuration doesn't depend on the number of configuration lines on EX switch. We can simplify the configuration and reduce the file size by creating configuration groups with wildcards or defining less specific match policies in the firewall filters or by summarizing the IP routing table.

Modification History

2020-04-18 - Updated related link to the technical documentation on configuration files overview.

Related Information