This article discusses a configuration failure on MX devices, wherein an attempt to commit a configuration fails with the error message "error: could not open configuration database".
When attempting to commit a configuration, you may encounter the following error:
re0# commit confirmed 1 member1-re0: error: could not open configuration database (juniper.data+)
This error indicates a lack of storage memory within the /var directory, or in some instances, that the Hard Disk Drive is missing. The output of the command show system storage might look similar to this:
/var
show system storage
mxuser@lab> show system storage Filesystem Size Used Avail Capacity Mounted on /dev/ad0s1a 885M 111M 703M 14% / devfs 1.0K 1.0K 0B 100% /dev devfs 1.0K 1.0K 0B 100% /dev/ /dev/md0 23M 23M 0B 100% /packages/mnt/jbase /dev/md1 80M 80M 0B 100% /packages/mnt/jkernel-8.5-20080816.0 /dev/md2 40M 40M 0B 100% /packages/mnt/jpfe-M320-8.5-20080816.0 /dev/md3 3.5M 3.5M 0B 100% /packages/mnt/jdocs-8.5-20080816.0 /dev/md4 28M 28M 0B 100% /packages/mnt/jroute-8.5-20080816.0 /dev/md5 8.8M 8.8M 0B 100% /packages/mnt/jcrypto-8.5-20080816.0 /dev/md6 37M 37M 0B 100% /packages/mnt/jpfe-common-8.5-20080816.0 /dev/md7 2.0G 8.0K 1.8G 0% /tmp /dev/md8 2.0G 1.9G -139.5M 108% /mfs /dev/ad0s1e 98M 1.0M 89M 1% /config procfs 4.0K 4.0K 0B 100% /proc
From a directory structure point of view, /var is under /mfs .
/mfs
If this error is received after using only the commit command, it can be resolved by cleaning up the /var directory. Delete any unnecessary files from that directory and the user should be able to commit without further issue.
commit
Check which files are consuming more memory space by using the following command:
start shell sh -c 'find / -size +10485760c 2> /dev/null' | xargs du -h | sort -nr
After you identify the files that are consuming a lot of space, you can review and delete unnecessary files to free up memory space.
If the error persists when trying to commit after cleaning out the /var directory, contact Support .
If this error occurs on RE 1 when attempting a "commit sync," this could indicate that the hard disk is missing from that RE. Check the status of the hard disk drive with the following command:
start shell su <<<<(if not logged in as root) root@m5% sysctl -a | grep bootdevs
If the hard drive (disk) is missing, add it back with the following command:
root@m5% sysctl -w machdep.bootdevs=pcmcia-flash,compact-flash,disk,lan
If the hard disk drive cannot be added to the boot list, or if the issue remains after adding the hard disk drive to the boot list, then open a case with Support .
2020-06-15: Article reviewed for accuracy; added a command in solution section to find the files that are consuming more memory space