Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 420
  • Last Modified:

Disk space in linux 6.2 ?

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
waweiwi
Asked:
waweiwi
  • 12
  • 7
  • 2
  • +1
1 Solution
 
ifinchamCommented:
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
 
ifinchamCommented:
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
 
dkloesCommented:
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
Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

 
waweiwiAuthor Commented:
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
 
dkloesCommented:
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
 
waweiwiAuthor Commented:
hi,
My root partition increasing daily with 1-2% its 1G partition, where this disk space gone ?
0
 
dkloesCommented:
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
 
waweiwiAuthor Commented:
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
 
waweiwiAuthor Commented:
sorry

About the /tmp directory, I linked it before to another partition "/tmp  >  /u4/tmp"
0
 
dkloesCommented:
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
 
MFCRichCommented:
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
 
waweiwiAuthor Commented:
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
 
dkloesCommented:
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
 
waweiwiAuthor Commented:
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
 
waweiwiAuthor Commented:
hi,
I did "find / -size +10000 -print", No file found in the partition that i want, All in different partitions.
0
 
dkloesCommented:
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
 
waweiwiAuthor Commented:
hi,
I did "find / -size +10000 -print", No file found in the partition that i want, All in different partitions.
0
 
waweiwiAuthor Commented:
root partition has 55% disk usage (Total 1G) ,It was 7% before 13 days when i rebooted the system.
0
 
dkloesCommented:
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
 
waweiwiAuthor Commented:
root partition has 55% disk usage (Total 1G) ,It was 7% before 13 days when i rebooted the system.
0
 
waweiwiAuthor Commented:
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
 
waweiwiAuthor Commented:
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 12
  • 7
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now