You are not logged in.

#1 2011-01-13 20:48:50

absinthe
Member
Registered: 2011-01-13
Posts: 1

mdadm nested arrays

Hi all

I would like to combine my harddisks to a nested raid (raid0 and raid5).
My System files are on a separate drive (sda).
I have six disks:

#System files
/dev/sda

#Raid0 (/dev/md0) all are 750G
/dev/sdb 
/dev/sdc
/dev/sdd

#Raid5 (/dev/md1)
/dev/md0
/dev/sde (2T)
/dev/sdf (2T)

I have run following commands:

mdadm --create /dev/md0 -n3 -l0 /dev/sdb /dev/sdc /dev/sdd
mdadm --create /dev/md1 -n3 -l5 /dev/md0 /dev/sdc /dev/sdd

mdadm --examine --scan > /etc/mdadm.conf

cat /proc/mdstat

shows /dev/md1 in rebuilding state.
after a reboot /dev/md1 is in inactive state and has only /dev/sde and /dev/sdf as members

---

As a workaround to this problem I created two additional raid0 (/dev/md0 is the same as above):

mdadm --create /dev/md1 -n1 -l0 /dev/sde --force
mdadm --create /dev/md2 -n1 -l0 /dev/sdf --force

and then combined them with md0:

mdadm --create /dev/md3 -n3 -l5 /dev/md0 /dev/md1 /dev/md2

This seems to work fine. After reboots the rebuild process continues and everything is in state "active".

Is there a better way to solve this? It looks to me like a very ugly workaround.

Sorry for my bad English :-)

Thank you for helping me with this problem.

Last edited by absinthe (2011-01-13 20:58:33)

Offline

#2 2013-01-23 20:24:25

AGT
Member
From: Null Void
Registered: 2012-10-27
Posts: 59
Website

Re: mdadm nested arrays

I am currently having the same issue: I have three physical disks: two of 80 GB in RAID 0 (/dev/md/Data_RAID) and one 500 GB disk with a 160 GB partition (/dev/sde1) which I am using together for another RAID 1 array (/dev/md/Data).
Although I do not have a solution to your problem, I would like to say that you have a workaround, at least.

# /dev/md/Data_RAID
/dev/sdc1 80 GB
/dev/sdd1 80 GB

# /dev/md/Data
/dev/sde1
/dev/md/Data_RAID

Also, I think you made a typo error: I think you meant /sde and /sdf in the level 5 array, instead of /sdc and /sdd.

absinthe wrote:
mdadm --create /dev/md0 -n3 -l0 /dev/sdb /dev/sdc /dev/sdd
mdadm --create /dev/md1 -n3 -l5 /dev/md0 /dev/sdc /dev/sdd
[...]

Like so:

mdadm --create /dev/md0 -n3 -l0 /dev/sdb /dev/sdc /dev/sdd
mdadm --create /dev/md1 -n3 -l5 /dev/md0 /dev/sde /dev/sdf

Offline

Board footer

Powered by FluxBB