NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
Retired_Member
Jul 12, 2021Mounting ReadyNAS 212 RAID1 Harddrive in Linux
Dear Community,
i am currently facing issues with mounting a 3,5 inch 6TB WD RED NAS Drive on a Linux system. I disabled X-RAID in the ReadyNAS UI, let the Filesystem-check run overnight, shut down the NAS and removed the harddrive. I then plugged it into an USB-Adapter wanting to read it on my Linux, however this fails with the message:
mount: /mnt/readynas: wrong fs type, bad option, bad superblock on /dev/md0, missing codepage or helper program, or other error.
The following details might help you to help me out (i am using fully updated Kali Linux):
I installed mdadm and btrfs-tools via:
sudo apt install mdadm btrfs-progs -y
In order to mount the disk which was previously used in a X-RAID RAID1 setting, i used the following commands:
sudo mdadm --stop /dev/md* # Make sure we start fresh sudo mdadm --assemble /dev/md0 /dev/sda3 # /dev/sda3 is the partition with my data
The output of lsblk -f show the following:
lsblk -f NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINT sda |-sda1 linux_raid_member 1.2 11b7b58e:0 9eccd81e-d03d-a6c9-7906-eb3cf500ff55 |-sda2 linux_raid_member 1.2 11b7b58e:1 b818a0af-6a77-2823-9dbf-9cd47f39e768 `-sda3 linux_raid_member 1.2 11b7b58e:data-0 3b96c86d-c305-e3e3-2a81-178bd2855d1c `-md0 btrfs 11b7b58e:data fd62b819-02ae-46bc-bf2e-ce4d5c49fd96
cat /proc/mdstat outputs:
cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active (auto-read-only) raid1 sda3[0]
5855672832 blocks super 1.2 [2/1] [U_]
unused devices: <none>Checking the filesystem delivers the following results:
#btrfs check --readonly /dev/md0
Opening filesystem to check... Checking filesystem on /dev/md0 UUID: fd62b819-02ae-46bc-bf2e-ce4d5c49fd96 [1/7] checking root items [2/7] checking extents [3/7] checking free space cache [4/7] checking fs roots [5/7] checking only csums items (without verifying data) [6/7] checking root refs [7/7] checking quota groups Counts for qgroup id: 0/272 are different our: referenced 4843462852608 referenced compressed 4843462852608 disk: referenced 4843462852608 referenced compressed 4843462852608 our: exclusive 175476719616 exclusive compressed 175476719616 disk: exclusive 247580409856 exclusive compressed 247580409856 diff: exclusive -72103690240 exclusive compressed -72103690240 found 5239930019840 bytes used, error(s) found total csum bytes: 465103576 total tree bytes: 1343586304 total fs tree bytes: 725188608 total extent tree bytes: 58195968 btree space waste bytes: 225203561 file data blocks allocated: 7119670386688 referenced 6899655819264
MDADM shows:
# mdadm --detail /dev/md0
/dev/md0:
Version : 1.2
Creation Time : Tue May 23 21:23:23 2017
Raid Level : raid1
Array Size : 5855672832 (5584.40 GiB 5996.21 GB)
Used Dev Size : 5855672832 (5584.40 GiB 5996.21 GB)
Raid Devices : 2
Total Devices : 1
Persistence : Superblock is persistent
Update Time : Mon Jul 12 10:41:05 2021
State : clean, degraded
Active Devices : 1
Working Devices : 1
Failed Devices : 0
Spare Devices : 0
Consistency Policy : resync
Name : 11b7b58e:data-0
UUID : 3b96c86d:c305e3e3:2a81178b:d2855d1c
Events : 8208
Number Major Minor RaidDevice State
0 8 3 0 active sync /dev/sda3
- 0 0 1 removed
When i try to mount the md0 partition, dmesg shows me the following errors:
dmesg | tail [ 753.155060] md: md0 stopped. [ 753.160280] md/raid1:md0: active with 1 out of 2 mirrors [ 753.160296] md0: detected capacity change from 0 to 5996208979968 [ 2090.703334] BTRFS info (device md0): disk space caching is enabled [ 2090.703341] BTRFS info (device md0): has skinny extents [ 2090.800229] BTRFS critical (device md0): corrupt leaf: root=1 block=42369024 slot=8, invalid root flags, have 0x10001 expect mask 0x1000000000001 [ 2090.800236] BTRFS error (device md0): block=42369024 read time tree block corruption detected [ 2090.813602] BTRFS critical (device md0): corrupt leaf: root=1 block=42369024 slot=8, invalid root flags, have 0x10001 expect mask 0x1000000000001 [ 2090.813612] BTRFS error (device md0): block=42369024 read time tree block corruption detected [ 2090.819116] BTRFS error (device md0): open_ctree failed # mount -o ro /dev/md0 /mnt/readynas mount: /mnt/readynas: wrong fs type, bad option, bad superblock on /dev/md0, missing codepage or helper program, or other error.
What can be the reason for this behaviour?
When i put the drive back into my ReadyNAS 212 the system boots fine and the data is accessible...
Do you guys have ideas for a potential solution?
Thank you!
13 Replies
Replies have been turned off for this discussion
- Retired_Member
Does anybody of you guys have an idea? Maybe even the Netgear Support? Is the information i provided sufficient?
- StephenBGuru - Experienced User
I haven't needed to do this myself, but the normal procedure would be
# mdadm --assemble --scan
# mount -t btrfs -o ro /dev/md127 /mntSo maybe simplify what you are doing, and just try the two commands above.
- Retired_Member
Hello StephenB
Thanks for your reply! I tried it, but i receive the same error. It also seems that the RAID1 disk gets automatically detected and md devices are created automatically since having mdadm and btrfs-progs installed.
Here is the output as screenshot (which seems not to load properly somehow):
dmesg after plugging in USB-SATA adapter
Here the output as text:
[ 42.258816] usb 2-4.1: new SuperSpeed Gen 1 USB device number 3 using xhci_hcd [ 42.280118] usb 2-4.1: New USB device found, idVendor=174c, idProduct=55aa, bcdDevice= 1.00 [ 42.280124] usb 2-4.1: New USB device strings: Mfr=2, Product=3, SerialNumber=1 [ 42.280128] usb 2-4.1: Product: ASM1153E [ 42.280131] usb 2-4.1: Manufacturer: asmedia [ 42.280133] usb 2-4.1: SerialNumber: 123456789012 [ 42.343793] SCSI subsystem initialized [ 42.349968] usbcore: registered new interface driver usb-storage [ 42.356211] scsi host0: uas [ 42.356332] usbcore: registered new interface driver uas [ 42.514789] scsi 0:0:0:0: Direct-Access WDC WD60 EFRX-68L0BN1 0 PQ: 0 ANSI: 6 [ 42.528123] scsi 0:0:0:0: Attached scsi generic sg0 type 0 [ 42.533359] sd 0:0:0:0: [sda] 11721045168 512-byte logical blocks: (6.00 TB/5.46 TiB) [ 42.533366] sd 0:0:0:0: [sda] 4096-byte physical blocks [ 42.533498] sd 0:0:0:0: [sda] Write Protect is off [ 42.533504] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00 [ 42.533689] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 42.533913] sd 0:0:0:0: [sda] Optimal transfer size 33553920 bytes not a multiple of physical block size (40 96 bytes) [ 42.611907] sda: sda1 sda2 sda3 [ 42.613958] sd 0:0:0:0: [sda] Attached SCSI disk [ 42.767895] md/raid1:md0: active with 1 out of 2 mirrors [ 42.767929] md0: detected capacity change from 0 to 4290772992 [ 42.772822] md/raid1:md127: active with 1 out of 2 mirrors [ 42.772845] md127: detected capacity change from 0 to 5996208979968 [ 42.776360] md/raid1:md126: active with 1 out of 1 mirrors [ 42.776382] md126: detected capacity change from 0 to 535822336 [ 42.887090] BTRFS: device label 11b7b58e:data devid 1 transid 61090 /dev/md127 scanned by systemd-udevd (819 ) [ 98.334575] BTRFS info (device md127): disk space caching is enabled [ 98.334583] BTRFS info (device md127): has skinny extents [ 98.383578] BTRFS critical (device md127): corrupt leaf: root=1 block=42369024 slot=8, invalid root flags, h ave 0x10001 expect mask 0x1000000000001 [ 98.383583] BTRFS error (device md127): block=42369024 read time tree block corruption detected [ 98.386605] BTRFS critical (device md127): corrupt leaf: root=1 block=42369024 slot=8, invalid root flags, h ave 0x10001 expect mask 0x1000000000001 [ 98.386611] BTRFS error (device md127): block=42369024 read time tree block corruption detected [ 98.390386] BTRFS error (device md127): open_ctree failed
/dev/md0 can be mounted without issues, but /dev/md127 (the btrfs data partition not).
I wonder why my ReadyNAS works with the disk, but mounting it on another system does not...
On my ReadyNAS i get the following output when using dmesg:
[ 15.077271] md: md0 stopped. [ 15.078178] md: bind<sda1> [ 15.079605] md/raid1:md0: active with 1 out of 2 mirrors [ 15.079756] md0: detected capacity change from 0 to 4290772992 [ 15.093302] md: md1 stopped. [ 15.094176] md: bind<sda2> [ 15.095569] md/raid1:md1: active with 1 out of 1 mirrors [ 15.095696] md1: detected capacity change from 0 to 535822336 [ 15.327901] EXT4-fs (md0): mounted filesystem with ordered data mode. Opts: (null) [ 19.139325] md: md127 stopped. [ 19.140180] md: bind<sda3> [ 19.153459] md/raid1:md127: active with 1 out of 2 mirrors [ 19.153672] md127: detected capacity change from 0 to 5996208979968 [ 19.583697] Adding 523260k swap on /dev/md1. Priority:-1 extents:1 across:523260k [ 19.608040] BTRFS: device label 11b7b58e:data devid 1 transid 61090 /dev/md127 [ 19.829265] BTRFS info (device md127): has skinny extents
Mounting /dev/md127 works like a charm:
root@NAS:~# mkdir -p /mnt/readynas root@NAS:~# mount /dev/md127 /mnt/readynas/ root@NAS:~#
Do you guys have another idea?
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!