Fedora Linux Support Community & Resources Center
  #1  
Old 8th March 2009, 12:30 AM
Thaidog Offline
Registered User
 
Join Date: Feb 2006
Posts: 184
Question Need help creating a software raid array.

I am following a Gentoo howto to create a software raid 0 arrary, but when I reboot the array is gone:

http://hilli.dk/howtos/lvm2-and-software-raid-in-linux/

Fecora 10 does not seem to have the /etc/mdadm.conf file that save the config with:

Update /etc/mdadm.conf with

# mdadm --detail --scan >> /etc/mdadm.conf




How do I save the raid array on FC 10?
Reply With Quote
  #2  
Old 8th March 2009, 12:07 PM
marcrblevins Offline
Registered User
 
Join Date: Jun 2006
Location: Texas
Age: 43
Posts: 4,168
Code:
man mdadm
While in there, type:
Code:
/EXAMPLES
Has good examples there.
Reply With Quote
  #3  
Old 8th March 2009, 04:45 PM
Thaidog Offline
Registered User
 
Join Date: Feb 2006
Posts: 184
Quote:
Originally Posted by marcrblevins View Post
Code:
man mdadm
While in there, type:
Code:
/EXAMPLES
Has good examples there.
Strange... i read the man examples but my system stil does not seem to have the mdadm.conf file;

then I do a updatedb && locate mdadm.conf

[root@iccproject tylerm]# updatedb
[root@iccproject tylerm]# locate mdadm.conf
/home/tylerm/mdadm.conf
/usr/share/doc/mdadm-2.6.7.1/mdadm.conf-example
/usr/share/man/man5/mdadm.conf.5.gz
[root@iccproject tylerm]# cat /home/tylerm/mdadm.conf
’DEVICE /dev/hd*[0-9] /dev/sd*[0-9]’
[root@iccproject tylerm]#

That does not seem like the right place for that file... and the array is ggone again after reboot.
Reply With Quote
  #4  
Old 8th March 2009, 06:27 PM
notageek Online
Registered User
 
Join Date: Jan 2008
Location: Bangalore, India
Posts: 2,129
You'll have to manually write /etc/mdadm.conf

Example:
Code:
ARRAY /dev/md0 level=linear num-devices=2 devices=/dev/sdb1,/dev/sdb2
man page of mdadm.conf has got examples that you can try.
Reply With Quote
  #5  
Old 9th March 2009, 12:07 AM
Thaidog Offline
Registered User
 
Join Date: Feb 2006
Posts: 184
Quote:
Originally Posted by notageek View Post
You'll have to manually write /etc/mdadm.conf

Example:
Code:
ARRAY /dev/md0 level=linear num-devices=2 devices=/dev/sdb1,/dev/sdb2
man page of mdadm.conf has got examples that you can try.
Ok, so I read the man page and tried two configs but still nothing:

The configs I tried:
[root@iccproject tylerm]# cat /etc/mdadm.conf
ARRAY /dev/md1 UUID=67c91b6c-9c80-af3f-aeff-096bf1e86363

[root@iccproject tylerm]# cat /etc/mdadm.conf
ARRAY /dev/md1 level=lraid0 num-devices=2 devices=/dev/sdb1,/dev/sdc1

Here is the UUID list that shows sdc1 and sdb1 as the same UUID:

[root@iccproject tylerm]# lsmod | grep md
[root@iccproject tylerm]# blkid
/dev/mapper/VolGroup00-LogVol00: UUID="9b39fee7-7b3d-4ac5-a9a1-5ceddf4cb5fb" TYPE="xfs"
/dev/mapper/VolGroup00-LogVol01: TYPE="swap" UUID="da557042-0c61-4cec-ab01-e52cde00ed54"
/dev/sda1: LABEL="/boot" UUID="bfae2cca-6434-4039-aa35-cbc5e1d525ce" TYPE="ext3" SEC_TYPE="ext2"
/dev/sda2: UUID="sZN5vY-f58K-MKlY-CAtn-YIdb-g4j7-GJiAEP" TYPE="lvm2pv"
/dev/VolGroup00/LogVol00: UUID="9b39fee7-7b3d-4ac5-a9a1-5ceddf4cb5fb" TYPE="xfs"
/dev/VolGroup00/LogVol01: TYPE="swap" UUID="da557042-0c61-4cec-ab01-e52cde00ed54"
/dev/sdb1: UUID="67c91b6c-9c80-af3f-aeff-096bf1e86363" TYPE="mdraid"
/dev/sdc1: UUID="67c91b6c-9c80-af3f-aeff-096bf1e86363" TYPE="mdraid"
/dev/sde1: LABEL="USB20FD" UUID="8C14-6402" TYPE="vfat"
[root@iccproject tylerm]# cat /etc/mdadm.conf
ARRAY /dev/md1 UUID=67c91b6c-9c80-af3f-aeff-096bf1e86363

lsmod doees not show "md" to be loaded like the mdadm.conf man pages says that it uses md as the driver.

[root@iccproject tylerm]# modprobe md
FATAL: Module md not found

Then I tired the The gentoo raid dirver name:
[root@iccproject tylerm]# modprobe dm-mod
FATAL: Module md not found

fdisk -l shows the disks:

Code:
Disk /dev/sdb: 150.0 GB, 150039945216 bytes
255 heads, 63 sectors/track, 18241 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x1ad5a23a

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       18241   146520801   83  Linux

Disk /dev/sdc: 150.0 GB, 150039945216 bytes
255 heads, 63 sectors/track, 18241 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00008612

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1       18241   146520801   83  Linu
I fired up the LVM2 gui and no volume group but the root filesystem (the volume group should be /dev/vg/xfsstripe)

Finally here is the scan from mdadm:

[root@iccproject tylerm]# mdadm --detail --scan
mdadm: md device /dev/md/d0 does not appear to be active.
mdadm: md device /dev/md/d1 does not appear to be active.

Any ideas?
Reply With Quote
  #6  
Old 9th March 2009, 01:00 AM
Thaidog Offline
Registered User
 
Join Date: Feb 2006
Posts: 184
Ok so I got the volume to be found by mdadm finally - this is what I needed:

[root@iccproject tylerm]# mdadm --examine --scan
ARRAY /dev/md0 level=raid0 num-devices=2 UUID=1b9a0101:475f34c9:8121eaed:ec72a205
ARRAY /dev/md1 level=raid0 num-devices=2 UUID=6c1bc967:3faf809c:6b09ffae:6363e8f1

The UUID for md1 and md0 is different form the UUID that identifies sdc and sdb

i changed it to the md1 UUID and now the raid volus is said to be active:

[root@iccproject tylerm]# mdadm --detail --scan
mdadm: md device /dev/md/d0 does not appear to be active.
ARRAY /dev/md1 level=raid0 num-devices=2 metadata=0.90 UUID=6c1bc967:3faf809c:6b09ffae:6363e8f1

Unfortunately the LVM is not being seen now:

[root@iccproject tylerm]# mdadm -As /dev/md1
mdadm: device /dev/md1 already active - cannot assemble it
[root@iccproject tylerm]# mdadm -E /dev/md1
mdadm: No md superblock detected on /dev/md1.

not sure but i think that the system is confused now since I initialized the drive set twice (md0 and md1)

Not sure what to do about that.
Reply With Quote
  #7  
Old 9th March 2009, 05:54 AM
notageek Online
Registered User
 
Join Date: Jan 2008
Location: Bangalore, India
Posts: 2,129
This does seem confusing.

Few things that I noted was your partitions sdb1 and sdc1 are not set to type "Linux raid auto detect", ideally thats what they should be. Use fdisk and then type "t", the codes for "Linux raid auto detect" is "fd"

Then I see that the syntax for mdadm.conf should contain the array (device) name and the constituting devices. Stick with device names (/dev/sdb etc) UUIDs are confusing.

I did not follow the LVM thing.
Reply With Quote
  #8  
Old 9th March 2009, 06:35 PM
Thaidog Offline
Registered User
 
Join Date: Feb 2006
Posts: 184
Any ideas on who to delete these two arrays so they do not show up when I issue:

[root@iccproject tylerm]# mdadm --examine --scan
ARRAY /dev/md0 level=raid0 num-devices=2 UUID=1b9a0101:475f34c9:8121eaed:ec72a205
ARRAY /dev/md1 level=raid0 num-devices=2 UUID=6c1bc967:3faf809c:6b09ffae:6363e8f1
Reply With Quote
  #9  
Old 10th March 2009, 05:09 AM
notageek Online
Registered User
 
Join Date: Jan 2008
Location: Bangalore, India
Posts: 2,129
Few steps:

1. Stop the raid array (in your case all of them)
Code:
mdadm --stop --scan
2. Fail the disk and remove it from the array
Code:
  mdadm /dev/md0 -f /dev/sda1 -r /dev/sda1 -a /dev/sda1
Where '-f' is for failing a disk, '-r' to remove, '-a' auto

3. Remove the config from /etc/mdadm.conf

Edit: I thought you want to destroy the raid devices, if that's not what you want then removing config from /etc/mdam.conf will get you the desired result.
Reply With Quote
Reply

Tags
array, creating, raid, software

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Software RAID 1 Array Fedora10 andy2008 Using Fedora 4 21st February 2009 06:00 PM
Problems creating RAID 5 array mikel1 Using Fedora 12 15th October 2007 01:51 AM
Trouble Getting Software RAID Array Assembled After Installing Fedora 7 ImNtReal Installation, Upgrades and Live Media 0 7th June 2007 03:45 PM
Need help recovering software RAID array verbatim Servers & Networking 1 14th November 2006 06:24 PM
Spin down disks in software raid array and otherwise? shadowwyvern Hardware & Laptops 1 21st September 2006 03:30 PM


Current GMT-time: 03:06 (Saturday, 26-07-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat