I somehow ended up with a very big depconfig file after the last shutdown of my laptop.
localhost:/lib64/rc/cache # ls -al
-rw-r--r-- 1 root root 94824499013408 Dec 30 21:52 depconfig
-rw-r--r-- 1 root root 0 Dec 30 21:52 deptree
-rw-r--r-- 1 root root 4080 Apr 19 2016 nettree
-rw-r--r-- 1 root root 0 Dec 30 21:52 softlevel
localhost:/lib64/rc/cache # du -h --apparent-size depconfig
localhost:/lib64/rc/cache # du -h depconfig
It's a sparse file - the beginning contains the usual content:
As far as I understand is /etc/init.d/savecache responsible for storing the depconfig file, but I assume that something went wrong during this normal shutdown.
It's not reproducible. But it's not the first time - it occured some month ago with an earlier version of openrc also with a size of 87TB.
The configuration of this host is a little bit special (rootfs is ZFS and the concerning ZFS pool contains also a FreeBSD12 installation)
First I assumed that it's a file system corruption, but the underlying file system is fine (neither FreeBSD's native ZFS tools nor the ZoL tools show an error or have problems with this file system....
The live copy of this file is /run/openrc/depconfig. savecache uses
"cp -p" to back it up.
Does the live copy look like this also?
I'm not sure - I only recognized it after I rebooted the laptop. The system was then no longer able to boot successfully this special Gentoo Linux.
When this happened the first time I started a backup with tar of the mounted file system and the zipped tar file got bigger than the original partition (<-- sparse file). I stopped it after an hour or so and et voila the last file of the tar file was /lib64/rc/cache/depconfig. After removing setting the file length to 0. The system rebooted fine again.
Yesterday, when it happened again (with the symptom that the boot hangs - without output on screen). I immediately looked into this directory and the depconfig file was again 87TB.
If savecache does only a 'cp', then the original depconfig file in /run must have been a 87TB sparse file too.