7

On a Ubuntu 14.04 system I tried to extract a tar archive:

/media/ntfs-drive/target-dir$ tar --extract -v --file ../source-dir/data.tar

After extracting some of the files, tar reports that there was not enough disk space left, while in reality there is plenty of it. Here is the output of df -m for the relevant device showing that around 86 GByte of free space are left:

/dev/sdb5         226966  139075     87892   62% /media/ntfs-drive

Also, only 2% of the drive's Inodes are used as df -i shows:

/dev/sdb5      91114956  1086160 90028796    2% /media/ntfs-drive

Some more information that might be of relevance:

  • Both the source and the target dir are located on the same NTFS drive
  • The archive data.tar contains a large number of small files
  • My root partition is nearly full (1,4 GByte free)
  • mount says that the relevant drive has been mounted with options rw,nosuid,nodev,allow_other,default_permissions,blksize=4096

What could be the reason for tar's error message and how can I solve this problem?

Update

It seems that this is not really a tar problem, as the system reports the disk to be full after the failed tar extraction. E.g.

touch /media/ntfs-disk/test

fails with the error that there is not enough space left. However, as I've described above, there is plenty of disk space and Inodes left according to df. Are there any hidden temporary files that are not seen by df?

Update 2

I realized that I can change and increase files on the disk but that I cannot create new files. I'v read here that NTFS supports over 4 billion files per volume. Currently my disk contains about 1 million files. But is there another limit on the number of files?

  • 1
    I would suspect NTFS-related problem. I's not native FS... Is there anything in dmesg(8) ? If you reboot in windows and force check of the disk, does the situation change? Only other reason might be quota(8) but I'm not sure how it would be handled in NTFS... – Matija Nalis Aug 20 '16 at 13:35
  • 1
    @MatijaNalis I ran chkdsk under Windows which revealed that there were a lot of filenames containing :, which is an illegal character under Windows. After running chkdsk I could create files again. Thank you! – Deve Aug 20 '16 at 18:12
8

GNU tar uses $TMPDIR for deciding where to write extended header information. You might try setting TMPDIR to point to a writable location on your large drive.

  • Thanks for your answert. Currently I cannot verify if this solves the problem as the system now reports the disk to be full, see my edit. – Deve Aug 20 '16 at 10:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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