(Based on an email conversation with Rowland) Samba currently stores various files in $lockdir that are ideally preserved after a reboot. These should either be in $cachedir (if they can be removed and would be regenerated without causing data loss) or elsewhere (maybe /var/lib/samba?) if they need to be preserved. lockdir should be used for application-shared lock files, and is stored in memory on most modern Linux systems - https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch05s09.html