cp won't copy more than 32Gb of a large file on the same SSD
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
cp won't copy more than 32Gb of a large file on the same SSD
Hi folks,
I have a 70Gb file on an EXT4 volume in ~/folder1 that I want to copy to ~/folder2.
Code:
cp -v ~/folder1/bigfile ~/folder2/bigfile
generates this error:
Code:
cp: error copying 'bigfile' to '~/folder2/bigfile': Input/output error
The copy process fails when the destination file hits 32Gb in size (or thereabouts).
I've tried using rsync and rclone, and the same thing happens: the copying process fails at around 32Gb destination file size. The volume has 750Gb free space so I do not think it is a disk space problem. It seems like some internal limit is being hit but I haveno idea where to start looking for this.
The EXT4 volume is LUKS encrypted. I do not know whether this is relevant.
I noticed the problem when I was trying to migrate a VirtualBox .vdi file using VBoxManage. The source disk file is 70Gb and the migration failed repeatedly about half way through the migration process. It now seems like an OS problem rather than anything to do with VirtualBox because I cannot cp successfully. I'm not running out of disk space or inodes.
Distribution: Ubuntu based stuff for the most part
Posts: 1,173
Rep:
I saw an old post abut using the 'nocache' command before the cp,rsync,dd, ect. but it seemed more about performance loss during large file transfers, but it might help. It may not be installed by default it seems, but it should be in your standard repo.
I saw an old post abut using the 'nocache' command before the cp,rsync,dd, ect. but it seemed more about performance loss during large file transfers, but it might help. It may not be installed by default it seems, but it should be in your standard repo.
Thanks for the suggestion. I didn't use nocache but, based on some web searching, I tried dd with the following options that disable caching:
Can you copy the file to a different disk? And then back to /folder2?
I should have mentioned this in the original post. No I can't copy the file to a different disk. It hits the same 32Gb limit and generates the Input/output Error.
Just seeing that was already answered in your initial post.
Do you get an I/O error?
Maybe a limit in a low level driver, maybe integrated in the SSD.
Did you try to copy to another SSD type or a non-SSD disk?
Hi folks,
I have a 70Gb file on an EXT4 volume in ~/folder1 that I want to copy to ~/folder2.
Code:
cp -v ~/folder1/bigfile ~/folder2/bigfile
generates this error:
Code:
cp: error copying 'bigfile' to '~/folder2/bigfile': Input/output error
The copy process fails when the destination file hits 32Gb in size (or thereabouts).
I've tried using rsync and rclone, and the same thing happens: the copying process fails at around 32Gb destination file size. The volume has 750Gb free space so I do not think it is a disk space problem. It seems like some internal limit is being hit but I haveno idea where to start looking for this. The EXT4 volume is LUKS encrypted. I do not know whether this is relevant.
I noticed the problem when I was trying to migrate a VirtualBox .vdi file using VBoxManage. The source disk file is 70Gb and the migration failed repeatedly about half way through the migration process. It now seems like an OS problem rather than anything to do with VirtualBox because I cannot cp successfully. I'm not running out of disk space or inodes.
You seem to have checked a good amount of things so far, but I'll ask how is this disk connected? Is it an external drive or internal? I've seen externally-connected USB drives do flaky things with large files. And can you try to copy another large file, to see if it works? That file itself may be corrupted, or in use.
All of the analysis so far has been directed toward finding out why the output file fails at 32Gb. Is it possible that the error is a physical problem with the input file at 32Gb? I suggest that you run fsck against the partition containing the input file.
Just seeing that was already answered in your initial post.
Do you get an I/O error?
Maybe a limit in a low level driver, maybe integrated in the SSD.
Did you try to copy to another SSD type or a non-SSD disk?
I have tried copying the file to another folder on the same internal SSD, to an external SSD and to an external HDD. Copying fails every time with the same error.
Another post in this thread suggests that there may be something wrong with the source file. I will investigate this further.
All of the analysis so far has been directed toward finding out why the output file fails at 32Gb. Is it possible that the error is a physical problem with the input file at 32Gb? I suggest that you run fsck against the partition containing the input file.
That's a very good suggestion. Thanks.
I have hit a problem with running fsck though. I've booted from a live Ubuntu USB (I had one laying around) but I cannot see the encrypted partition that I need to scan. df -h (and df -a) only shows the partitions associated with the live USB and not the internal volume that I need to scan. I can see the internal volume from the Ubuntu GUI after boot, and can mount it, but cannot open the luks volume from the command line so cannot run fsck on it.
After booting from the live USB, I can mount the encrypted volume from the GUI, then:
Code:
df -a
This lists all volumes, including the encrypted volume, shown as /dev/dm-012345678 (example only). I unmount this volume, then run
Code:
df -a /dev/dm-012345678
but this produces a "No such file or directory" error. I'm stuck.
This does seem to be getting more complicated and I'm approaching the outer limits of my competence. Thank you to everyone who is helping me with useful suggestions. Who'd have thought that copying a file could be so difficult!
The comment earlier about sparse files and copying is relevant.
You must be able to see the device containing that file system when booted to the live media, but since it is an encrypted volume may not be able to do anything with it except open and mount it.
If you can open the device and not mount it then you should be able to run fsck on it, but if it requires mounting then fsck is out.
You should be able to make a copy of the virtual device using dd, but I have no clue how that would work on an encrypted device, especially one that is a sparse file.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.