Hi all, i have been noticing with ubuntu 20.04 LTS, that if i leave Mystic running (under the non-privilaged mystic account), that the tmpfs /run directory, which is 380 megs, fills up over time to 100% full...
Hi all, i have been noticing with ubuntu 20.04 LTS, that if i leave Mystic running (under the non-privilaged mystic account), that the tmpfs /run directory, which is 380 megs, fills up over time to 100% full... has
You'll need to identify what is actually writing all the extra data. Rather than "deleting" the file you'll need to truncate it. If you
delete an open file the filesystem doesn't actually release the space.
but a df will show no extra space until reboot. Without any significant data in
the logs I just truncated them nightly.
Spec
You'll need to identify what is actually writing all the extra data. Rather than "deleting" the file you'll need to truncate it. If you delete an open file the filesystem doesn't actually release the space but a df will show no extra space until reboot. Without any significa data in
the logs I just truncated them nightly.
Spec
Hey! awesome thanks for responding.
by chance, do you know what command you are running to do the
trunication? the only thing that seems to release the space is just rebooting. i have not tried remounting it yet though... so i dont know
if that would help. i did a logout of all accounts associated with /run/user/1000 dir. it also seems that /run is also a seperate mount as well.
I wonder what is causing these files to stick like this and not be
cleared out when the system is done with them... i would imagine that
this should be causing alot of issues for people... i have been trying
to look through my ubuntu 20.04 unleashed book, but can seem to locate anything there. and there doesnt seem to be a lot of info on this issue
or fixes listed in the ubuntu forums. thanks for helping with this.
Hey! awesome thanks for responding. by chance, do you know what
command you are running to do the trunication? the only thing that
A couple of caveats: the actual details of freeing blocks and so
forth are implemented by the filesystems; it's possible there exist filesystems where one can `ftruncate()` a file descriptor or
`truncate()` a file with open references and the allocated block
situation doesn't change; I don't know of any that do that, though.
It's a bit of a weird way to approach the world.
Truncating a file like that can be done using the `truncate(2)`
system call. On most Linux distributions, there's a program
called `truncate` that will likely do what you want.
A couple of caveats: the actual details of freeing blocks and so
forth are implemented by the filesystems; it's possible there exist filesystems where one can `ftruncate()` a file descriptor or `truncate()` a file with open references and the allocated block situation doesn't change; I don't know of any that do that, though. It's a bit of a weird way to approach the world.
I don't know what files he'd have sitting in /run that are continually expanding, but logging at least didn't have sparse files or a write offset. Both appear to just hold the file open and keep appending data. If you delete the open file then regardless of the user space, the filesystem retains the data until the owning application is closed or closes the file itself.
I found it somewhat odd that an echo :>/filename was sufficient to truncate it, and have the space released presumably because it doesn't require a close to change the file. Everything was then happy to just pick up where it left off.
In my iniital hunt for a solution I didn't come across trunc, the boffins just went straight to echo over the existing file.
Sysop: | sneaky |
---|---|
Location: | Ashburton,NZ |
Users: | 31 |
Nodes: | 8 (0 / 8) |
Uptime: | 39:02:40 |
Calls: | 2,096 |
Files: | 11,142 |
Messages: | 949,871 |