Skip to contentSkip to conversation

stray raid10 with 9 hdd with -n3 layout

DISCUSSION [email protected] 2 participants 2 messages Aug 6, 2014 – Dec 3, 2014 1 message not in the archive MD RAID

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Hi,
I have personal nas with open media vault. It is working quite good, if it is up and running. When I turn it off for a week, it does not assemble my raid, or it assembles it in degraded mode. Problem is in hardware. I use port replicators. They probably need to be warmed up before they provide access to all hdd. Beside this problem, can someone guide me to magic of linux software raid?

I have one disk for OS (no raid, no problems :)
Than I have three disks without raid.
And than I have nine disks which should assemble single raid with raid10, n3 layout. I have done mdadm --examine on all of them. Results are attached. I reference all disks by ID. Here is my mdadm.conf:

root@nas:~# grep ARRAY /etc/mdadm/mdadm.conf 
ARRAY /dev/md/3 metadata=1.2 name=nas:3 devices=/dev/disk/by-id/ata-ST320LT012-9WS14C_W0V0VD64,/dev/disk/by-id/ata-WDC_WD3200BPVT-80JJ5T0_WD-WXF1EC1DJTWJ,/dev/disk/by-id/ata-WDC_WD3200BPVT-80JJ5T0_WD-WXF1EC1DHUUW,/dev/disk/by-id/ata-WDC_WD3200BPVT-80JJ5T0_WD-WXF1EC1DUVZY,/dev/disk/by-id/ata-ST320LT012-9WS14C_W0V0WAP9,/dev/disk/by-id/ata-ST320LT012-9WS14C_W0V0VCHR,/dev/disk/by-id/ata-WDC_WD3200BPVT-80JJ5T0_WD-WXG1C12P3593,/dev/disk/by-id/ata-WDC_WD3200BPVT-80JJ5T0_WD-WXF1EC1CHAWF,/dev/disk/by-id/ata-ST320LT012-9WS14C_W0V0V9A4

See that if you do "grep "Array UUID" *" command on all attachement, that all disks have same array UUID and despite this, array state is not same from point of view of given disk:

root@nas:~/temp/raid10n3examine$ grep "Array State" *
disk1-ata-ST320LT012-9WS14C_W0V0VD64:               Array State : AAAAAAAAA ('A' == active, '.' == missing, 'R' == replacing)
disk2-ata-WDC_WD3200BPVT-80JJ5T0_WD-WXF1EC1DJTWJ:   Array State : .AA.AA..A ('A' == active, '.' == missing, 'R' == replacing)
disk3-ata-WDC_WD3200BPVT-80JJ5T0_WD-WXF1EC1DHUUW:   Array State : ..A.....A ('A' == active, '.' == missing, 'R' == replacing)
disk4-ata-WDC_WD3200BPVT-80JJ5T0_WD-WXF1EC1DUVZY:   Array State : AAAAAAAAA ('A' == active, '.' == missing, 'R' == replacing)
disk5-ata-ST320LT012-9WS14C_W0V0WAP9:               Array State : .AA.AA..A ('A' == active, '.' == missing, 'R' == replacing)
disk6-ata-ST320LT012-9WS14C_W0V0VCHR:               Array State : .AA.AA..A ('A' == active, '.' == missing, 'R' == replacing)
disk7-ata-WDC_WD3200BPVT-80JJ5T0_WD-WXG1C12P3593:   Array State : AAAAAAAAA ('A' == active, '.' == missing, 'R' == replacing)
disk8-ata-WDC_WD3200BPVT-80JJ5T0_WD-WXF1EC1CHAWF:   Array State : AAAAAAAAA ('A' == active, '.' == missing, 'R' == replacing)
disk9-ata-ST320LT012-9WS14C_W0V0V9A4:               Array State : .AA.AA..A ('A' == active, '.' == missing, 'R' == replacing)

I have these questions:
1. why does my array assemble automatically?
2. is there possibility to assemble array in a such way, that array will "elect" which data is on more disks and rewrite last disk if needed?
3. is there possibility to assemble array in cooperation with filesystem? That filesystem will have chance to choose blocks from all three disks and choose correct one from his point of view?
4. what should I do to have my data OK?

PS: I have lvm on top of that raid with a few volumes. All volumes with ext4 fs on them.

#2 lore raw
Quoted 1 line · <luvar <at> plaintext.sk> writes:

They probably need to be warmed up before they provide access to all hdd.

BIOS or EFI or Hardware Controller may have an option to delay boot process for a few seconds.

Quoted 1 line

And than I have nine disks which should assemble single raid with raid10,

n3 layout. I have done mdadm

Quoted 1 line

1. why does my array assemble automatically?

This is the default. You may be able to prevent this with kernel arguments or manipulation of the initial ramdisk.
To give you a starting point for research: "raid=noautodetect".

Quoted 1 line

2. is there possibility to assemble array in a such way, that array will

"elect" which data is on more disks

Quoted 1 line

and rewrite last disk if needed?

The default (and to my knowledge the only algorithm available in Linux software raid) is to choose the disk with the highest event count. The event counter is part of the meta data saved in each member of a raid.

Quoted 1 line

3. is there possibility to assemble array in cooperation with filesystem?

That filesystem will have

Quoted 1 line

chance to choose blocks from all three disks and choose correct one from

his point of view?

not that I heard of. You could check other filesystems with built-in raid,
though: btrfs and zfs.

Quoted 1 line

4. what should I do to have my data OK?

delay assembly, I guess.