NSA325v2: How mount sda2 (linux_raid_member)

I have a Zyxel NSA325v2 and finally made it trough the u-boot hasle. Installed with success Openwrt on it. So now i want to mount sda2 to /mnt/Volume1 but i get an error.

I made a folder /mnt/Volume1
cmd i used: mount /dev/sda2 /mnt/Volume1
Error: mount: mounting /dev/sda2 on /mnt/Volume1 failed: Invalid argument

lsblk says: sda2 linux_raid_member 2.7T NAS:0

How can i mount my second partition?

Make sure to install mdadm, blockd and mount-utils.

Even is the disc was never in a raid??

Prompt gave this:

root@NAS:~# mdadm --assemble /dev/md0 /dev/sda2 --run
mdadm: failed to RUN_ARRAY /dev/md0: Invalid argument

Serial console output:

[  277.489282] md: md0 stopped.
[  277.509862] md: personality for level -1 is not loaded!
[  277.517748] md: md0 stopped.

I think it's in the thread, it's always created as a raid, no matter what.

Which linux_raid_member also would indicate.

The params might not be generic, and need to be adapted to match your setup.

Read the whole thread.

I just did, but it is not completely clear to me. I don't want to loose the data on it. So i don't want to make new partitions or wipe it.
What is the action i have to perform to be able to read the disc again?
Fix the partition table??

If you try to fix the partition table, you're risking the data, and it shouldn't be needed.

What does fdisk say about the disk?

root@NAS:~# fdisk -l /dev/sda
Disk /dev/sda: 2.75 TiB, 3000592982016 bytes, 5860533168 sectors
Disk model: WDC WD30EFRX-68E
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: B4F30BA7-F2AD-44A2-8BDB-75B22D603E5D

Device      Start        End    Sectors  Size Type
/dev/sda1    2048     999423     997376  487M Linux swap
/dev/sda2  999424 5860532223 5859532800  2.7T Microsoft basic data

and

root@NAS:~# fdisk -l /dev/sdb
Disk /dev/sdb: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000DM003-1CH1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x39b11b70

Device     Boot   Start        End    Sectors  Size Id Type
/dev/sdb1            63    1028159    1028097  502M 83 Linux
/dev/sdb2       1028160 1953520064 1952491905  931G 20 unknown

Partition 1 does not start on physical sector boundary.

sdb is the most important disc!!

What kind of FS is the /dev/sda2

Is it the disk that was previously in the NAS?

What gives
mdadm --examine /dev/sda2 /dev/sdb2

1 Like

sda was always in the NAS, but i copied everything to the sdb disc before the uboot and openwrt conversion. I can't remember what filesystem i formatted the disc before it went in the nas...

root@NAS:~# mdadm --examine /dev/sda2 /dev/sdb2
/dev/sda2:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : b246bfb6:3c387062:2af1d298:d94be6dc
           Name : NAS:0  (local to host NAS)
  Creation Time : Tue Jan  9 09:28:22 2018
     Raid Level : linear
   Raid Devices : 1

 Avail Dev Size : 5859530752 (2794.04 GiB 3000.08 GB)
  Used Dev Size : 0
    Data Offset : 2048 sectors
   Super Offset : 8 sectors
   Unused Space : before=1968 sectors, after=0 sectors
          State : clean
    Device UUID : fb121774:6bc9a26a:dc1f86ed:d4af521c

    Update Time : Tue Jan  9 09:28:22 2018
       Checksum : 6ce3707f - correct
         Events : 0

       Rounding : 0K

   Device Role : Active device 0
   Array State : A ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdb2:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : c2c9e5b9:322e5605:065c0579:f6b0744a
           Name : NAS:1  (local to host NAS)
  Creation Time : Fri Jul  9 18:50:49 2021
     Raid Level : linear
   Raid Devices : 1

 Avail Dev Size : 1952489857 (931.02 GiB 999.67 GB)
  Used Dev Size : 0
    Data Offset : 2048 sectors
   Super Offset : 8 sectors
   Unused Space : before=1968 sectors, after=0 sectors
          State : clean
    Device UUID : 1c3a962b:63a3cde8:e1690aad:88d2f75f

    Update Time : Fri Jul  9 18:50:49 2021
       Checksum : bdcb8f76 - correct
         Events : 0

       Rounding : 0K

   Device Role : Active device 0
   Array State : A ('A' == active, '.' == missing, 'R' == replacing)

That looks fine. Did you install kmod-md-raid0 and blockd?

1 Like

I did install blockd, but not kmod-md-raid0. After install, what do i have to do to mount them?

edit: correction, have both installed!

I tried this, but the partitions are not mounted!
https://openwrt.org/docs/guide-user/storage/usb-drives#automount_the_partition

block info says:

root@NAS:/mnt$ block info
/dev/mtdblock2: UUID="7794146" VERSION="1" TYPE="ubi"
/dev/ubiblock0_1: UUID="99b72e98-eebd7105-fac72868-5a482b35" VERSION="4.0" MOUNT="/rom" TYPE="squashfs"
/dev/ubi0_2: UUID="ed8dafd3-cf18-49e1-969d-f1f4df198e89" VERSION="w4r0" MOUNT="/overlay" TYPE="ubifs"
/dev/sda1: UUID="e502a371-514d-44b6-adc4-ad43fd70eef0" VERSION="1.0" TYPE="ext2"
/dev/sda2: UUID="b246bfb6-3c38-7062-2af1-d298d94be6dc" LABEL="NAS:0" TYPE="linux_raid_member"
/dev/sdb1: UUID="6c82ec63-760f-48f5-b8cc-0ca2b5c51203" VERSION="1" TYPE="swap"
/dev/sdb2: UUID="c2c9e5b9-322e-5605-065c-0579f6b0744a" LABEL="NAS:1" TYPE="linux_raid_member"

what does cat /proc/mdstat and mdadm --examine --scan say ?

1 Like
root@NAS:/mnt$ cat /proc/mdstat
Personalities : [raid0] [raid1] [raid10] 
unused devices: <none>
root@NAS:/mnt$ mdadm --examine --scan
ARRAY /dev/md/0  metadata=1.2 UUID=b246bfb6:3c387062:2af1d298:d94be6dc name=NAS:0
ARRAY /dev/md/1  metadata=1.2 UUID=c2c9e5b9:322e5605:065c0579:f6b0744a name=NAS:1

ls -l /dev/md/0 , is it a softlink to /dev/md0 ?

1 Like

You can't mount the volumes before the arrays are assembled. Were the packages kmod-md-raid0 and blockd already installed when you tried to assemble them?
Else retry.

1 Like
root@NAS:/mnt$ ls -l /dev/md/0
ls: /dev/md/0: No such file or directory

How do i assemble them? That part i did not do i guess..?
kmod-md-raid0 i did not install myself, but blockd i did because i read some stuff about it on the forum and that was recommended.

It annoys the hell out of me that i cannot get to my files!? :confused:
After all the shit i gone trough to finally get the uboot installed and now such a simple thing as mounting my drives and browse trough my files i cannot solve?!!

Is it an option to put the drives into an external usb bay and solve this on my linux pc??

the drive isn't the issue, and USB won't solve it for you.

It's the RAID and/or partitioning causing the headache.

But if there's nothing important on /dev/sda2, recreate it, or just change the type, and create a new FS.