Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Need to make sure contents of /dev/shm are restored on reboot - but it seems something is doing that automagically?

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
User avatar
gloomish
Posts: 1
Joined: 2022-04-18 08:34

Need to make sure contents of /dev/shm are restored on reboot - but it seems something is doing that automagically?

#1 Post by gloomish »

Hello to all,
I have been running a server for a while, and one software has always relied on a directory under /dev/shm to exist & be writable.
I noticed that the application fails when the directory doesn't exist or when it doesn't have permissions to access/create it. I can create such a situation easily.
However, I never noticed this to be an issue after a reboot.
Now I noticed that something is restoring the contents of /dev/shm after a reboot. It's very obvious because after the reboot they all have the same timestamps. I presume systemd is doing that, but there is no obvious dev-shm or tmpfile or tmpfs service.

How can I clarify what is doing that, so I can rest in peace about my crucial web app?

And yes, /dev/shm is a tmpfs.

lindi
Debian Developer
Debian Developer
Posts: 407
Joined: 2022-07-12 14:10
Has thanked: 1 time
Been thanked: 77 times

Re: Need to make sure contents of /dev/shm are restored on reboot - but it seems something is doing that automagically?

#2 Post by lindi »

/dev/shm and others are created in https://sources.debian.org/src/elogind/ ... l=251#L239

If an application relies on a directory to always exist in /dev/shm then it really should create that directory itself if it is missing. You should probably open a bug upstream?

Post Reply