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

Forum Discussion

FG's avatar
FG
Aspirant
Aug 03, 2016
Solved

Copy via SSH

firmware 6.5.0

readynas 2120

 

I am trying to copy the data (including the snapshots) from 1 volume to another within the NAS.

 

I have a 4 disk raid 10, I have pulled bay disk out and replaced it with a larger disk and set it up as a JBOD.

 

I am trying to follow the below instructions, posted here by Stephen. https://community.netgear.com/t5/ReadyNAS-in-Business/Expanding-Disk-Space-on-raid-10/m-p/1113798/highlight/true#M5193

 

"If one of your new disks has enough space for all the data, you could possibly remove disk-4, install a new drive there and select jbod.  Copy the subvolumes over via ssh, destroy the raid-10 volume and insert remaining new disks as RAID-5.  Copy the subvolumes back (again using ssh), destroy the temporary volume and remove the disk.  Change back to xraid, and then re-add that disk."

 

 

I am stuck on copying via SSH. I have SSH service turned on in the system settings. When I setup a backup, is there a place to select SSH? The advanced tab of my backup is disabled, I can choose the advanced tab, but I cannot click on anything.

 

StephenB wrote "Copy the subvolumes over via ssh" Subvolumes........ meaning the indiviual shares within my Volume1?

 


  • FG wrote:

     

     

    I am stuck on copying via SSH. I have SSH service turned on in the system settings. When I setup a backup, is there a place to select SSH? The advanced tab of my backup is disabled, I can choose the advanced tab, but I cannot click on anything.

      


    I meant accessing the NAS via ssh using something like putty (or terminal on mac) and copying the subvolume using the linux command line interface ot the NAS.

     

    The copy itself would be done with btrfs send and btrfs receive

     

    In the original thread, the comments were on how to copy the shares to a USB disk with snapshots.  If you are copying to a NAS internal volume, you'd need to create shares first on the target volume from the web ui, and then copy to the root of each share.

     


    FG wrote:

     

    StephenB wrote "Copy the subvolumes over via ssh" Subvolumes........ meaning the indiviual shares within my Volume1?

     


    Yes.  Each share is a btrfs subvolume.

     

8 Replies

Replies have been turned off for this discussion
  • StephenB's avatar
    StephenB
    Guru - Experienced User

    FG wrote:

     

     

    I am stuck on copying via SSH. I have SSH service turned on in the system settings. When I setup a backup, is there a place to select SSH? The advanced tab of my backup is disabled, I can choose the advanced tab, but I cannot click on anything.

      


    I meant accessing the NAS via ssh using something like putty (or terminal on mac) and copying the subvolume using the linux command line interface ot the NAS.

     

    The copy itself would be done with btrfs send and btrfs receive

     

    In the original thread, the comments were on how to copy the shares to a USB disk with snapshots.  If you are copying to a NAS internal volume, you'd need to create shares first on the target volume from the web ui, and then copy to the root of each share.

     


    FG wrote:

     

    StephenB wrote "Copy the subvolumes over via ssh" Subvolumes........ meaning the indiviual shares within my Volume1?

     


    Yes.  Each share is a btrfs subvolume.

     

    • FG's avatar
      FG
      Aspirant

      Yes, I am copying to internal volume. Shares are created on target.

       

      Are you saying that since I am copying within the NAS that snapshots will come with the data to the target drive?

       

       

      • StephenB's avatar
        StephenB
        Guru - Experienced User

        FG wrote:

        Yes, I am copying to internal volume. Shares are created on target.

         

        Are you saying that since I am copying within the NAS that snapshots will come with the data to the target drive?

          


        No.

         

        I'm saying that you can't just copy subvolumes to the new volume, because shares also need to be created in the ReadyNAS SQL database.

         

        So if you have a share called Pictures now, you will need to something like 

        • copy the subvolume Pictures to the volume (as Pictures), using BTRFS send and receive
        • create a share called temp on the new volume from the web ui
        • delete the subvolume temp with ssh (leaving the share alone)
        • rename the Pictures subvolume to temp
        • rename the temp share to Pictures from the web ui (which will also rename the temp subvolume to Pictures)

         

        This is a lot of work to preserve the snapshots. I'm curious to know why you are so determined to keep them???  

         

        For me the snapshots are like the recycle bin - something nice to have, but no problem clearing out if from time to time.

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