NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.

Forum Discussion

ipb_uk's avatar
ipb_uk
Aspirant
Aug 23, 2021

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.

5 Replies

Replies have been turned off for this discussion
  • 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.

  • StephenB's avatar
    StephenB
    Guru - Experienced User

    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.  

    • ipb_uk's avatar
      ipb_uk
      Aspirant


      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.

       

       

       

      • StephenB's avatar
        StephenB
        Guru - Experienced User

        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.

NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology! 

Join Us!

ProSupport for Business

Comprehensive support plans for maximum network uptime and business peace of mind.

 

Learn More