RFC: New SSD ejected while copying folders

Summary
Trying to clone and older ssd to a newly purcahsed one. The new one was consistently ejected before completion during the process using first the finder copy/paste and then trying the cpio command. Maybe related to some very deep folders.

The only solution that’s working is the use of the “rsync” command.

Detail
Got a new “SanDisk Extreme Portable SSD.” First task was to clone an existing older SanDisk SSD. First I tried copying folders using the finder. The new SSD was consistently ejected prematurely. Next I tried a combination of "find <some folder[s]>|cpio -pdmv. Same issue. I did all the usual stuff:

  • Swapping cables
  • Connecting the ssd(s) directly to my macbook air instead of my apple studio
  • etc.

After a lot of experimentation, it seems that the cpio command is the issue. I used the rsync command instead and things are working well.

Remaining Question
I can forgive the cpio command, but what about the copy paste in the finder? How do I explain that?

1 Like

“When the Finder copies files, it first catalogs all files to be copied and then treats the copy process as one all-or-nothing copy routine. Because of this, if you copy multiple files and there is an error in accessing one, then the system will cancel the entire process and revert the system to its state before the files were moved.”

1 Like

It took a while, but it turns out the rsync command also fails. Do I have a bad brand new SSD?

* rsync(11611): error: buf_copy dbuf
* rsync(11610): error: unexpected end of file

We can’t rule out a flaw with the new SSD, I guess. But as you are familiar with the terminal commands, perhaps try the copy command “cp”. The “man cp” gives all the options.

2 Likes

The only tests that come to mind are trying to copy a similar amount of files from the computer --not the old SSD-- and see what happens just in case the combo of both SSDs is somehow raising problems in the USB interfaces itself, and keeping an eye on Console to watch for kernel errors, which i’m pretty sure you’ll spot because an automatic ejection means some critical error.

I believe at the end of your investigations you’ll find a physical error. I’d return the drive.

3 Likes

I don’t know, I’ve never had this problem. If I had to guess I’d suspect your source drive is the problem. But @pantulis may be correct.

What flags are you using with rsync? Most of the time I use:

rsync -arv /source /target

rsync -puaz --delete --relative

If you want to rule out filesystem quirks like (as you suggested) very deep directory structures, maybe try using the tar command to create a single file tar archive on the SSD. (tar cf /pathToSSD/archiveFileName.tar /pathToStuffYouWantToCopy)

This won’t get you what you’re looking for in terms of file copy but it will help diagnose (or at least help rule out) filesystem limitations. If this consistently works then it’s probably not an SSD issue. If you use tar cvf (v for verbose) then you can also check if it’s always failing at the same point.

3 Likes

I’m familiar with that command. It’s funny, because it’s been so long since I have used it. May try it.

Latest: compressed the folder that failed last, successfully copied (using finder) to the drive in question. Tried to un-compress (from finder) and get the following error. Fortunately, I have lots of time to return the drive for a refund or exchange. I’m enjoying the puzzle.

This seals the deal: I uncompressed that compressed folder (on the older SSD) that is giving my new drive so much trouble, and it uncompressed without issue. My conclusion: something’s wrong with the new SSD. Now I’m very curious: is it a defect, or an issue with different technology in the new SSD? Guess I’ll exchange it for the same one and see. Maybe.

Also, does the “repair” function in Disk Utility do any good?

If you’re referring to “Run First Aid” it has not helped.