Package: cachefilesd
Version: 0.10.10-0.2~bpo10+1
I am using cachefilesd to cache the $HOME folders residing on a ZFS
server mounted over NFS. Cachefilesd consistently used to fail to start
upon boot, and would start instantly given a manual start command. This
behaviour was consistent on Stretch and now on Buster as well, on ca. 10
clients. This evening I was trying to find a way to automate the 'manual
start command' upon boot when I came across the
/etc/rc0.d/K01cachefilesd file. To my surprise, that init file uses
(although commented out) an otherwise undocumented variable $STARTTIME
with the comment that some servers fail to start and the init file can
be instructed to wait for <x> seconds before erroring out.
Setting this variable to the value of 2 seems to have fixed my problem
on all clients involved.
If this variable would be present in the default
/etc/default/cachefilesd config file, I would have played around with
that setting much sooner. It doesn't have to be set (or it can be 0 for
all I care), but just having some form of documentation on this option
could help solve other people's issues with this package.
--
*** Output without STARTTIME=2
# systemctl status cachefilesd
● cachefilesd.service - LSB: CacheFiles daemon
Loaded: loaded (/etc/init.d/cachefilesd; generated)
Active: failed (Result: exit-code) since Tue 2019-12-03 21:01:00 CET;
12s ago
Docs: man:systemd-sysv-generator(8)
Process: 612 ExecStart=/etc/init.d/cachefilesd start (code=exited,
status=1/FAILURE)
Tasks: 1 (limit: 4915)
Memory: 16.0M
CGroup: /system.slice/cachefilesd.service
└─725 /sbin/cachefilesd
dec 03 21:01:00 <MACHINE> systemd[1]: Starting LSB: CacheFiles daemon...
dec 03 21:01:00 <MACHINE> cachefilesd[612]: Starting FilesCache daemon :
cachefilesd failed!
dec 03 21:01:00 <MACHINE> cachefilesd[725]: Daemon Started
dec 03 21:01:00 <MACHINE> systemd[1]: cachefilesd.service: Control
process exited, code=exited, status=1/FAILURE
dec 03 21:01:00 <MACHINE> systemd[1]: cachefilesd.service: Failed with
result 'exit-code'.
dec 03 21:01:00 <MACHINE> systemd[1]: Failed to start LSB: CacheFiles
daemon.
# systemctl start cachefilesd
# systemctl status cachefilesd
● cachefilesd.service - LSB: CacheFiles daemon
Loaded: loaded (/etc/init.d/cachefilesd; generated)
Active: active (running) since Tue 2019-12-03 21:01:20 CET; 1s ago
Docs: man:systemd-sysv-generator(8)
Process: 1097 ExecStart=/etc/init.d/cachefilesd start (code=exited,
status=0/SUCCESS)
Tasks: 1 (limit: 4915)
Memory: 16.7M
CGroup: /system.slice/cachefilesd.service
└─725 /sbin/cachefilesd
dec 03 21:01:20 <MACHINE> systemd[1]: This usually indicates unclean
termination of a previous run, or service implementation deficiencies.
dec 03 21:01:20 <MACHINE> systemd[1]: Starting LSB: CacheFiles daemon...
dec 03 21:01:20 <MACHINE> cachefilesd[1097]: Starting FilesCache daemon
: cachefilesd apparently already running.
dec 03 21:01:20 <MACHINE> systemd[1]: Started LSB: CacheFiles daemon.
--
Debian Buster 10.2 with BPO enabled for kernel and video drivers
--
Vincent Van Houtte