nsa320 jbod to raid 1

I tried converting adding a brand new drive to convert to a single disk jbod. 
cat /proc/mdstat shows the recovery goes to about 70% and then stops. Any ideas what is wrong? The new drive is 4tb and old one is 3tb, but that shouldn't matter should it?

 # mdadm -D /dev/md0
/dev/md0:
        Version : 1.2
  Creation Time : Tue Nov  9 08:47:57 2021
     Raid Level : raid1
     Array Size : 2929765240 (2794.04 GiB 3000.08 GB)
  Used Dev Size : 2929765240 (2794.04 GiB 3000.08 GB)
   Raid Devices : 2
  Total Devices : 2
    Persistence : Superblock is persistent

    Update Time : Tue Nov  9 19:27:07 2021
          State : clean, degraded
 Active Devices : 1
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 1

           Name : NSA320:0  (local to host NSA320)
           UUID : 929b9738:5666172e:bdf6015e:f0ef83cd
         Events : 7195

    Number   Major   Minor   RaidDevice State
       0       8        2        0      active sync   /dev/sda2
       2       8       34        1      spare rebuilding   /dev/sdc2
~ # cat /proc/mdstat
Personalities : [linear] [raid0] [raid1]
md0 : active raid1 sdc2[2] sda2[0]
      2929765240 blocks super 1.2 [2/1] [U_]

unused devices: <none>

~ # cat /proc/mdstat
Personalities : [linear] [raid0] [raid1]
md0 : active raid1 sdc2[2] sda2[0]
      2929765240 blocks super 1.2 [2/1] [U_]

unused devices: <none>


Best Answer

  • Mijzelf
    Mijzelf Posts: 1,802  Guru Member
    Accepted Answer
    I think you have a Current_Pending_Sector issue on your original disk. Did you plan to also exchange the original disk by a 4TB one? In that case you could create a new JBOD on the new disk, copy the files over, and convert the new JBOD to raid 1 with the 2nd 4TB disk.

Answers

  • Mijzelf
    Mijzelf Posts: 1,802  Guru Member
    The new drive is 4tb and old one is 3tb, but that shouldn't matter should it?

    No, it shouldn't matter.

           2       8       34        1      spare rebuilding   /dev/sdc2
    The headers says it's rebuilding, and /proc/mdstat says it's not? Did you hotplug that disk? Is there an /dev/sdb? (cat /proc/partitions).
    I wonder if there is some 32 bit issue (70% of 3TB = 2.1TB = 2TiB, which is the 32 bit limit of SATA addressing).
    Does dmesg give a readable message about the synchronization stop?
  • jko
    jko Posts: 11
    disk wasn't hot plugged and the partition exists. Didn't see anything in dmesg, I tried it twice (reformatted the new drive between each try), both times stopped around the same time. 
    I see the original product description says up to 2 3TB drives, not sure if there's an actual 3TB limit.

    ~ # cat /proc/partitions
    major minor  #blocks  name

       7        0     140288 loop0
       8        0 3907018584 sda
       8        1     498688 sda1
       8        2 3906518016 sda2
       8       16 2930266584 sdb
       8       17     498688 sdb1
       8       18 2929766400 sdb2
      31        0       1024 mtdblock0
      31        1        512 mtdblock1
      31        2        512 mtdblock2
      31        3        512 mtdblock3
      31        4      10240 mtdblock4
      31        5      10240 mtdblock5
      31        6      48896 mtdblock6
      31        7      10240 mtdblock7
      31        8      48896 mtdblock8
       8       32 3907018582 sdc
       8       33     131072 sdc1
       8       34 3906885632 sdc2
       9        0 2929765240 md0

  • Mijzelf
    Mijzelf Posts: 1,802  Guru Member
    Something fishy is going on. Your box has 3 disks connected, sda 4TB, sdb 3TB and sdc 4TB.
    sda and sdb seem to be 'zyxel' disks, as they have a first partition of 498688kB, and a 2nd spanning the rest of the disk. Your sdc has a 1st partition of 131072kB, which is not zyxel.
    You write you are trying to create a raid1 array of an existing 3TB disk and an empty 4TB. The array is build from sda and sdc, both 4TB, and sdc as shown here should not be a part of that array.
    I see the original product description says up to 2 3TB drives, not sure if there's an actual 3TB limit.
    No, there is no 3TB limit. At the moment the 320 was launched I suppose only 3TB disks were available (for a decent price) and so they were the only ones tested. I'm pretty sure I have read reports of bigger disks (8TB?) inserted in a 320, so there is no artificial 3TB limit. An non-artificial limit will not be 3TB, but a power of 2. (And there is a limit of 16TiB, by the filesystem limit of 2^32 clusters of 4kB each).

  • jko
    jko Posts: 11
    The 3rd disk is unrelated and is connected through external USB.
  • Mijzelf
    Mijzelf Posts: 1,802  Guru Member
    In that case I'd retry with the USB disk disconnected. Your array consists of sda2 and sdc2. In Linux disk names are assigned in the sequence the disks are found, and as the SATA bus and USB bus are not initialized together, it's very unlikely the USB disk would be sdb. It should be either sda or sdc.
  • jko
    jko Posts: 11
    tried without the usb, it still failed. But this time I did see an error in dmesg which said "unrecoverable I/O read error for block ". Although smart and the scan in zyxel's UI shows the disk is ok.
  • jko
    jko Posts: 11
    Thanks, that'smy guess too. The plan is to get a new 4 bay nas around Thanksgiving and then copy things over