2

if i use any yum command, i get

Loaded plugins: fastestmirror
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 285, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 114, in main
    base.doLock()
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 1791, in doLock
    while not self._lock(lockfile, mypid, 0644):
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 1861, in _lock
    os.write(fd, contents)
OSError: [Errno 28] No space left on device

If i use the top command i see this. If i use the df -h i see this.

Is it yum error? python error? or what?

EDIT

the output of find / -size +1G is

/var/log/squid/access.log-20130317 find: File system loop detected; `/var/named/chroot/var/named' is part of the same file system loop as /var/named'.

find: /proc/31495/task/31495/fd/5': No such file or directory find:/proc/31495/task/31495/fdinfo/5': No such file or directory find: `/proc/31495/fd/5': No such file or directory find:

/proc/31495/fdinfo/5': No such file or directory

1
  • Note that you can find the offending map point by running anything else like yum search iperf for me returns Could not create lock at /var/tmp/yum-packrd-NaR8fJ/x86_64/7/yum.pid: [Errno 28] No space left on device (my /var/tmp was full)
    – rogerdpack
    Jan 21, 2021 at 18:52

6 Answers 6

9

Looks like / is full

While you have almost 500GB in /home.

You might wanna reallocate some more space to / for system use.

Also, check /var/log as it resides on /

It is very possible you have some huge log files that could be pruned to clear up some space. 10G isnt much, but can be enough.

5
  • please read my edit
    – Lynob
    Mar 21, 2013 at 22:04
  • Go to / and type du -chs * and it will show you the size of each of the folders within root. From there, do some investigation work and find what you can afford to clean up.
    – Safado
    Mar 21, 2013 at 22:32
  • the output of du -chs * is this which is kinda strange, it shows that the total is 9.7Gb, which is not much, am i right? or am i missing something?
    – Lynob
    Mar 21, 2013 at 22:54
  • 9.7G is pretty close, considering the partition is only 10G -- Do you see that /var is 8.5GB? You may want to start the cleaning there. Mar 22, 2013 at 14:43
  • i formatted the server, will resize the partitions and start again
    – Lynob
    Mar 22, 2013 at 16:21
3

df -h clearly shows that you dont have much space in /. try to free up space and then try to yum command

2

Try running find / -size +1G to see if you have some large file taking up space.

3
  • please read my edit
    – Lynob
    Mar 21, 2013 at 22:04
  • Delete /var/log/squid/access.log-20130317 or move it to a network drive if you need it. Squid will create a new access log automatically.
    – user160910
    Mar 22, 2013 at 13:19
  • Also do a ls -l /var/named/chroot and look for links (entries beginning with l) that point to /var or /var/named, that could be the cause for your filesystem loop. If you don't need the link, you could remove it, but it is not related to the problem, just something I noticed from your find output.
    – user160910
    Mar 22, 2013 at 13:23
1

You only have a 10GB partition for your root directory and it is full. Leaving it like that will start causing you even more problems soon.

Almost all of it is in /var. So look through /var for large files. It could be logs under /var/log that are not being rotated.

If you can't delete anything you may have to repartition or move /var to a new drive.

The du command also warned of possible filesystem corruption. That could cause the drive to appear to be out of space. You should definitely run fsck on it as soon as possible. It will require you to reboot and wait while it checks and repairs it so you will have some downtime.

1

I know this is an old post, but thought this was worth mentioning for future searches: If /var/log/journal is taking up a large amount of space, you can

sudo journalctl --vacuum-size=100M

(substitute 100M for whatever size seems reasonable) In my case, the journal was using over a 1GB, and I was not able to effectively free anything due to low space warnings in yum/dnf until I cleared out some of the logs.

0

Worked out the answer, to add you can check the free space of drives with sudo df -lh. So it's easy enough to find folders you've created on the / and place them in /data (or somewhere else).

Example:

    Filesystem                            Size  Used Avail Use% Mounted on
    /dev/mapper/xxxxxxxxxxxxxxxx-lv_root   50G   50G     0 100% /
    tmpfs                                  48G  367M   47G   1% /dev/shm
    /dev/sda1                             485M   69M  392M  15% /boot
    /dev/mapper/vg_xxxxxxxxxxxxx-lv_home  221G   19G  191G   9% /home
    /dev/sdb1                             4.4T  264G  3.9T   7% /data

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .