Resize Temp folder not working after reboot

vishnunuk1

Member
Apr 20, 2014
5
0
1
cPanel Access Level
Root Administrator
I edit my $tmpdsksize to 4GB

[email protected] [/]# umount -l /tmp
[email protected] [/]# umount -l /var/tmp
[email protected] [/]# rm -fv /usr/tmpDSK
removed `/usr/tmpDSK’
[email protected] [/var/tmp]# /scripts/securetmp
*** Notice *** No loop module detected
If the loopback block device is built as a module, try running `modprobe loop` as root via ssh and running this script again.
If the loopback block device is built into the kernel itself, you can ignore this message.
Would you like to secure /tmp & /var/tmp at boot time? (y/n) y
Would you like to secure /tmp & /var/tmp now? (y/n) y
Securing /tmp & /var/tmp
/tmp is already secure
/var/tmp is already secure
Checking fstab for entries …Done
Logrotate TMPDIR already configured
Process Complete

Now in ""Home »System Health »Show Current Disk Usage""
/dev/mapper/vg_cpanel-lv_tmp is 4GB

Everything is fine now.

But after a reboot it will automatically reset to default 504m

Please help me
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,216
363
Hello :)

The securetmp script will utilize 1% of disksize with a minimum of 500M and a maximum of 4G, based on the available space on the /usr partition (where the tmpDSK file is stored). In the output above, I see:

Would you like to secure /tmp & /var/tmp at boot time? (y/n) y
You will likely want to choose "N" for that option if the space is reverting to the lower value at boot time.

Thank you.
 

vishnunuk1

Member
Apr 20, 2014
5
0
1
cPanel Access Level
Root Administrator
Hello :)

The securetmp script will utilize 1% of disksize with a minimum of 500M and a maximum of 4G, based on the available space on the /usr partition (where the tmpDSK file is stored). In the output above, I see:



You will likely want to choose "N" for that option if the space is reverting to the lower value at boot time.

Thank you.
Code:
Would you like to secure /tmp & /var/tmp at boot time? (y/n) n
securetmp will not be added to system startup at this time.
Would you like to disable securetmp from the system startup? (y/n) y
Would you like to secure /tmp & /var/tmp now? (y/n) y
Securing /tmp & /var/tmp
Calculating size on /tmp
/tmp calculated to be 4096 M based on available disk space in /usr
No separate partition for tmp!
Building /usr/tmpDSK...4194304+0 records in
4194304+0 records out
4294967296 bytes (4.3 GB) copied, 57.0198 s, 75.3 MB/s
mke2fs 1.41.12 (17-May-2010)
/usr/tmpDSK is not a block special device.
Proceed anyway? (y,n) Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
262144 inodes, 1048576 blocks
52428 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1073741824
32 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736

Writing inode tables: done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 23 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
tune2fs 1.41.12 (17-May-2010)
Creating journal inode: done
This filesystem will be automatically checked every 23 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
Done
Setting up /tmp... Done
Setting up /var/tmp... Done
Checking fstab for entries ...Done
Logrotate TMPDIR already configured
Process Complete
[email protected] [/]# reboot

Broadcast message from user @ proserver.domain.net
        (/dev/pts/3) at 8:31 ...

The system is going down for reboot NOW!

Still not working
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,216
363
To clarify, did you manually modify the size of the /tmp partition before rebooting the server? Was it again reverted to a smaller size after rebooting?

Thanks.
 

vishnunuk1

Member
Apr 20, 2014
5
0
1
cPanel Access Level
Root Administrator
No,
1) Edit "/scripts/securetmp" using Vi command and saved the file
2) Run "/scripts/securetmp"
3) Answer 3 questions as shown above.
4) After "/scripts/securetmp" Execution i got 4gb temp. (confirmed in disk usage tab inside whm)
5)After a Reboot it is automatically go to default size
i need a perminant solution for this , please help

Thanks
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,216
363
I recommend manually setting up your /tmp partition instead of using /scripts/securetmp. Manually modifying the size of the tmp partition is an OS procedure. You can find instructions by searching for a term such as "Resize tmp OS" on a search engine. Replace "OS" with the actual name of the OS you are using.

Thank you.