Technical Solutions

Linux Ubuntu 11.10 mdadm Raid 5 - Incorrect Raid Array Name

Posted Thursday, 18 April 2013 13:52

Having recently configured a Linux storage server using mdadm in Ubuntu 11.10 I experienced some problems with the array device name being rest to md127.

Configuration

I have three 1TB drives /dev/sda, /dev/sdd, /dev/sdc that are included in the RAID 5 Array using the followin mdadm command:

sudo mdadm --create /dev/md9 --level=5 --raid-devices=3 /dev/sda1 /dev/sdc1 /dev/sdd1

Issue

Once I reboot the server the array is shown as /dev/md127

Resolution;

Add the array conficguration into the /etc/mdadm/mdadm.conf file using:

sudo mdadm -Db /dev/md9 >> /etc/mdadm/mdadm.conf

The resuting mdadm.conf file will look like 

# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#
# by default, scan all partitions (/proc/partitions) for MD superblocks.
# alternatively, specify devices to scan, using wildcards if desired.
DEVICE partitions
# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes
# automatically tag new arrays as belonging to the local system
HOMEHOST <system>
# instruct the monitoring daemon where to send mail alerts
MAILADDR root
# definitions of existing MD arrays
ARRAY /dev/md9 metadata=1.2 spares=1 name=spcw-linux:9 UUID=e37cd4ee:f8458d49:037bddd2:71c11c8d

It seems that the name argument is responsible for the changing of the name from md9 to md127 so edit this line and remove all the unnecessary stuff. My line now looks like this:

ARRAY /dev/md9 UUID=e37cd4ee:f8458d49:037bddd2:71c11c8d.

In addition I changed the DEVICE line to just include the partitions that I wanted in my array

DEVICE /dev/sda1 /dev/sdc1 /dev/sdd1

Last but not least update the initramfs so that ubuntu knows about the array at boot

sudo update-initramfs -u

Read 2936 times Last modified on Thursday, 18 April 2013 14:28

Contact

Invalid Input
Invalid e-mail address
Invalid Input
Invalid Input
Invalid Input
This form collects your name , email, and phone number so that we can get back to you. Please indicate that you consent to this below and then you will be able to contact us via this form.
Invalid Input

Find Us

 

Contact Details

Sussex PC Works
9 Barclays Court,
Skeyne Drive,
Pulborough RH20 2BG
UK

Tel: 01903680683

©2018 Rhino All rights reserved

This site uses cookies and other tracking technologies to assist with navigation and analyse your use of our website and services.