× NETGEAR will be terminating ReadyCLOUD service by July 1st, 2023. For more details click here.
Orbi WiFi 7 RBE973
Reply

Moving one share to another with cp --reflink

ipb_uk
Aspirant

Moving one share to another with cp --reflink

Hello, Having reset my nas. I've reloaded all the data and I felt something wasn't right. Couldn't put finger on what was niggling me. I've now discovered what is different. Before I reset, all my media files were in the share "Media". That is all the music, ebooks, pictures & videos. Now I can see that all this stuff are in their owns shares, which means my networked media players have to have a link to each share. I can't do this. So I need to move these extra shares to the New Media share (which I have since renamed to "Entertainment") to avoid getting muddled up with the media directory that is used for mounting the USB drives. When done delete the old shares (Destroy). I have found that I can do this with "cp --reflink" instead of "mv". But before I do this, I want to make sure that I have understood what I'm doing and is the correct way. Is see that there are a few arguments that can be add to cp -reflink, but what are they and which do I need? Any other thoughts? Thanks Ian B.
Message 1 of 6
Sandshark
Sensei

Re: Moving one share to another with cp --reflink

I have done it, though I did delete the file(s) from the original location before I destroyed the volume.  It may not have been necessary (really shouldn't be), but I thought it best to do so.

Message 2 of 6
StephenB
Guru

Re: Moving one share to another with cp --reflink


@ipb_uk wrote:
 that there are a few arguments that can be add to cp -reflink, but what are they and which do I need? 

just -r (recursive) and -p (preserve).  BTW, you need --reflink, not -reflink.

 


@ipb_uk wrote:
 Any other thoughts? 

Snapshots won't be copied, so you will lose them when you destroy the original share.  

Message 3 of 6
ipb_uk
Aspirant

Re: Moving one share to another with cp --reflink



@StephenB wrote:

@ipb_uk wrote:
 that there are a few arguments that can be add to cp -reflink, but what are they and which do I need? 

 

Doh! Blimey Ian two typos in one line. I'll have a serious talk with my fingers! 

Take two " added to cp --reflink".

Anyway lets see if I can get my finger working right (yep I'm embarrassed).

I did find --reflink=always & --reflink=auto. Which prompted my question. Are there more? Do i even need these switches?  And what is the difference? As I'm not sure what the help file meant.

 

"When --reflink[=always] is specified, perform a lightweight copy, where the
data blocks are copied only when modified. If this is not possible the copy
fails, or if --reflink=auto is specified, fall back to a standard copy."

 

 

I'll give it a go tonight without any arguments added, on a small folder.

 

 

 

Message 4 of 6
StephenB
Guru

Re: Moving one share to another with cp --reflink


@ipb_uk wrote:

 

"When --reflink[=always] is specified, perform a lightweight copy, where the
data blocks are copied only when modified. If this is not possible the copy
fails, or if --reflink=auto is specified, fall back to a standard copy."

 

 


I've always entered --reflink w/o the parameter.  I believe it defaults to auto (which is what you want), but explicitly using--reflink=auto should be fine.

 

Make sure that Copy-on-Write is enabled on both the source and destination shares before you do the copy.

Message 5 of 6
ipb_uk
Aspirant

Re: Moving one share to another with cp --reflink

StephenB wrote:

@ipb_uk wrote:

 

Make sure that Copy-on-Write is enabled on both the source and destination shares before you do the copy.


 

Yep, that's a tick.

 

I'll kick it off in a few hours time.

 

Message 6 of 6
Top Contributors
Discussion stats
  • 5 replies
  • 1336 views
  • 0 kudos
  • 3 in conversation
Announcements