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

x-raid, flex-raid, ... how?

el_patron
Tutor

x-raid, flex-raid, ... how?

I have a 2-bay pro 2, running with a 1 TB disk on OS6 in X-raid mode. I want to replace the 1TB disk with a 4TB disk, but without redoing the whole setup. I only have and need one drive. There is no need for redundancy and also the data is redundant available in another place on another readynas.

How can I achieve this? I already placed the 4TB disk in the unit, but now it is redundant at 1TB with the first 1TB disk. I could imagine there is a way with flex raid, but the description was not that easy, especially not on that use case...

Thanks for any help or hints!

 

Message 1 of 7
StephenB
Guru

Re: x-raid, flex-raid, ... how?


@el_patron wrote:

How can I achieve this? I already placed the 4TB disk in the unit, but now it is redundant at 1TB with the first 1TB disk.

 


Normally you'd need to back up the data, do a fresh install with only the 4 TB drive in place, and then rebuild the NAS.

 

But there a way to get there with ssh.  You need to 

  • Remove the 1 TB drive from the RAID array
  • Physically remove the 1 TB drive
  • Expand the volume to use the full 4 TB of space.

@Sandshark provided the relevant information on these steps here:https://community.netgear.com/t5/Using-your-ReadyNAS-in-Business/Reducing-RAID-size-removing-drives-...

 

If you need more tailored advice, please post your mdstat.log and also disk_info.log (both from the log zip). 

 

Although it sounds like you already have a backup of your data, I do want to emphasize the importance of making a backup before attempting to run these commands (for the benefit of other readers). 

 

 

Message 2 of 7
el_patron
Tutor

Re: x-raid, flex-raid, ... how?

Thanks for the hints... Well doesn't read too simple... Any further hints are welcome. Please find enclosed the two mentioned files.

 

mdstat-log

Personalities : [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] 
md1 : active raid1 sdb2[1] sda2[0]
      523264 blocks super 1.2 [2/2] [UU]
      
md127 : active raid1 sda3[2] sdb3[0]
      971912832 blocks super 1.2 [2/2] [UU]
      
md0 : active raid1 sda1[2] sdb1[0]
      4190208 blocks super 1.2 [2/2] [UU]
      
unused devices: <none>
/dev/md/0:
           Version : 1.2
     Creation Time : Thu Aug 23 21:07:38 2018
        Raid Level : raid1
        Array Size : 4190208 (4.00 GiB 4.29 GB)
     Used Dev Size : 4190208 (4.00 GiB 4.29 GB)
      Raid Devices : 2
     Total Devices : 2
       Persistence : Superblock is persistent

       Update Time : Sat Jun 29 20:23:40 2019
             State : clean 
    Active Devices : 2
   Working Devices : 2
    Failed Devices : 0
     Spare Devices : 0

Consistency Policy : unknown

              Name : 758b1e1e:0  (local to host 758b1e1e)
              UUID : f61c735e:9719da61:b5ec78d5:cfb3b875
            Events : 338

    Number   Major   Minor   RaidDevice State
       0       8       17        0      active sync   /dev/sdb1
       2       8        1        1      active sync   /dev/sda1
/dev/md/data-0:
           Version : 1.2
     Creation Time : Thu Aug 23 21:08:03 2018
        Raid Level : raid1
        Array Size : 971912832 (926.89 GiB 995.24 GB)
     Used Dev Size : 971912832 (926.89 GiB 995.24 GB)
      Raid Devices : 2
     Total Devices : 2
       Persistence : Superblock is persistent

       Update Time : Sat Jun 29 20:23:34 2019
             State : clean 
    Active Devices : 2
   Working Devices : 2

disk_info.log

Device:             sda
Controller:         0
Channel:            0
Model:              WDC WD40EFRX-68N32N0
Serial:             WD-WCC7K4FSNP98
Firmware:           82.00A82
Class:              SATA
RPM:                5400
Sectors:            7814037168
Pool:               data
PoolType:           RAID 1
PoolState:          1
PoolHostId:         758b1e1e
Health data 
  ATA Error Count:                0
  Reallocated Sectors:            0
  Reallocation Events:            0
  Spin Retry Count:               0
  Current Pending Sector Count:   0
  Uncorrectable Sector Count:     0
  Temperature:                    36
  Start/Stop Count:               598
  Power-On Hours:                 772
  Power Cycle Count:              1
  Load Cycle Count:               598

Device:             sdb
Controller:         0
Channel:            1
Model:              ST31000528AS
Serial:             9VP9RW97
Firmware:           CC49
Class:              SATA
RPM:                7200
Sectors:            1953525168
Pool:               data
PoolType:           RAID 1
PoolState:          1
PoolHostId:         758b1e1e
Health data 
  ATA Error Count:                0
  Reallocated Sectors:            1451
  Reallocation Events:            1451
  Spin Retry Count:               0
  End-to-End Errors:              0
  Command Timeouts:               0
  Current Pending Sector Count:   0
  Uncorrectable Sector Count:     0
  Temperature:                    36
  Start/Stop Count:               6807
  Power-On Hours:                 28797
  Power Cycle Count:              103

Thank you!

 

Model: RNDP2000|ReadyNAS Pro 2 Chassis only
Message 3 of 7
StephenB
Guru

Re: x-raid, flex-raid, ... how?


@el_patron wrote:

 Well doesn't read too simple...


It's not - this is fairly advanced stuff.  You should make sure you have a backup of your NAS before you begin.

 

It's always a bit risky when I need to post linux commands that I can't actually test.  Hopefully @Sandshark will chime in (as he's done experimenting with these commands and I have not). 

 

In your system disk 1 (sda) is the 4 TB drive and disk 2 (sdb) is the 1 TB drive.

 

Start by changing to flexraid (web ui volume tab).

 

Then log in as root via ssh and enter

# mdadm /dev/md127 --fail --verbose /dev/sda3
# mdadm /dev/md127 --remove --verbose /dev/sda3
# mdadm --zero-superblock --verbose /dev/sda3

This should remove disk 1 from the array.

 

Remove disk 1 and reboot.  At this point you should see your data volume (as before) and have access to your data.  The array shouldn't be flagged as degraded.

 

Then try hot-inserting disk 1 again.  You should be able to select it from the volume tab and create a new volume on it.  If you have trouble (for instance if you see an "inactive volume"), then try connecting the disk to a PC (either SATA or USB adapter/dock) and zero it with Western Digital's Lifeguard utility.  After that, hot-insert it again.

 

 

Message 4 of 7
Sandshark
Sensei

Re: x-raid, flex-raid, ... how?

Actually, I believe that will leave the array degraded after reboot.  The following command fixes that:

 

# mdadm --grow /dev/md127 --raid-devices=1 --force --verbose

 

The zero-superblocks command listed by @StephenB is to insure your NAS doesn't try to re-integrate the drive into the current array when you return it to the chassis.  For anyone not returning the drive to the NAS, it's not necessary.

 

The --force in the command above is necessary.  The --verbose is not, but I always like visual confirmation of what's going on, which this provides.

 

The NAS will also need to re-sync the OS and swap partitions, but that's fast.  You may see a message shortly after the reboot stating that sync is complete.

 

But then comes the part I'm not sure about.  Will XRAID then start expansion of the volume to fill the 4TB drive, or can it be done in FlexRAID?  My experiments were with equally sized drives, so I don't know.  Even if it does, you'd end up with a very odd configuration: a 1TB single-drive RAID1 and a 3TB single-drive RAID1 on the same drive with a BTRFS file system spanning them.  I could tell you how to do it manually, but then you'd definately be stuck needed to do all furure expansions manually.

 

Expanding the partition with GPARTED and then the RAID with MDADM would be a better way, but that's even more complex, in large part because GPARTED can't operate on a mounted partition.

 

Honestly, I'd recommend either a factory default with the 4TB and restore from backup or remove the 4TB from the array instead, and add it back as a new, separate volume.  You'd still have the 1TB present, and as the primary OS device with your home folders, but you could move everything else to the 4TB.

 

Whether you could successfully EXPORT the 1TB after the 4TB is added as a new volume, I don't know, either.

 

You've given me food for thought should I ever try more experiments in this area.

 

Message 5 of 7
StephenB
Guru

Re: x-raid, flex-raid, ... how?


But then comes the part I'm not sure about.  Will XRAID then start expansion of the volume to fill the 4TB drive, or can it be done in FlexRAID? 

 


I believe the goal here is to create a second volume on the 4 TB drive.  That was why I suggested switching to flexraid before executing any of the ssh commands.  Perhaps click on format before creating a new volume on the drive.  

 

 

Message 6 of 7
el_patron
Tutor

Re: x-raid, flex-raid, ... how?

Thanks for all your input... Hmmmhh.... I will reevaluate the effort to do a fresh install of the NAS. In addition to the data there are some services and servers running that need then a new installation:

  • bubbleupnp
  • minimserver
  • nextcloud

Thats the nasty thing...

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