Solved

Disk space in linux 6.2 ?

Posted on 2001-08-12
22
403 Views
Last Modified: 2010-03-18
First the file /proc/kcore took 256M from our root disk spaces, I tried to move it in other partition but i couldn't, Its normally to took this  disk space ?

If i remove it whats will happen ?

I'm almost out of disk space in root partition, what can i do to increace it ?
0
Comment
Question by:waweiwi
  • 12
  • 7
  • 2
  • +1
22 Comments
 
LVL 2

Expert Comment

by:ifincham
ID: 6377066
Hi,

Files in /proc don't really exist. /proc/kcore just represents the amount of ram you have in your computer, i.e.

ls -l /proc/kcore

It doesn't actually take any space - just do this....

df /proc

You'll see the proc filesystem takes up no space !

Rgds
0
 
LVL 2

Expert Comment

by:ifincham
ID: 6377087
Hi,

To free up space on your root partition there are a few things you can do. Assuming you've deleted everything that appears unnecessary, one way would be to move parts of the root directory to another partition. The success of this depends on to what extent you've already got different partitions for different parts of the vfs.

For example, if /opt is not a separate partition (see /etc/fstab) you could make a new partition (on another drive if necessary), mount it , copy all /opt to that partition and then edit /etc/fstab to add the new partition with /opt as mount point. Usually you would have /usr on another partition anyway but, if not, thats the first one to move.

Otherwise, from single user mode, you could just copy the whole root partition lot to a larger drive and swap the drives over. Or, look at the logical volume manager, software raid, etc.

Rgds


0
 
LVL 1

Expert Comment

by:dkloes
ID: 6377590
1.  As ifincham says, the files in /proc are special files that have information that comes from the kernel.

2.  In general, it is not a good idea to "rearrange" normal system directories after the system has been installed.  If you do, you need to do soft links so the system thinks they are where they are supposed to be.  It is easier to create system directories as separate mount points during install.

3.  How long have you been using your system?  If this is a relatively new install and you are already running out of disk space in the root partition, you would be better to re-install.  It is difficult to advise you without more information.  How many partitions do you currently have?  Are you doing anything that would consume disk space quickly such as running application software? Are there any other OSs on the same disk?  How much disk space did you allocate for the root partition and what is the size of your hard disk?  What other applications or software do you plan to install?

Experts will be able to help with this additional info.
0
 

Author Comment

by:waweiwi
ID: 6383290
hi,
I'm used linux 6.2 with kernal 2.2
[root@moon /root]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             985M   62M  873M   7% /
/dev/sda5              13G  8.2G  4.0G  67% /home
/dev/sdb8             2.3G  1.2G  933M  58% /u1
/dev/sdb5             4.8G  1.7G  2.8G  38% /u2
/dev/sdb6             4.8G  756M  3.8G  16% /u3
/dev/sdb7             4.8G  560M  4.0G  12% /u4
/dev/sda8             985M  887M   48M  95% /usr
/dev/hda5              19G   15G  2.8G  84% /public
[root@moon /root]#
These what i have but as u see the root partition 7% used but before i restarted the server it was 100%, It was running for month without reboot.

Any ides , may be this is depend in swap partition
[root@moon /root]# more /etc/fstab
/dev/sda1               /                       ext2    defaults        1 1
/dev/sda5               /home                   ext2    defaults        1 2
/dev/cdrom              /mnt/cdrom              iso9660 noauto,owner,ro 0 0
/dev/sdb8               /u1                     ext2    defaults        1 2
/dev/sdb5               /u2                     ext2    defaults        1 2
/dev/sdb6               /u3                     ext2    defaults        1 2
/dev/sdb7               /u4                     ext2    defaults        1 2
/dev/sda8               /usr                    ext2    defaults        1 2
/dev/fd0                /mnt/floppy             auto    noauto,owner    0 0
none                    /proc                   proc    defaults        0 0
none                    /dev/pts                devpts  gid=5,mode=620  0 0
/dev/sda6               swap                    swap    defaults        0 0
/dev/sda7               swap                    swap    defaults        0 0
/dev/hda5       /public ext2     exec,dev,suid,rw 1 1
[root@moon /root]#
0
 
LVL 1

Expert Comment

by:dkloes
ID: 6385377
Here is a description of /proc/kcore:
An image of the physical memory of the system. This is exactly the same size as your physical memory, but does not really take up that much memory; it is generated on the fly as programs access it. (Remember: unless you copy it elsewhere, nothing under /proc takes up any disk space at all.)

If you ran out of disk space in the root partition, is it possible that something besides /proc caused this?  My understanding is that these files do not actually use disk space.  If /proc/kcore represents your memory, do you have 256MB of memory?

Also, a filesystem gets very sluggish the closer you get to 100% full.  From the output of your df command, I would also be very concerned about the /usr partition and secondly the /public partition.
0
 

Author Comment

by:waweiwi
ID: 6399795
hi,
My root partition increasing daily with 1-2% its 1G partition, where this disk space gone ?
0
 
LVL 1

Expert Comment

by:dkloes
ID: 6399955
You can use the find command to see if this is due to an individual file that is growing.  For example, to find all files in the root filesystem that are larger than 10MB:

find / -xdev -size +10000 -print

You might also see if core files are being generated:

find / -xdev -name core -print

Or find all files that have been modified in the last day:

find / -xdev -mtime -1 -print

This last one should narrow the list to files that you know have been updated.

Also, check the /tmp directory to see if many temporary files are being generated.
0
 

Author Comment

by:waweiwi
ID: 6402991
hi,

I did as what u said in command "find / -xdev -mtime -1 -print", I found named.run file which had 136M size, Its under / partiton, I typed "df  -h" the used percentage 21% for / partition.

I removed the file( named.run) after that i typed "df  -h" but i got the same percentage 21%, I think if restart the server the percentage will decrease.

what u think ?

thankz
0
 

Author Comment

by:waweiwi
ID: 6402996
sorry

About the /tmp directory, I linked it before to another partition "/tmp  >  /u4/tmp"
0
 
LVL 1

Accepted Solution

by:
dkloes earned 50 total points
ID: 6403217
Yes, I would reboot and see what happens to the file  You might also watch it and see how much it grows over a period of time to see if it is the true culprit.  However, it appears that someone has turned on debugging for DNS for some reason.  Do you have any idea who might have done this and why?
0
 
LVL 4

Expert Comment

by:MFCRich
ID: 6414990
It maybe your logging. Are any of your daemons creating large amounts of logging output? Do you rotate your logs? The 'logrotate' package will automate this for you. Do you regularly clean up files in your tmp directories? In a typical RH6.2 install this is done by a daily cron job.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:waweiwi
ID: 6426290
hi,
The tmpwatch script in the cron.daily is running and I moved the /var and /tmp to other partition.
but the important think is when i removed the files from /root (as example) and checked the space "df -h" the free space didn't increase until i reboot the server " After restart its deceased from 85% to 15%).

What do u think ?? Its bug in linux 6.2 or what ???
0
 
LVL 1

Expert Comment

by:dkloes
ID: 6426339
Did you ever run the find command using the -size option to see if a file other than (or in addition to) named.run is consuming space?  Before assuming this is a bug, it would be nice to insure that the problem is not due to a file that is flushed whenever the server is rebooted.  For example, when disk space is consumed, use find to locate all files in the root partition larger than 10MB and save to a file or print on the printer.  Reboot and run the same command and see if any files drop off the list.
0
 

Author Comment

by:waweiwi
ID: 6427641
hi,
The tmpwatch script in the cron.daily is running and I moved the /var and /tmp to other partition.
but the important think is when i removed the files from /root (as example) and checked the space "df -h" the free space didn't increase until i reboot the server " After restart its deceased from 85% to 15%).

What do u think ?? Its bug in linux 6.2 or what ???
0
 

Author Comment

by:waweiwi
ID: 6428046
hi,
I did "find / -size +10000 -print", No file found in the partition that i want, All in different partitions.
0
 
LVL 1

Expert Comment

by:dkloes
ID: 6428062
Does your root partition have high disk space usage right now?  If so, what percentage?  If not, rerun the command when disk usage on the root partition is high.
0
 

Author Comment

by:waweiwi
ID: 6428172
hi,
I did "find / -size +10000 -print", No file found in the partition that i want, All in different partitions.
0
 

Author Comment

by:waweiwi
ID: 6428182
root partition has 55% disk usage (Total 1G) ,It was 7% before 13 days when i rebooted the system.
0
 
LVL 1

Expert Comment

by:dkloes
ID: 6428216
One last thing to check before declaring this a bug.  It is possible that rather than creating 1 or more large files, many smaller files are being created.  Run the following command and check the output for a directory in the root partition that may be accumulating many smaller files:

find / -xdev -print|xargs ls -al|more
0
 

Author Comment

by:waweiwi
ID: 6431213
root partition has 55% disk usage (Total 1G) ,It was 7% before 13 days when i rebooted the system.
0
 

Author Comment

by:waweiwi
ID: 6431329
hi,
I found it, I restart the named process and reset the named debuging ,This was reset the disk space usage.
I disabled debuging in the named, I will monitor the activity and disk space.


thanks
0
 

Author Comment

by:waweiwi
ID: 6431334
hi,
I found it, I restart the named process and reset the named debuging ,This was reset the disk space usage.
I disabled debuging in the named, I will monitor the activity and disk space.


thanks
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now