NSA325-v2 disc upgrade (2TB -> 4TB)

Options
Hi all,

So yesterday, I tried upgrading my Zyxel NSA25-V2 with larger hard drives. The old configuration was RAID1 with 2x2TB discs. The new configuration is RAID1 with 2x4TB discs.

Unfortunately, I hit a snag, and I am not sure how to proceed now. Here's what I've done so far. 

O1 = old disc 1 (2TB)
O2 = old disc 2 (2TB)
N1 = new disc 1 (4TB)
N2 = new disc 2 (4TB)

1. Removed O1, and replaced it with N1. Started up the NAS. Logged onto the web console, it started recovery (automatically). After about 3 hours, the recovery was complete, so the array was rebuilt. N1 now has the same data as O2.
2. Shut down the NAS, removed O2, and replaced it with N2. Started up the NAS. Logged onto the web console. I expected the NAS to automatically start copying the data from N1 to N2. But now it shows the array as down, there's no option in the web interface to start recovery or to repair it.

So I logged onto the NAS using telnet from my PC. Here's what I see :

fdisk -l shows : 

Disk /dev/sda: 4000.7 GB, 4000787030016 bytes
255 heads, 63 sectors/track, 486401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x802e7d71

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1          64      514048+  83  Linux
/dev/sda2              65      267349  2146966762+  20  Unknown

Disk /dev/sdb: 4000.7 GB, 4000787030016 bytes
255 heads, 63 sectors/track, 486401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0001a21b

   Device Boot      Start         End      Blocks   Id  System

So both hard drives are recognized by the NAS. But there are no partitions on N2.

Next step, I looked at the array itself :

/ # mdadm --detail /dev/md0
/dev/md0:
        Version : 1.2
  Creation Time : Wed Sep 17 20:47:16 2014
     Raid Level : raid1
     Array Size : 1952996792 (1862.52 GiB 1999.87 GB)
  Used Dev Size : 1952996792 (1862.52 GiB 1999.87 GB)
   Raid Devices : 2
  Total Devices : 1
    Persistence : Superblock is persistent

    Update Time : Sun May  1 10:36:03 2022
          State : clean, degraded
 Active Devices : 1
Working Devices : 1
 Failed Devices : 0
  Spare Devices : 0

           Name : NSA325-v2:0  (local to host NSA325-v2)
           UUID : 47d31d36:fb44b4a4:28e26607:1a13dbd9
         Events : 9690

    Number   Major   Minor   RaidDevice State
       2       8        2        0      active sync   /dev/sda2
       1       0        0        1      removed
  
So it sees the first disc (N1) but failed to add the second disc (N2). The state is 'degraded'...

Using parted, I checked the partition table type (MBR vs GPT) :

So on N1 (the first new disc) it looks like this :

/ # parted /dev/sda
GNU Parted 3.0
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
print
Model:  WD40EFZX-68AWUN0 (scsi)
Disk /dev/sda: 4001GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system     Flags
 1      32.3kB  526MB   526MB   primary  linux-swap(v1)
 2      526MB   2199GB  2198GB  primary
 
So the partition table is msdos (MBR) on the first new disc. This is probably because the old disc (O1) was 2TB and also had MBR. And everything was just copied from O2 to N1, so this makes sense.

Checking the second disc (N2) it shows :

/ # parted /dev/sdb
GNU Parted 3.0
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
print
Model:  WD40EFZX-68AWUN0 (scsi)
Disk /dev/sdb: 4001GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End  Size  Type  File system  Flags

So the second 4TB disc (N2) also has msdos (MBR). The NAS didn't create any partitions on N2 though.

Now I'm not sure why it is refusing to recover the array. I rebooted the NAS several times. I know that I somehow still need to convert the MBR to GPT (since I want the array to grow it to 4TB), but for now, it should still do recovery (i.e. copying everything from N1 to N2), right?

Would it help to create a JBOD volume on N2 (hopefully with a GPT type partition table), then manually copy everything over from N1 to N2? And then somehow rebuild the array? How would I go about doing this?

Any help appreciated, I'm really stuck right now!

Accepted Solution

  • Mijzelf
    Mijzelf Posts: 2,610  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    Answer ✓
    Options
    How far do you want to go? It is possible to clone the partition table and manually add the new partition to the existing raid array, (manually, in a shell) but AFAIK there is no easy way to convert the MBR to GPT hereafter.
    I think it's easier to remove the old disks, put in the new disks, create a new 4TB volume on the new disks. Then remove one new disk and put an old one in. Don't know if the NAS will see 2 or only one degraded volume. Assemble&mount the other manually, copy data over, and finally let the new disks resync.
    There is one problem, when you create a new volume on the new disks you'll loose your packages, and you'll need ssh. ZyXEL in their wisdom decided to remove the package directories for all EOL NASses, including the NSA325. The work-around is to install MetaRepository (https://zyxel.diskstation.eu/Users/Mijzelf/zypkg-repo/) and add a mirror for the stock packages (https://zyxel.diskstation.eu/forum/viewtopic.php?f=26&t=174). Then you can install the ssh package again.


All Replies

  • Mijzelf
    Mijzelf Posts: 2,610  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    Answer ✓
    Options
    How far do you want to go? It is possible to clone the partition table and manually add the new partition to the existing raid array, (manually, in a shell) but AFAIK there is no easy way to convert the MBR to GPT hereafter.
    I think it's easier to remove the old disks, put in the new disks, create a new 4TB volume on the new disks. Then remove one new disk and put an old one in. Don't know if the NAS will see 2 or only one degraded volume. Assemble&mount the other manually, copy data over, and finally let the new disks resync.
    There is one problem, when you create a new volume on the new disks you'll loose your packages, and you'll need ssh. ZyXEL in their wisdom decided to remove the package directories for all EOL NASses, including the NSA325. The work-around is to install MetaRepository (https://zyxel.diskstation.eu/Users/Mijzelf/zypkg-repo/) and add a mirror for the stock packages (https://zyxel.diskstation.eu/forum/viewtopic.php?f=26&t=174). Then you can install the ssh package again.


  • Frik
    Frik Posts: 16
    Friend Collector
    Options
    Mijzelf said:
    How far do you want to go? It is possible to clone the partition table and manually add the new partition to the existing raid array, (manually, in a shell) but AFAIK there is no easy way to convert the MBR to GPT hereafter.
    I think it's easier to remove the old disks, put in the new disks, create a new 4TB volume on the new disks. Then remove one new disk and put an old one in. Don't know if the NAS will see 2 or only one degraded volume. Assemble&mount the other manually, copy data over, and finally let the new disks resync.
    There is one problem, when you create a new volume on the new disks you'll loose your packages, and you'll need ssh. ZyXEL in their wisdom decided to remove the package directories for all EOL NASses, including the NSA325. The work-around is to install MetaRepository (https://zyxel.diskstation.eu/Users/Mijzelf/zypkg-repo/) and add a mirror for the stock packages (https://zyxel.diskstation.eu/forum/viewtopic.php?f=26&t=174). Then you can install the ssh package again.


    Hi @Mijzelf, thanks for the advice. I went ahead as you suggested, I created a new 4TB volume on both the new discs. It took a while, I didn't want to start copying until it was finished syncing the new discs as an empty volume. But it went well, so far.
    So now I just put back one old disc and I can access the old dataset at /i-data/md1, the new disc is available at /i-data/md0. I'm going to start copying it soon, I guess the quickest is to just use vanilla 'cp' ? I'm using telnet btw. Or is there perhaps a better way to copy ? Since it's quite important that nothing goes wrong during copying, do you have any suggestion how I can verify afterwards that everything was copied over ok ? I'm a bit of a rookie when it comes to Linux, so sorry if this is a very basic question....

  • Mijzelf
    Mijzelf Posts: 2,610  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    edited May 2022
    Options
    I'd use 'cp -a'. About checking, you can run
    find /path/to/directory -type f -exec md5sum '{}' \;
    to generate md5sums of all files. That can be done in both source and target directory. The output can be redirected to a file:
    find /path/to/directory -type f -exec md5sum '{}' \; >md5sums.list
    and finally you can compare both files.
    diff file1 file2
    Maybe you'll have to sort the files, if they don't have the same order:
    sort <md5sums.list >md5sums.ordered.list




  • Frik
    Frik Posts: 16
    Friend Collector
    Options
    Hi @Mijzelf, thanks again for your help, really appreciate it. I just have another question about your original answer above, hope you don't mind. I think I'm nearly there.

    You said : "add a mirror for the stock packages (https://zyxel.diskstation.eu/forum/viewtopic.php?f=26&t=174). "

    I'm not sure what you meant by this.... I managed to install the MetaRepository, but how do I now install ssh ? I do see the file 
    http://zyxel.diskstation.eu/Users/Mijzelf/zypkg-repo/zyxel_fw4_zypkgs/SSH_6.7_arm_001.zpkg, but how do I install this on my NAS? 

    I also went to the configuration page of MetaRepository on my NAS, perhaps I need to add my own repository directory there? And just copy the SSH .zpkg manually to the NAS? Is that what you meant ?


  • Frik
    Frik Posts: 16
    Friend Collector
    Options
    Hi @Mijzelf, thanks again for your help, really appreciate it. I just have another question about your original answer above, hope you don't mind. I think I'm nearly there.

    You said : "add a mirror for the stock packages (https://zyxel.diskstation.eu/forum/viewtopic.php?f=26&t=174). "

    I'm not sure what you meant by this.... I managed to install the MetaRepository, but how do I now install ssh ? I do see the file 
    http://zyxel.diskstation.eu/Users/Mijzelf/zypkg-repo/zyxel_fw4_zypkgs/SSH_6.7_arm_001.zpkg, but how do I install this on my NAS? 

    I also went to the configuration page of MetaRepository on my NAS, perhaps I need to add my own repository directory there? And just copy the SSH .zpkg manually to the NAS? Is that what you meant ?


  • Mijzelf
    Mijzelf Posts: 2,610  Guru Member
    First Anniversary 10 Comments Friend Collector First Answer
    Options
    The firmware package system can only handle a single repository. MetaRepository injects itself in the system, and pretends to be that single repository, while merging several repositories on the fly. In the webinterface you can see which repositories are merged, one of them is ftp://ftp2.zyxel.com/+, which used to contain the 'official' repo. The files for the NSA325 are no longer there. So you can exchange this URL by 'http://zyxel.diskstation.eu/Users/Mijzelf/zypkg-repo/zyxel_fw4_zypkgs/', and use the normal firmware package install system to install ssh.
  • Frik
    Frik Posts: 16
    Friend Collector
    Options
    I managed to get the list of packages to install now. Quite a strange beast, the NSA325, but for some reason, I don't want to get rid of it. Thanks for your help, I can now keep it alive for a couple of years more ;-)

Consumer Product Help Center