I’ve noticed after CyberPanel update to a recent version that upgrade.py script created a file /usr/.tempdisk of 1.5G for loop mount on /tmp, /var/tmp.
Can I ask the reasons behind this?
Is it safe to revert that change back to casual fs or at least change its size?
Thanks, that explains reasons. Still sounds like a waste of space for me. Wouldn’t tmpfs be better for /tmp? I don’t run many sites on CyberPanel, but my /tmp usage are usually only around 10-15 Mb while file with FS are strictly 1.5G. Probably should ask a feature request for custom size and/or tmpfs.
If you can configure /tmp on tmpfs its fine. But normally by default it may not be good, not everyone will have small /tmp and large ram.
You can customize /tmp to your needs, our main goal was to make temp noexec.
Hi, how to delete the /usr/.tempdisk safely? and remove /dev/loop0 too?
my disk space is critical now.
@tiger where do you want to mount /tmp then?
currently? none. o see the usage is 4% from 1.5GB.
i already read “/tmp is now mounted with noexec,nosuid,nodev,nofail flags by default.” but still doesn’t understand what is the usage?
So that no one can execute commands in /tmp, for security reasons.
I also facing this problem, my .tempdisk become 17GB or about 60% of total disk
@panelis you can change it to keep in RAM. Change this line in /etc/fstab:
/usr/.tempdisk /tmp ext4 loop,rw,noexec,nosuid,nodev,nofail 0 0
none /tmp tmpfs size=15%,loop,rw,noexec,nosuid,nodev,nofail 0 0
Where you can adjust maximum allowed RAM used by changing size= part. Reboot and you can rm /usr/.tempdisk.
If wish to keep on disk but less in size, do the following:
- Stop all your services (mariadb, litespeed, etc).
- umount /var/tmp && umount /tmp
- rm /usr/.tempdisk
- dd if=/dev/zero of=/usr/.tempdisk bs=1M count=XX (where XX are wanted size in Mb)
- mkfs.ext4 /usr/.tempdisk
I can also use this to increase the /tmp partition?
Mine if 1.5GB (the default size) and I’m constantly getting core dumps in it so I have to delete those so that /tmp doesn’t run out of space.
Could you explain why should I(we) set block size so 1M?
Also, is it a better idea to have /tmp partition in RAM, given that the server has enough of it?