• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Software RAID?

T

timtrott

Guest
Can anyone provide me with some personal guidance in setting up software RAID (MDADM)?

I'm having problems understanding the MAN documentation (that appears to contain conflicting information) and the online HOW-TO's that may have some parts missing

I have a clean test box (FC2) to experiment with but I need to transfer what I learn to a rebuild of a production box (RHEL3).
 
I still must be missing something. Following the instructions in the first link:

mdadm --create --verbose /dev/md0 --level=0
--raid-devices=2 /dev/sda /dev/sdb

The result is:

Cannot open /dev/sda : No such device or address
Cannot open /dev/sdb : No such device or address

Both devices appear in /dev/ directory, both devices exist in the directory structure:

hda
-----hda1
-----hda2
-----hda3 swap
----------hda5 soft-raid

hdb
-----hdb1
----------hdb5 swap
----- /free

What do I need to do to correct the errors?

In a second example the author specifies:

mdadm --detail --scan
ARRAY /dev/md0 level=raid0 num-devices=2 \
UUID=410a299e:4cdd535e:169d3df4:48b7144a

To find the value for UUID, I issued the command:
mdadm -E /dev/sda, then /dev/sdb then dev/sda1, then dev/sdb1 -- All of which returned the same error:

Cannot open /dev/[sda, a1, b, b1] : No such device or address

Where is the problem?
 
use /dev/hda instead of /dev/sda

you have IDE disks instead of SCSI or SATA disks
 
The test box has IDE drives.

The production box I need to rebuild has SATA drives (currently mounted on LSI 150-2).

--

Also, correcting typos in commands:

#mdadm --create --verbose /dev/md0 --level=1 --raid-device=2 /dev/hda /dev/hdb

mdadm: size set to 117220736k
mdadm: ADD_NEW_DISK for /dev/hda failed: Device or resource busy

#mdadm -E /dev/hda
mdadm: No super block found on /dev/hda (Expected Magic a92b4fc got ffffff)

#mdadm -E /dev/hdb
mdadm: No super block found on /dev/hdb (Expected Magic a92b4fc got ffffff)

HOWEVER:
#mdadm --scan --detail
gives:
ARRAY /dev/md0 level=raid1 num-devices=2

Plowing right ahead --
#mkraid /dev/md0
handling MD device /dev/md0
analyzing super-block
couldn't call stat() on device dev/hdb1 -- No such file or directory
mkraid: aborted.

What is the next step? How are super blocks created?
 
Thanks for the suggestion but I did do the google thing first, found dozens of links to the same few HOWTO pages, most of which were "file not found" and the rest left out huge chunks of details, the commands did not work or they were related to RH 7.2. The RedHat search produced nothing I could begin to understand and mostly related to development issues.

I have also printed out the full man mdadm section. Again, I keep running into roadblocks. How do I create blocks?

Background: My installation of Plesk totally crashed in February due to a conflict between a RHEL3 kernel update and the LSI RAID controller card. I have transferred all the sites to a backup server and I need to rebuild the primary server without the LSI card and move everything back over, but I keep getting sent in around in circles with missing information, conflicting documentaion, and so on. All I want to do is get the RAID installed and get on with my life. If I can solve the super block question I should be very close to getting there.
 
Can you reinstall RHEL? The installer lets you setup the drive partitions as Software Raid.. Just make the same partitions on each drive and then pair them up as software raid and label them whatever partition you need.

Trying to do it post install causes too many problems unless your trying to rebuild a blank drive to match an existing "live" drive. RedHat has documentation of all this in their Admin Handbooks posted on their site.
 
Yes, this is a test box and the second drive is essentially empty. Do you have a link to the RedHat reference? I was unsuccessful using their search function -- all I got was a discussion between developers.

What [[exactly]] needs to be set up on the second drive on install? (see my directory list in the earlier post)

The production box I will be rebuilding will most likely be reformatted for RHEL4 for use around July 1.
 
Thanks for the tips.

I now have a working test box running MDADM RAID1 with RHEL4.
 
Back
Top