Images corrupting being copied to a NAS...

Images corrupting being copied to a NAS...

Author
Discussion

Murph7355

Original Poster:

38,719 posts

262 months

Monday 17th October 2022
quotequote all
I have a large number of image files to be transferred to a NAS (housekeeping on my OH's laptop!), and for the first time ever I seem to be getting some corruption on some of the files.

This is a crop of one of the files as it should look:



This is a similar cropped portion showing what it looks like once copied to the NAS. There's an odd band across the image. Others half multiple bands, or sometimes ones going part way across the image:



And if I open the corrupt version in Photoshop (the above were opened in MS Photos), I get this:



I have no disc errors on the NAS, and it's working fine as a backup/restore destination.

Any ideas or anyone seen similar before?

somouk

1,425 posts

204 months

Tuesday 18th October 2022
quotequote all
Is the NAS doing any form of alterations to the images? I know some will be set to optimise them for viewing in their own app. Is it converting the format or anything else that may cause issues?

camel_landy

5,053 posts

189 months

Tuesday 18th October 2022
quotequote all
Are you using data compression on the NAS?

M

Murph7355

Original Poster:

38,719 posts

262 months

Tuesday 18th October 2022
quotequote all
Neither of the above.

Tested earlier and the images transfer smoothly to other NAS units of the same make and model, same firmware etc OK.

The only real difference I can think of is the way the devices connect to the network. The NAS units that work OK are wired to the main house network (though the device the images were copied from - an Apple Macbook, photos from Photos - is connected via WiF).

The device that I am having the issues with uses a WiFi link (Ubiquiti Nanostations) to an external building 20-30m away. I generally get a 300mbps connection over them, thought it can drop to 100mbps or so.

I guess my next steps are to bring the NAS I'm having issues with into the main building and see if the issue persists. That would rule out the network (or confirm it's that). I may also try using an rSync copy rather than just dragging and dropping in Finder or Explorer.

markiii

3,796 posts

200 months

Tuesday 18th October 2022
quotequote all
have you tried copying an image back to the PC and opening from there? might not be the file thats corrupted but the way its opening from the NAS

Murph7355

Original Poster:

38,719 posts

262 months

Tuesday 18th October 2022
quotequote all
markiii said:
have you tried copying an image back to the PC and opening from there? might not be the file thats corrupted but the way its opening from the NAS
I have. The corruption's definitely in the file - I can see it in preview on the NAS with the line, and then when I copy it back, it presents as above.

It's very odd - never had issues before.

Captain_Morgan

1,243 posts

65 months

Tuesday 18th October 2022
quotequote all
Have you compared the source & destination file attributes?
Are there differences?

Try rsync on a selection of files that appear to have corrupted & see what happens.

If it’s still failing then if you have a computer in the remote location share some storage on the lan & try rsync to that, if that corrupts then in all likelihood it’s the network (or source), if not it’s likely to be the nas.

Either way at that point we’re asking many more questions about os, versions computer, nas & network platforms.

gavsdavs

1,203 posts

132 months

Tuesday 18th October 2022
quotequote all
test the integrity of the container, example
https://github.com/tjko/jpeginfo

xeny

4,590 posts

84 months

Tuesday 18th October 2022
quotequote all
Part of my role involves shuffling many, many multiple TB's of MRI scans around. I've now reached the stage where I routinely run recursive diffs between source and destination for peace of mind, and that carries over to home networking.

I don't suppose there's a firmware update available for the nanostations?

Durzel

12,437 posts

174 months

Tuesday 18th October 2022
quotequote all
What make/model of NAS?

Murph7355

Original Poster:

38,719 posts

262 months

Tuesday 18th October 2022
quotequote all
xeny said:
Part of my role involves shuffling many, many multiple TB's of MRI scans around. I've now reached the stage where I routinely run recursive diffs between source and destination for peace of mind, and that carries over to home networking.

I don't suppose there's a firmware update available for the nanostations?
What do you use for diff checking?

I thought I was up to date on f/w but remembered these devices don't show up in the Unifi controller. Helpfully.

Will upgrade and see what happens.

Durzel

12,437 posts

174 months

Tuesday 18th October 2022
quotequote all
On the assumption you are using Syncology, I have heard of this problem occuring before and the fix apparently was to enable a "Large MTU" option somewhere in the backend (networking I'd presume).

Doing an rsync of a file and then doing a md5sum hash check of the source and copied file would be the next step I'd say. I think it would probably work over rsync.

Murph7355

Original Poster:

38,719 posts

262 months

Tuesday 18th October 2022
quotequote all
Durzel said:
On the assumption you are using Syncology, I have heard of this problem occuring before and the fix apparently was to enable a "Large MTU" option somewhere in the backend (networking I'd presume).

Doing an rsync of a file and then doing a md5sum hash check of the source and copied file would be the next step I'd say. I think it would probably work over rsync.
Sorry Durzel, forgot to answer your other question...

Netgear ReadyNAS 104.

MTU is set to 1500. I think you need to be careful setting higher/the network switch it's connected to needs to be matched...?


Murph7355

Original Poster:

38,719 posts

262 months

Tuesday 18th October 2022
quotequote all
xeny said:
...
I don't suppose there's a firmware update available for the nanostations?
Upgraded them and tried the same copy function again - and it looks like it's worked.

Will do more testing once I've done a bunch of housekeeping.

Thanks all (for now at least biggrin).