Results 1 to 1 of 1
Hello,
I searched google and then this forum but I don't think I found anything closely related within the first 3 pages of either. I did however find the appropriate ...
- 10-27-2010 #1Just Joined!
- Join Date
- Oct 2010
- Posts
- 1
/usr/tmpDSK
Hello,
I searched google and then this forum but I don't think I found anything closely related within the first 3 pages of either. I did however find the appropriate (newbie) forum
I followed this walkthrough for adding space to /tmp which was at 91%. I can't post URLs yet, so I will append the walkthrough at the bottom
I am running
dell intel 2.66 4gb
CentOS Elinux ES 5
cPanel stable
Symantec Endpoint PC 11.x
So, my /tmp was getting to full and I followed th walkthrough above. Step 9 resulted in the file is too large.
I couldn't just stop so I moved to 10.
I receieved this output:
[/]# mount -o remount /tmp
[/]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 7.8G 3.1G 4.3G 43% /
/dev/sda8 195G 15G 171G 8% /home
/dev/sda3 7.8G 7.3G 119M 99% /usr
/dev/sda2 9.7G 1.9G 7.4G 21% /var
/dev/sda1 122M 28M 88M 24% /boot
none 2.0G 0 2.0G 0% /dev/shm
/usr/tmpDSK 996M 836M 109M 89% /tmp
/dev/sda6 996M 836M 109M 89% /tmp
Woops. I can see what I did wrong. I didn't research enough ahead of time. I can what I didn't do. Wait, until I had more information and possibly asked before doing.
I won't make that mistake again.
Can someone please help me research on how to:
Fix the none to /tmp
move the backup tmpDSK into tmp
rm the tmpDSK
fix /usr
shame on me.
Code:1)Stop MySql service and process kill the tailwatchd process. [ ~]# /etc/init.d/mysqld stop Stopping MySQL: [ OK ] [ ~]#pstree -p | grep tailwatchd Find the tailwatchd process id and kill it [ ~]# kill -9 2522 2)Take a backup of /tmp as /tmp.bak [ ~]#cp -prf /tmp /tmp.bak 3)Create a 2GB file in the avaliable freespace ============================== [ dev]# dd if=/dev/zero of=/usr/tmpDSK bs=1024k count=2048 2048+0 records in 2048+0 records out 2147483648 bytes (2.1 GB) copied, 73.6908 seconds, 29.1 MB/s ============================== [ dev]# du -sch /usr/tmpDSK 2.1G /usr/tmpDSK 2.1G total 4)Assign ext3 filesystem to the file ==================================== [ dev]# mkfs -t ext3 /usr/tmpDSK mke2fs 1.39 (29-May-2006) /usr/tmpDSK is not a block special device. Proceed anyway? (y,n) y Filesystem label= OS type: Linux 262144 inodes, 524288 blocks 26214 blocks (5.00%) reserved for the super user First data block=0 Writing inode tables: done Creating journal (16384 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 25 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. ==================================== 5) Check the file system type:- [ dev]# file /usr/tmpDSK /usr/tmpDSK: Linux rev 1.0 ext3 filesystem data (large files) Note:- ===== You may also use the following comands for making ext3 file system on a file: [ dev]#mkfs.ext3 /usr/tmpDSK [ dev]#mke2fs /usr/tmpDSK 6)Unmount /tmp partition [ dev]#umount /tmp 7))Mount the new /tmp filesystem with noexec [ dev]#mount -o loop,noexec,nosuid,rw /usr/tmpDSK /tmp 8) Set the correct permission for /tmp [ dev]# install -d –mode=1777 /tmp [ dev]# ls -ld /tmp drwxrwxrwt 3 root root 4096 Feb 6 08:42 /tmp ( you may use the command chmod 1777 /tmp for doing the same ) ========================== [ dev]# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda9 28G 6.4G 20G 25% / /dev/sda8 99M 10M 84M 11% /boot tmpfs 500M 0 500M 0% /dev/shm /usr/tmpDSK 2.0G 68M 1.9G 4% /tmp ========================== 7)Restore the content of old /tmp.bkp directory [ dev]# cp -rpf /tmp.bak/* /tmp 8) Restart the mysql and tailwathchd services. [ dev]# /etc/init.d/mysql start [ dev]# /scripts/restartsrv_tailwatchd 9)Edit the fstab and replace /tmp entry line with :- ========================================= /usr/tmpDSK /tmp ext3 loop,noexec,nosuid,rw 0 0========================================= 10) Mount all filesystems [ dev]#mount -a Check it now:- ============================ [ ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda9 28G 6.4G 20G 25% / /dev/sda8 99M 10M 84M 11% /boot tmpfs 500M 0 500M 0% /dev/shm /usr/tmpDSK 2.0G 68M 1.9G 4% /tmp


Reply With Quote