I wanted to compress a directory whit size of about 25 GB to .tar.xz format using following command:

tar --xz --create --verbose --file myArchive.tar.xz /patch/to/my/dir

but got these error lines:

xz: (stdout): Write error: file too large
tar: myArchive.tar.xz: wrote only 2048 of 10240 bytes
tar: Child returned status 1
tar: Error is not recoverable: exiting now

I tried it for .tar.gz format too and got approximately same error lines.

I am using Fedora 32 and the destination file system is W95 FAT32(LBA). The file stopped writing at about 4.3 GB. What's strange is that my disk has more than 500GB free space.

What is the problem and how can I fix it?

  • Do you have enough disk space where you're trying to create the tarball? Add df -hT output to your question. – eblock Nov 13 '20 at 15:01

FAT32 filesystems cannot store files larger than about 4GB. Your output file is larger than this and the write failed.

A solution is to use a different filesystem, or break your tarball into smaller parts before trying to write it.

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.