This article provides information about the location in which QFabric stores current and old configuration files. It also explains with the procedure to remove and update the symbolic links for the storage location.
Junos stores the last 50 configurations in flash. Below are the storage locations in different Junos versions.
13.2X52-D25.4:
The last 49 configuration files are stored in DG (Director Group) in the following location:
/pbdata/mgd_shared/172.22.157.44/var/db/config
Here, 172.22.157.44 is the default QFabric partition IP address:
[root@dg0 config]# pwd
[root@dg0 config]# ls
juniper.conf.10.gz juniper.conf.17.gz juniper.conf.23.gz juniper.conf.2.gz juniper.conf.36.gz juniper.conf.42.gz juniper.conf.49.gz
juniper.conf.11.gz juniper.conf.18.gz juniper.conf.24.gz juniper.conf.30.gz juniper.conf.37.gz juniper.conf.43.gz juniper.conf.4.gz
juniper.conf.12.gz juniper.conf.19.gz juniper.conf.25.gz juniper.conf.31.gz juniper.conf.38.gz juniper.conf.44.gz juniper.conf.5.gz
juniper.conf.13.gz juniper.conf.1.gz juniper.conf.26 juniper.conf.32.gz juniper.conf.39.gz juniper.conf.45.gz juniper.conf.6.gz
juniper.conf.14.gz juniper.conf.20.gz juniper.conf.27.gz juniper.conf.33.gz juniper.conf.3.gz juniper.conf.46.gz juniper.conf.7.gz
juniper.conf.15.gz juniper.conf.21.gz juniper.conf.28.gz juniper.conf.34.gz juniper.conf.40.gz juniper.conf.47.gz juniper.conf.8.gz
juniper.conf.16.gz juniper.conf.22.gz juniper.conf.29.gz juniper.conf.35.gz juniper.conf.41.gz juniper.conf.48.gz juniper.conf.9.gz
[root@dg0 1]# pwd
/pbdata/mgd_shared/repository/1
[root@dg0 1]# ls -l
total 360
-rw------- 1 root root 16923 Feb 16 01:40 juniper.conf.63
-rw------- 1 root root 16933 Feb 16 01:43 juniper.conf.64
-rw------- 1 root root 2621440 Feb 16 01:40 juniper.save.63
-rw------- 1 root root 2621440 Feb 16 01:43 juniper.save.64
For example, a change is made and after the commit, .64 becomes the last active configuration, which was earlier the active configuration. A new file has been created with revision .65 for the current active configuration:
root@qfabric1# delete vlans test
root@qfabric1# commit
commit complete
[root@dg1 1]# ls -l
total 232
-rw------- 1 root root 8444 Jan 15 11:59 juniper.conf.64
-rw------- 1 root root 8481 Jan 15 12:02 juniper.conf.65
-rw------- 1 root root 2621440 Jan 15 11:59 juniper.save.64
-rw------- 1 root root 2621440 Jan 15 12:02 juniper.save.65
Symbolic link:
[root@dg1 /]# pwd
/
[root@dg1 /]# ls -lh | grep config
lrwxrwxrwx 1 root root 38 Dec 9 2015 config -> /pbdata/mgd_shared/172.22.157.44 /config
14.1X53-D42.3 / 14.1X53-D121.4 / 14.1X53-D122.8 / 14.1X53-D140.13
In newer code 14.1X53-D42.3, it points to a different location. The last 49 configuration files are stored in DG (Director Group) at the following location:
[root@dg1 ~]# cd /pbdata/mgd_shared/1/var/db/config
[root@dg1 config]# ls
juniper.conf.13.gz juniper.conf.1.gz juniper.conf.26.gz juniper.conf.32.gz juniper.conf.39.gz juniper.conf.45.gz juniper.conf.6.gz
The current configuration is stored in the following path:
[root@dg1 ~]# cd /pbdata/mgd_shared/repository/1
[root@dg1 1]# pwd
[root@dg1 1]# ls
hostname juniper.conf.51 juniper.conf.52 juniper.save.51 juniper.save.52
lrwxrwxrwx 1 root root 27 Apr 18 12:01 config -> /pbdata/mgd_shared/1/config
In some rare cases, symbolic link may not be updated and will return the error below. In this scenario, you'll be required to update the symbolic link on both the DGs.
root@qfabric# commit confirmed 2
error: commit confirmed failed during copy of rollback data
error: if [system compress-configuration-files] has changed, commit that change alone
root@Qfabric-M> show version
Hostname: Qfabric-M
Model: qfx3000-m
Serial Number: qfab100000
QFabric System ID: 814aa864-42ff-11e8-ad22-00e081cbcbfc
JUNOS Base Version [ 14.1X53-D121.4 ]
[root@dg1 config]# pwd
/pbdata/mgd_shared/1/var/db/config
Jul 5 11:25:22 <19.5> dg1 qfd_mgd[13503]: UI_MYSQL_PUT_ASCII_CONFIG: Reading current ascii configuration from /opt/demo/mgdhive/1/config/juniper.conf for partition 1
Jul 5 11:25:22 <19.5> dg1 qfd_mgd[13503]: UI_MYSQL_UPDATE_BINARY_CONFIG: Binary configuration update succeeded for partition 1, new revision is: 53
Jul 5 11:25:22 <19.5> dg1 qfd_mgd[13503]: UI_MYSQL_UPDATE_ASCII_CONFIG: Ascii configuration update succeeded for partition 1, new revision is: 53
2018-07-05 11:25:15 ICT: copying configuration to juniper.save
2018-07-05 11:25:15 ICT: activating '/opt/demo/mgdhive/1/var/run/db/juniper.data'
2018-07-05 11:25:20 ICT: notifying daemons of new configuration
2018-07-05 11:25:20 ICT: Rotate backup configs
2018-07-05 11:25:22 ICT: notifying all secondary
lrwxrwxrwx 1 root root 38 Dec 9 2015 config -> /pbdata/mgd_shared/010.49.201.1/config <<<--- old location
[root@ dg1 var]# rm /config
rm: remove symbolic link `/config'? y
[root@ dg1 var]# ln -s /pbdata/mgd_shared/1/config/ /config
[root@ dg1 var]# ls -la /config
lrwxrwxrwx 1 root root 28 Jul 5 12:10 /config -> /pbdata/mgd_shared/1/config/ <-- new location
[root@ dg1 var]# pwd
/opt/demo/mgdhive/1/var
[root@ dg1 var]#
[root@ dg0 ~]# cd /pbdata/mgd_shared/1/config
[root@ dg0 config]# ls -lh /config
lrwxrwxrwx 1 root root 37 Dec 9 2015 /config -> /pbdata/mgd_shared/10.49.201.1/config <-- old location
[root@ dg0 config]# rm /config
[root@ dg0 config]# ln -s /pbdata/mgd_shared/1/config/ /config
[root@ dg0 config]# ls -la /config
lrwxrwxrwx 1 root root 28 Jul 5 12:13 /config -> /pbdata/mgd_shared/1/config/ <-- new location
[root@ dg0 config]# pwd
/pbdata/mgd_shared/1/config
[root@ dg0 config]#
2018-08-22: Updated the path and the symbolic link for older and newer codes. 2021-04-21: Minor edits. Article is correct and complete for the latest Junos codes - 14.1X53-D122.8 / 14.1X53-D140.13.