5

It's been happening for the last few weeks in a small unix server (it doesn't have all standard unix commands, just the basics included in the BusyBox package) that I was configuring to backup files.

If we check the free space of the server it shows:

 Filesystem             |   Size  |    Used | Available | Use%| Mounted on
 /dev/hdc2              | 678.4G  |  416.6G |   261.8G  | 61% | /tmp/mnt/D
 /dev/sda1              |  96.1G  |   36.0G |    55.2G  | 40% | /tmp/mnt/USB/USB_C

Now I am trying to copy either a 700MB files to USB_C or a 90GB files to /tmp/mnt/D where I can see that there's plenty of space available, however, I keep on receiving the followin error:

cp: Write Error: No space left on device

Any idea what the problem could be and how it could be fixed?

As mentioned, this is a small unix server with the bare minimum of unix commands, so most of the commands mentioned in other posts do NOT work for this box. Hence that I might need the help of someone who knows what I could try in this specific system to give us some clue...

mickael
  • 153
  • 1
  • 1
  • 5
  • 1
    Did you look at any of the other 158 questions which show up when searching for `No space left on device`? – kasperd Apr 12 '15 at 16:03
  • Have you tested that your filesystems are ok? Try to run a fsck on both filesystems (you may need to umount them first) and then check again available space – NuTTyX Apr 12 '15 at 16:13
  • Thanks @NuTTyX, I'll try to have a look and see if that one gives some info... – mickael Apr 12 '15 at 16:14

1 Answers1

3

My gut reaction says inodes

Check your inodes. Those are the hidden part of the filesystem that keeps metadata about the files.

df -i

I suspect you may have many, many small files. If that's the case -- and note that each file needs an inode -- you can use up inodes before you use up actual storage space.

JDS
  • 2,508
  • 4
  • 29
  • 48
  • This unix version doesn't have many options. For `df` I've just got: df: illegal option -- i BusyBox v1.90-JKR (2008.04.28-13:21 CET) multi-call binary Options: -h print sizes in human readable format (e.g., 1K 243M 2G ) -m print sizes in megabytes -k print sizes in kilobytes(default) – mickael Apr 12 '15 at 16:02
  • I just looked at the other linked "possible duplicate" and that one has everything I'd ever be able to post. Here it is again, please review this one: http://serverfault.com/questions/93606/why-am-i-getting-write-queue-file-no-space-left-on-device-from-postfix-when-t – JDS Apr 12 '15 at 17:34
  • http://unix.stackexchange.com/questions/117093/find-where-inodes-are-being-used this question shows how to use tune2fs in place of "df" for checking inodes (about 60% of the way through under "checking inodes") - we are all assuming ext filesystems here - please do confirm that! – Tom Newton Apr 13 '15 at 06:21
  • I managed to see the free inodes with 'tune2fs'. It turned out that I had like 90 million of free inodes, so not sure what was causing this problem. I tried running fsck quite a lot of times, and although it seemed that it was doing and repairing something, it was always displaying the same kind of error messages when I run the command again. I ended up copying the data to an external HDD, formatting the partition , putting the data back, and now I'm able to use the available space. I still don't know what was causing the problem in the 1st place though. Marking it as fixed with REFORMAT – mickael Apr 25 '15 at 21:08