How to increase /tmp size

Post Reply
Site Admin
Posts: 166
Joined: Sun Jul 01, 2012 9:07 am

How to increase /tmp size

Post by a24uall »


Using dd command create a file of the required size:
dd if=/dev/zero of=/usr/tmpDSK1 bs=1024 count=2048000 --- > 2GB
dd if=/dev/zero of=/usr/tmpDSK1 bs=1024 count=10485760 --- > 10 GB
Stop MySQL so that it wont create any database problem.
/etc/init.d/mysql stop
Execute the below command untill /tmp is completly unmounted.
umount /tmp -l
Rename the orginal /tmp to backup
mv /usr/tmpDSK /usr/tmpDSK.bak7
Rename the created tmp to orginal tmp
mv /usr/tmpDSK1 /usr/tmpDSK
Format the tmp created
mkfs.ext3 /usr/tmpDSK
Check fstab and remove or comment out the old /tmp
Change the tmp permission
chmod 1777 /tmp
Restart MySQL
/etc/init.d/mysql restart
Post Reply

Return to “/TMP”