Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.
crontab -e
/tmp/crontab.KxTGwK: No space left on device

and

df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda3            955486988 157545404 749405676  18% /
tmpfs                 37042680         0  37042680   0% /dev/shm
/dev/sda1               253871     89090    151674  38% /boot
/usr/tmpDSK            4128448    338068   3580668   9% /tmp

however I get this with df -i

df -i
Filesystem            Inodes   IUsed   IFree IUse% Mounted on
/dev/sda3            60669952 3809723 56860229    7% /
tmpfs                9260670       1 9260669    1% /dev/shm
/dev/sda1              65536      53   65483    1% /boot
/usr/tmpDSK           262144  262144       0  100% /tmp

So I can clean /tmp our with rm -rf /tmp/* but what is the difference between the two df's? and how is it /tmp is full yet not?

share|improve this question
    
if it's Tmpfs, it's worth of setting appropriate tag as well –  poige Apr 12 '13 at 8:38

2 Answers 2

df -h shows block usage; df -i shows inode usage.

You already used 100% of the inodes (262144 of 262144 ) so it means that you can't create new files there.

share|improve this answer
    
A gazillion empty files? If I understand this correctly, it means that not all of the space is used up, but there's also a limit on the number of files you can have on the filesystem (the inodes). Even though there may be space for more data on the file system, you can't create more files because you don't have any inodes left. Is that right? –  user110226 Apr 12 '13 at 6:01
    
@Ghodmode yep You understand this correctly –  Alan Kuras Apr 12 '13 at 6:12

Its "meta-data section" is full, data isn't. YMMW, but it's quite common to use Tmpfs for /tmp, so you can overcome this using its mount option nr_inodes:

The tmpfs mount options for sizing ( size, nr_blocks, and nr_inodes)

share|improve this answer
    
So is that the major difference between the common /tmp and /dev/shm? (never really understood /dev/shm) –  Tiffany Walker Apr 12 '13 at 6:04
    
/tmp can be whatever — it can be a sub-dir on root filesystem or can be mounted anything else, including mentioned Tmpfs. /dev/shm is just another mount point. –  poige Apr 12 '13 at 6:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.