OpenWrt on Zyxel NSA325v2

Creates an empty file.

root@NSA325v2_2:~# mdadm --detail --scan
root@NSA325v2_2:~# mdadm --assemble --scan
root@NSA325v2_2:~#

Should I disable here or do something in the mount point menu?

that looks OK to me, if you can access the data in /mnt/sda2 and /mnt/sdb2

if possible, make sure the disks are mounted read only, for now.

Problem ist that I can cd to /mnt/sdb2/ but ls shows no content.

root@NSA325v2_2:~# fdisk -l
Disk /dev/mtdblock0: 768 KiB, 786432 bytes, 1536 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mtdblock1: 512 KiB, 524288 bytes, 1024 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mtdblock2: 126.77 MiB, 132907008 bytes, 259584 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/ubiblock0_1: 1.74 MiB, 1806336 bytes, 3528 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sda: 1.84 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: ST32000542AS
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x90a8e6ae

Device     Boot   Start        End    Sectors  Size Id Type
/dev/sda1            63    1028159    1028097  502M  8 AIX
/dev/sda2       1028160 3907024064 3905995905  1.8T 20 unknown


Disk /dev/sdb: 1.84 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: WDC WD2003FYYS-0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x8206af4c

Device     Boot   Start        End    Sectors  Size Id Type
/dev/sdb1            63    1028159    1028097  502M 83 Linux
/dev/sdb2       1028160 3907024064 3905995905  1.8T 20 unknown

are they actually mounted ?

run a simple mount.

Does not look like it, no. But I thought that was due to the RAID issue

root@NSA325v2_2:~# mount
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/ubi0_2 on /overlay type ubifs (rw,noatime,ubi=0,vol=2)
overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600,ptmxmode=000)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
/dev/sda1 on /mnt/sda1 type ext2 (rw,relatime)
root@NSA325v2_2:~#

so they're not

Not sure if it'll work, but you could try mount -o ro /dev/sda2 /mnt/sda2
it might throw an file system unknown error though.

-o ro is for making it read only.

root@NSA325v2_2:~# mount -o ro /dev/sda2 /mnt/dev/sda2
NTFS signature is missing.
Failed to mount '/dev/sda2': Invalid argument
The device '/dev/sda2' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
NTFS signature is missing.
Failed to mount '/dev/sda2': Invalid argument
The device '/dev/sda2' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
mount: mounting /dev/sda2 on /mnt/dev/sda2 failed: No such file or directory
root@NSA325v2_2:~#

No sure why it is trying to mount NTFS.

Yeah, it can't detect the file system used, make sure you have the ext? packages installed.
kmod-fs-ext4 and perhaps libext2fs2 too.

also, there was a typo in the mount command, changed.

relevant, but you have two Zyxel drives.

mdadm --assemble /dev/md0 /dev/sda2 /dev/sdb2 should work, then cat /proc/mdstat

The packages were installed already.

I decided to give it a shot on my RPi and it says in GParted
grafik
grafik

Zyxel instructions:

Disk /dev/sda: 1.7 TiB, 1801763774464 bytes, 3519069872 sectors
Disk model: 000-2AE166      
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot Start        End    Sectors Size Id Type
/dev/sda1           1 4294967295 4294967295   2T ee GPT
root@piserver:/home/pi# mdadm -A -f /dev/md0 /dev/sda2
mdadm: cannot open device /dev/sda2: No such file or directory
mdadm: /dev/sda2 has no superblock - assembly aborted
root@piserver:/home/pi# mdadm --assemble /dev/md0 /dev/sda2 /dev/sdb2
mdadm: cannot open device /dev/sda2: No such file or directory
mdadm: /dev/sda2 has no superblock - assembly aborted
root@piserver:/home/pi# 

On NAS (different drive of course but same original setup during stock firmware)

root@NSA325v2_2:~# mdadm --assemble /dev/md0 /dev/sda2 /dev/sdb2
mdadm: superblock on /dev/sdb2 doesn't match others - assembly aborted
root@NSA325v2_2:~#

this would indicate they came from two different RAID sets, and cannot be combined.

They came from the same NAS. And I think I initialized them in the same NAS. But since they were not connected as a real RAID, it was possible to move them between the two Zyxel NAS. So cannot say for sure. At some point one of the NAS had to be sent for repairs and was exchanged for a new one. Maybe they were created in different NAS but always worked in all.

For me it would suffice to get access to the drives one by one. They are backups of each other mainly. So I need to access just one drive.
Maybe easiest to do so under RaspOS rather than OpenWRT.

Which means the issue right now is

Disk /dev/sda: 1.7 TiB, 1801763774464 bytes, 3519069872 sectors
Disk model: 000-2AE166      
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot Start        End    Sectors Size Id Type
/dev/sda1           1 4294967295 4294967295   2T ee GPT
root@piserver:/home/pi# mdadm -A -f /dev/md0 /dev/sda2
mdadm: cannot open device /dev/sda2: No such file or directory
mdadm: /dev/sda2 has no superblock - assembly aborted
root@piserver:/home/pi# mdadm --assemble /dev/md0 /dev/sda2 /dev/sdb2
mdadm: cannot open device /dev/sda2: No such file or directory
mdadm: /dev/sda2 has no superblock - assembly aborted
root@piserver:/home/pi#

EDIT:
I am googling and trying a few things and will post the outputs of course. But maybe Mijzelf already knows what I am doing wrong :smiley:

root@piserver:/home/pi# mdadm -E /dev/sda
/dev/sda:
   MBR Magic : aa55
Partition[0] :   4294967295 sectors at            1 (type ee)
root@piserver:/home/pi# 

seems the pi sees the disk layout differently, fdisk -l /dev/sda ?

Ah, I need to be carful. Since I have four disks and I am trying on RPi and OpenWRT in parallel, the outputs won't match anymore.

From now on I will try only on this one disk.
So information is:

Disk /dev/sda: 1.7 TiB, 1801763774464 bytes, 3519069872 sectors
Disk model: 000-2AE166      
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot Start        End    Sectors Size Id Type
/dev/sda1           1 4294967295 4294967295   2T ee GPT
root@piserver:/home/pi# 
root@piserver:/home/pi# mdadm -E /dev/sda
/dev/sda:
   MBR Magic : aa55
Partition[0] :   4294967295 sectors at            1 (type ee)
root@piserver:/home/pi# 
root@piserver:/home/pi# mdadm -A -f /dev/md0 /dev/sda2 /dev/sdb2
mdadm: cannot open device /dev/sda2: No such file or directory
mdadm: /dev/sda2 has no superblock - assembly aborted
root@piserver:/home/pi# mdadm -A -f /dev/md0 /dev/sda1
mdadm: cannot open device /dev/sda1: No such file or directory
mdadm: /dev/sda1 has no superblock - assembly aborted
root@piserver:/home/pi# 


just one thing,

but this is a guess, not all drives in a RAID set might carry the superblock ...

unlikely though.

Results of second disc from same NAS:

Disk /dev/sda: 1.7 TiB, 1801763774464 bytes, 3519069872 sectors
Disk model: 000-2AE166      
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x11717ad9

Device     Boot Start        End    Sectors Size Id Type
/dev/sda1           1 4294967295 4294967295   2T ee GPT
root@piserver:/home/pi# 
root@piserver:/home/pi# mdadm -E /dev/sda
/dev/sda:
   MBR Magic : aa55
Partition[0] :   4294967295 sectors at            1 (type ee)
root@piserver:/home/pi# 
root@piserver:/home/pi# mdadm -A -f /dev/md0 /dev/sda2 /dev/sdb2
mdadm: cannot open device /dev/sda2: No such file or directory
mdadm: /dev/sda2 has no superblock - assembly aborted
root@piserver:/home/pi# 
root@piserver:/home/pi# mdadm -A -f /dev/md0 /dev/sda1
mdadm: cannot open device /dev/sda1: No such file or directory
mdadm: /dev/sda1 has no superblock - assembly aborted
root@piserver:/home/pi# 

it's weird, since in openwrt the (same ?) disks showed two partitions.

@AleXSR700

You wrote that it are single disk volumes. So indeed they don't match. It should be

mdadm --assemble /dev/md0 /dev/sda2 --run
mdadm --assemble /dev/md1 /dev/sdb2 --run

For some reason on OpenWrt mdadm doesn't create a /dev/md0 on the fly. Maybe you need kmod-raid drivers?

1 Like

So, I apologize for any confusion so far, so I am now moving back to doing everything in the OpenWRT terminal of one of my two NAS.
The reason is simple: I want to rule out any hardware issue caused e.g. by the USB to SATA adapter. The NAS should have no hardware issue with the drives.

So, I tried your commands, Mijzelf, but I am still getting the invalid argument error.

root@NSA325v2_2:~# mdadm --assemble /dev/md0 /dev/sda2 --run
mdadm: failed to RUN_ARRAY /dev/md0: Invalid argument
root@NSA325v2_2:~# mdadm --assemble /dev/md1 /dev/sdb2 --runmdadm --assemble /dev/md1 /dev/sdb2 --run
mdadm: failed to RUN_ARRAY /dev/md1: Invalid argument
root@NSA325v2_2:~# fdisk -l
Disk /dev/mtdblock0: 768 KiB, 786432 bytes, 1536 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mtdblock1: 512 KiB, 524288 bytes, 1024 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mtdblock2: 126.77 MiB, 132907008 bytes, 259584 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/ubiblock0_1: 1.74 MiB, 1806336 bytes, 3528 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sda: 1.84 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: ST32000542AS    
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x90a8e6ae

Device     Boot   Start        End    Sectors  Size Id Type
/dev/sda1            63    1028159    1028097  502M  8 AIX
/dev/sda2       1028160 3907024064 3905995905  1.8T 20 unknown


Disk /dev/sdb: 1.84 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: WDC WD2003FYYS-0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x8206af4c

Device     Boot   Start        End    Sectors  Size Id Type
/dev/sdb1            63    1028159    1028097  502M 83 Linux
/dev/sdb2       1028160 3907024064 3905995905  1.8T 20 unknown
root@NSA325v2_2:~# 

For completeness, here is what the NAS is showing me as mount points, so it is finding 2 partitions on each drive

Did you install kmod-md-raid0 and/or kmod-md-raid1?

1 Like

I now also installed the 4, 5, 6. But I had the others installed already.