NSA325v2: How mount sda2 (linux_raid_member)

If it was that easy, wouldn't you think i already had done that.
Yes the files are important to me!! And i copied most of them (not all because sdb is only 1T) to the sdb disc because i thought i would hit some kind of problem like this. But i didn't think the zyxel made the other disc also a raid... so now i still can't get at any of my files?!

So no, that' not a solution!

Myzelf if i remember correct you're dutch or belgian, am i correct? I used your repo on the zyxel software. Can we maybe try this in dutch? I really need to get to my files!

I have the disk in a usb bay and connected to my linux box.. lsblk sees the disc as sde but withouth any info

root@P3300LX:/media/admin# lsblk
sda      8:0    0 232,9G  0 disk 
├─sda1   8:1    0  93,1G  0 part 
└─sda2   8:2    0 139,8G  0 part 
sdb      8:16   0   2,7T  0 disk 
├─sdb1   8:17   0   975G  0 part /media/admin/Backup
├─sdb2   8:18   0 489,9G  0 part /media/admin/Multimedia
├─sdb3   8:19   0 489,9G  0 part /media/admin/Games
└─sdb4   8:20   0 839,8G  0 part /media/admin/Download
sdc      8:32   0 149,1G  0 disk 
└─sdc1   8:33   0 149,1G  0 part /media/root/BackupLinux
sdd      8:48   0 111,8G  0 disk 
├─sdd1   8:49   0   200M  0 part /boot/efi
├─sdd3   8:51   0  38,4G  0 part /
└─sdd4   8:52   0  73,2G  0 part /home
sde      8:64   0   2,7T  0 disk 
sr0     11:0    1  1024M  0 rom  

Asking for UUID

root@P3300LX:/media/admin# lsblk --output=name,uuid
├─sda1 17c5f8c4-1681-4b3b-9426-0769b19cbb3a
└─sda2 9a28deb7-a458-4ac3-b3bc-369468fc7918
├─sdb1 2D04485B14803637
├─sdb2 49CB3AAA7F6011FB
├─sdb3 2EB1FFF4073EC0AC
└─sdb4 65B7BF921A42ED93
└─sdc1 f565c1d8-cff5-4744-8a0b-85025ef812fe
├─sdd1 0BAB-160E
├─sdd3 c9c0a899-526d-4e9a-bfaf-b889b88045a1
└─sdd4 ecfcac14-40dc-45e4-a27b-79be083d1bf5

Tried to mount it, but errors

root@P3300LX:/media/admin# mount /dev/sde /media/admin/SDE
mount: /media/admin/SDE: wrong fs type, bad option, bad superblock on /dev/sde, missing codepage or helper program, or other error.

When i attache the drive dmesg says:

[155275.354503] usb 3-3.3: new high-speed USB device number 27 using xhci_hcd
[155275.471246] usb 3-3.3: New USB device found, idVendor=18a5, idProduct=0412, bcdDevice= 0.01
[155275.471247] usb 3-3.3: New USB device strings: Mfr=10, Product=11, SerialNumber=3
[155275.471248] usb 3-3.3: Product: USB 3.0 Desktop Hard Drive
[155275.471248] usb 3-3.3: Manufacturer: Verbatim
[155275.471249] usb 3-3.3: SerialNumber: 5555521255001E8
[155275.472575] usb-storage 3-3.3:1.0: USB Mass Storage device detected
[155275.472787] scsi host8: usb-storage 3-3.3:1.0
[155276.498929] scsi 8:0:0:0: Direct-Access     WDC WD30 EFRX-68EUZN0     0001 PQ: 0 ANSI: 6
[155276.499405] sd 8:0:0:0: [sde] Very big device. Trying to use READ CAPACITY(16).
[155276.499541] sd 8:0:0:0: [sde] 5860532224 512-byte logical blocks: (3.00 TB/2.73 TiB)
[155276.499543] sd 8:0:0:0: [sde] 4096-byte physical blocks
[155276.499816] sd 8:0:0:0: [sde] Write Protect is off
[155276.499819] sd 8:0:0:0: [sde] Mode Sense: 27 00 00 00
[155276.500058] sd 8:0:0:0: [sde] No Caching mode page found
[155276.500062] sd 8:0:0:0: [sde] Assuming drive cache: write through
[155276.500575] sd 8:0:0:0: Attached scsi generic sg5 type 0
[155276.537487] sd 8:0:0:0: [sde] Attached SCSI disk

lsusb says

root@P3300LX:/media/admin# lsusb
Bus 002 Device 002: ID 8087:8000 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 174c:3074 ASMedia Technology Inc. ASM1074 SuperSpeed hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 0b05:17d0 ASUSTek Computer, Inc. 
Bus 003 Device 008: ID 10c4:ea60 Silicon Labs CP210x UART Bridge
Bus 003 Device 006: ID 214b:7250 Huasheng Electronics 
--> Bus 003 Device 028: ID 18a5:0412 Verbatim, Ltd 
Bus 003 Device 002: ID 174c:2074 ASMedia Technology Inc. ASM1074 High-Speed hub
Bus 003 Device 007: ID 2516:0034 Cooler Master Co., Ltd. 
Bus 003 Device 025: ID 03f0:6204 HP, Inc DeskJet 5150c
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

fdisk -l says

root@P3300LX:/media/admin# fdisk -l /dev/sde
Schijf /dev/sde: 2,7 TiB, 3000592498688 bytes, 5860532224 sectoren
Eenheid: sectoren van 1 * 512 = 512 bytes
Sectorgrootte (logisch/fysiek): 512 bytes / 4096 bytes
In-/uitvoergrootte (minimaal/optimaal): 4096 bytes / 4096 bytes
Schijflabeltype: dos
Schijf-ID: 0x00000000

Apparaat   Op. Begin      Einde   Sectoren Grootte ID Type
/dev/sde1          1 4294967295 4294967295      2T ee GPT

Partitie 1 begint niet op een fysieke sectorgrens.

btw: maybe a warning in the 'how to' conversion from zyxel to openwrt that this CAN happen!! Would have let me think twice to do the conversion!

Can't mount, since it won't magically un-RAID itself, just because you move the HDD to a different host.

You're hitting the same 'issue' on the Linux box, as on the NAS.

It might not happen, it WILL happen.
It's not really an issue, if you're Linux-savvy enough.

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

That could be an issue of the USB bay. Have a look with fdisk -l /dev/sde, that will show the sector size:
Sector size (logical/physical): 512 bytes / 512 bytes
If the logical sector size is not 512 bytes, you have got an USB-Sata converter which does sector translation on disks >2TiB. In that case the partition table is incompatible.

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

root@NAS:~# ls -l /dev/md*
lrwxrwxrwx    1 root     root             8 Jul 13 13:29 0 -> /dev/md0

I guess i'm not savvy enough with linux..
What am i doing wrong??

Try skipping the --run

root@NAS:/etc/config$ mdadm --assemble /dev/md0 /dev/sda2
mdadm: failed to RUN_ARRAY /dev/md0: Invalid argument


Is this useful info?

root@NAS:~# lsblk --output=mode,path,pttype,fstype,label,partlabel,parttype,uuid,partuuid /dev/sda /dev/sdb
MODE       PATH      PTTYPE FSTYPE            LABEL PARTLABEL PARTTYPE                             UUID                                 PARTUUID
brw------- /dev/sda  gpt                                                                                                                
brw------- /dev/sda1        ext2                    mitraswap 0657fd6d-a4ab-43c4-84e5-0933c84b4f4f e502a371-514d-44b6-adc4-ad43fd70eef0 8af70d94-6108-4c9e-9869-7926d724ae06
brw------- /dev/sda2        linux_raid_member NAS:0 eexxtt44  ebd0a0a2-b9e5-4433-87c0-68b6b72699c7 b246bfb6-3c38-7062-2af1-d298d94be6dc 4bcd5221-d5bf-435e-85cf-14e2307557f0
brw------- /dev/sdb  dos                                                                                                                
brw------- /dev/sdb1        swap                              0x83                                 6c82ec63-760f-48f5-b8cc-0ca2b5c51203 39b11b70-01
brw------- /dev/sdb2        linux_raid_member NAS:1           0x20                                 c2c9e5b9-322e-5605-065c-0579f6b0744a 39b11b70-02


config mdadm
    option email root
    # list devices /dev/hd*
    # list devices /dev/sd*
    # list devices partitions

config array
    option uuid 52c5c44a:d2162820:f75d3464:799750f8
    option device /dev/md0
    # option name raid:0
    # option super_minor 0
    # list devices /dev/sda1
    # list devices /dev/sdb1
    # option spares 0
    # option spare_group spares
    # option bitmap /bitmap.md
    # option container 00000000:00000000:00000000:00000000
    # option member 1

And btw, i remember in the previous software, the status screen said that the drive was JBOD and not raid.. don't know if that is of any use??

I don't have any Linux server to access at the moment..

Check if there are any debug/verbosity options you can add to mdadm.

Also check dmesg after trying to assemble the raid.

I just removed one of the drives from the nas and put it in my linux box.
lsblk now shows a md127...

admin@P3300LX:~$ lsblk
sda         8:0    0   2,7T  0 disk   
├─sda1      8:1    0   487M  0 part   
└─sda2      8:2    0   2,7T  0 part   
  └─md127   9:127  0   2,7T  0 linear 

What can i try now?
mdadm --assemble /dev/md127 /dev/sda2

With or without --run option? Or do i have to do some other things first?

The run shouldn't really matter, but yeah, you can try to assemble it.

I always have a serial console to check some output. But the commands i do with ssh in a terminal. After the assemble command the serial console said:

[54336.049271] md: md0 stopped.^M
[54336.071748] md: personality for level -1 is not loaded!^M
[54336.079808] md: md0 stopped.^M

I tried to google it, but level -1 does not give anything..

G^DD4!MM^*! :frowning:

root@P3300LX:/home/admin# mdadm --assemble /dev/md127 /dev/sda2
mdadm: /dev/sda2 is busy - skipping

At least another warning...

I got a file in /run/mdadm/map with this line in it:

md127 1.2 b6bf46b2:6270383c:98d2f12a:dce64bd9 /dev/md/NAS:0

Yesss!!! Finally i have mounted /dev/md127 to a mountpoint!
So now i can copy my files and then format the disc... i hope i can do the same with the 1T disc, because that;s the one with all the important stuff on it!

For OpenWrt, what is the best filesystem to format to?

Ext4 is fine, probably not optimal, but good enough.

I think the personality error indicates missing modules on the NAS.

That was my first tought also.. but google did not get me any further. lsmod said i had raid0, raid1, raid10 and some md core something installed.. but i am glad my own linux box can handle it! :slight_smile:

Why is ext4 not optimal? I remember reading something about ext3 better then ext4.. but can't remember why?

edit: From the openwrt docs..

ext4 is best suited for hard drives
f2fs is best suited for flash drives (SSDs and usb thumbdrives)

There's yet another one, called kmod-mod-md.

You shouldn't really need to insmod anything, the mods required should autoload.

But a reboot might be a good idea.

There are another FSes, like zfs, that might be better.
With that said I use ext4 myself, on my server.

JBOD means 'just a bunch of disks', and unfortunately different NAS vendors give different meanings to that. For ZyXEL it means 'linear raid array', which is an array without redundancy, where several partitions can be glued after each other. The difference with raid0 is that raid0 is striped.
For other NAS vendors JBOD can mean that it's not a raid array. But ZyXEL doesn't really have that option. I think for simplicity.

--run is needed to assemble a degraded array (a single disk of a raid1 array, or something like that), if the array is not degraded it does nothing, AFAIK. So in case of uncertainty, just add it.

That will be kmod-md-linear