What happens if you copy a file from one disk to another, using the same file path?


4 posts in this topic Last Reply

Recommended Posts

I know that you should never copy/move between disks and user shares (e.g. from /mnt/disk1/Share1/File1 to /mnt/user/Share1/whatever/File1), but I'm wondering about moving (i.e. copy, then delete) files from one disk to another.  For important files like personal photos, I prefer to copy, then compare checksums, then delete the source (rather than just use `mv`). 

 

If I copy a file as follows, what happens?  (assuming I have a share "Photos" with both those disks included)

 

SRC:  /mnt/disk1/Photos/Pic1.jpg

DST:  /mnt/disk2/Photos/Pic1.jpg

 

Now you have 2 versions of the same file in 'identical' locations within the Share.  Is this a situation that should be avoided?  What exactly happens?

Edited by nukem492
Link to post
1 minute ago, trurl said:

The file from the lowest numbered disk is the one that shows up in the Photos user share. No problems otherwise.

So I don't have to worry about overwriting random file data or parity data in this situation?  I guess the Parity is being updated when this file transaction occurs, but it would be a legitimate parity update, right (i.e. both files would be 'protected' by my parity)?

Link to post

Any write operation on any array data disk updates parity. Parity wouldn't be valid otherwise. And anything that is not strictly a read operation is a write operation. For example

16 minutes ago, nukem492 said:

then delete the source

also updates parity since delete is a write operation.

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.