0

I used NAS system(Readynas) with Raid5 , but somehow trouble happened. So I connected every four disks to my Ubuntu machine and trying to rescue data.

$cat /etc/mdstat/mdstat.conf

ARRAY /dev/md/1 metadata=1.2 UUID=fd545cb6:345342544:7384acde:3847cad3 name=0e35cfc4:1
ARRAY /dev/md/0 metadata=1.2 UUID=93129d53:adbc6384:cba5637d:34859482 name=0e35cfc4:0
ARRAY /dev/md/1 metadata=1.2 UUID=06c043e4:55913070:bfdf08b2:6483ab43: name=0e35cfc4:1
ARRAY /dev/md/data-0 metadata=1.2 UUID=64b1f000:0b88551e:38b4a42b:d42dd5bd name=0e35cfc4:data-0

I think I need to mount md/data-0 for rescuing,

$sudo mdadm -R /dev/md/data-0
mdadm: error opening /dev/md/data-0: No such file or directory.

Maybe I must have some misunderstanding, but what can I do for mounting data-0?

$cat /proc/mdstat

Personalities : [raid1] [raid6] [raid5] [raid4]
md1 : active raid6 sde2[0] sdd2[1]
      1046528 blocks super 1.2 level 6, 512k chunk, algorithm 2 [4/2] [UU__]
md0 : active raid1 sdc1[0] sdf1[3] sde1[5] sdd1[4]
      4190208 blocks super 1.2 [4/4] [UUUU]

unused devices: <none>

Thanks to @SYN, I could add the two disks to md1. Status changed like this .

$cat /proc/mdstat
md1 : active raid6 sdf2[5] sdc2[4] sde2[0] sdd2[1]
      1046528 blocks super 1.2 level 6,512k chunk,algorithm 2 [4/4] [UUUU]

Howeverm 1046528 blocks is too small for my purpose.

This is logs from my another Nas Hardware(same bland). It has md127.

Personalities : [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] 
md127 : active raid5 sda3[0] sde3[5] sdd3[3] sdc3[2] sdb3[1]
      31236699136 blocks super 1.2 level 5, 64k chunk, algorithm 2 [5/5] [UUUUU]

md1 : active raid10 sda2[0] sde2[4] sdd2[3] sdc2[2] sdb2[1]
      1308160 blocks super 1.2 512K chunks 2 near-copies [5/5] [UUUUU]

md0 : active raid1 sda1[0] sde1[5] sdd1[3] sdc1[2] sdb1[1]
      4190208 blocks super 1.2 [5/5] [UUUUU]

So I guess my broken one has lost md127 somehow, is there any way to recover md127???

There is a md127 under /dev directory

$ls /dev/md*
/dev/md0   /dev/md1  /dev/md127

/dev/md:
0  1
6
  • 1
    look at cat /proc/mdstat to confirm your arrays availability, edit your post including output, ...
    – SYN
    Commented Nov 10, 2017 at 16:15
  • I added /proc/mdstat data. there is no data-0 entry..... I remember that when my nas server worked properly there were md0 md1 md127.
    – whitebear
    Commented Nov 10, 2017 at 16:21
  • Looks like your md1 is missing 2 out of 4 devices. No traces of data-0 or md127 though. Looks like md1 is a raid6: you should still be able to recover it, re-adding the missing disks (or adding replacement ones). Since your md0 is still healthy, and considering it share two disks with md1, ... Have you tried something like mdadm --manage /dev/md1 --add /dev/sdc2, then mdadm --manage /dev/md1 add /dev/sdf2?
    – SYN
    Commented Nov 10, 2017 at 16:28
  • You are saving my life. I could add two disks to md1. it looks to work correctly. then... how can I mount this and reach the data???
    – whitebear
    Commented Nov 10, 2017 at 16:35
  • Not being familiar with your hadware: maybe you will find entries in your /etc/fstab, referring to your /dev/md1. If so, just type mount /path/on/the/left/column to mount corresponding device. You might have to scan for logical volumes first (? unlikely, not impossible, vgscan then vgchange -a y VolName). In doubt: you should be able to reboot from there, and let boot process do whatever it used to
    – SYN
    Commented Nov 10, 2017 at 16:39

1 Answer 1

1

For the record, re-formatting my comments as an answer.

The first step is to look for raid devices status:

$ cat /proc/mdstat
...

OP output includes:

md1 : active raid6 sde2[0] sdd2[1]
      1046528 blocks super 1.2 level 6, 512k chunk, algorithm 2 [4/2] [UU__]

This indicates that two out of 4 devices from your /dev/md1 device are missing.

Now, since we can see that md0 is healthy, using 4 partitions: two of which on the same disks md1 uses, it is then fair to bet we can recover that array by re-adding partitions from the disks that are not listed as md1 devices:

mdadm --manage /dev/md1 add /dev/sdc2
mdadm --manage /dev/md1 add /dev/sdf2

Reboot, in doubt, ...

Now, it appears we're still missing a third raid device ... You might be able to find it back using:

mdadm --assemble --scan

Maybe:

mdadm --assemble /dev/md127 /dev/sdc3 /dev/sdd3 /dev/sde3 /dev/sdf3
2
  • Thanks for your help it is quit good advice for me and I could pointed out the problem.
    – whitebear
    Commented Nov 10, 2017 at 17:36
  • 1
    mdadm --assemble /dev/md127 /dev/sdc3 /dev/sdd3 /dev/sde3 /dev/sdf3 worked perfectly!!. The raid started with only 3 drives (maybe one drive was corrupted) thank you very much!!
    – whitebear
    Commented Nov 11, 2017 at 1:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .