The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Resize Temp folder not working after reboot

Discussion in 'General Discussion' started by vishnunuk1, Apr 20, 2014.

  1. vishnunuk1

    vishnunuk1 Member

    Joined:
    Apr 20, 2014
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I edit my $tmpdsksize to 4GB

    root@test [/]# umount -l /tmp
    root@test [/]# umount -l /var/tmp
    root@test [/]# rm -fv /usr/tmpDSK
    removed `/usr/tmpDSK’
    root@test [/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
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    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.
     
  3. vishnunuk1

    vishnunuk1 Member

    Joined:
    Apr 20, 2014
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    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
    root@proserver [/]# 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
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  5. vishnunuk1

    vishnunuk1 Member

    Joined:
    Apr 20, 2014
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    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
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page