Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am trying to understand why the backup process in one of the servers is taking so long and not copying the data correctly.

This is the size of the external HDD partition.

df -h /dev/sdb1
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdb1             985G  362G  573G  39% /media/backup

The folder that I am trying to copy is lesser than the size of the external HDD partition.

df -h /dev/sda4
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda4             3.4T  867G  2.4T  27% /mounts

Everything just seemed fine. I started the backup process almost a week back and still it has not completed. I realized it might be an issue with the USB port speed but I was wrong.

I also suspected it might be a corrupted file system that might be causing the error. I wanted to run fsck on the /dev/sda4 file system. But when I checked some of the script output, I read some error messages as,

rsync: mkstemp "/media/backup/2014-06-18_09-36/mounts/ no space left on device (28)

From here, I read that 5% of the disk space would be allocated for root file system. I do not understand if that is related to my problem. Also, from here, I read the inode size cannot be greater than 2 GB. I believe it should be something that I investigate. But am not sure if that is the problem though. I would appreciate more pointers towards the right direction.

EDIT:

The output of df -i command is as below.

df -i /dev/sdb1
/dev/sdb1            65544192 65279823  264369  100% /media/backup
df -i /dev/sda4
Filesystem            Inodes   IUsed   IFree IUse% Mounted on
/dev/sda4            229957632 171244050 58713582   75% /mounts
share|improve this question
    
What about df -i? Also, what filesystem is used on the external drive? –  derobert Jun 24 at 16:02
    
@derobert, please see the edit to the question with the df -i command output. It seems promising. Does it mean something? –  Ramesh Jun 24 at 16:05
    
I'm not sure what rsync uses mkstemp() for, but to guess, probably so that it doesn't create partial files on error. Running out of inodes does seem like a likely cause. –  goldilocks Jun 24 at 16:06
    
Ain't some kind of quota applied on that device? –  psimon Jun 24 at 16:06
    
@goldilocks, thanks. I also suspect the same. –  Ramesh Jun 24 at 16:06

1 Answer 1

up vote 5 down vote accepted

You have run out of inodes on your backup drive. That's the out of space error you're seeing.

Each file (basically) takes one inode. Unfortunately, with most filesystems there isn't a way to add more inodes, except mkfs.

Example: with ext4, you pick the number of inodes created (at mkfs time) directly with the -N option, or as a ratio to the volume size with -i. The various usage types (-T mainly vary the inode ratio).

share|improve this answer
    
thanks. So if I just copy folder by folder will that help or I will still get the same error? –  Ramesh Jun 24 at 16:07
    
@Ramesh No. You have more inodes used on your source filesystem than total on your destination. Fundamentally, you can't copy that source to that destination. It simply doesn't fit. –  derobert Jun 24 at 16:09
    
got it. So, I believe I should put the files just in different partitions to accomodate them. Though I have full space available, I cannot use them. –  Ramesh Jun 24 at 16:09
    
@Ramesh if you're going to reformat the drive (which you'll have to do to add more partitions), just reformat it with sufficient inodes. –  derobert Jun 24 at 16:10
    
I already reformatted the system. But as per the error, I believe I have to do it again. Anyways, I really appreciate your help. I can confidently tell people what seems to be the kill in time of this particular backup process. :) –  Ramesh Jun 24 at 16:12

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.