Jump to content

Creating SATA RAID0 with mdadm in Mandriva 2005LE


zenarcher
 Share

Recommended Posts

I am very new to Linux, but making progress. My problem now, is that I'm trying to set up a SATA RAID0 array, using two 80G SATA hard drives. I am trying to set up a software RAID0 using mdadm in Mandriva 2005LE.

 

I had someone helping me in another forum and attained limited success, but did not succeed. I did manage to create the RAID0 array, but when I attempted to MV to finish, I ran into trouble. When I attempted the MV, I received an error No Such File or Directory Found. Upon Rebooting, I merely got a login screen and could go no further.

 

Here are the steps I followed in the process:

 

1) I partitioned the drives, prior to a clean install. The drives were partitioned as follows:

Disk 1

01 1.5GB primary /dev/sda1 Swap swap

02 9.0GB primary /dev/sda5 Ext3 /

03 63.0GB primary /dev/sda6 none

 

Disk 2

01 1.5GB primary /dev/sdb1 Swap mount point none(told to leave as none for now)

02 9.0GB primary /dve/sdb5 Ext3 mount point none(told to leave as none for now)

03 63.0GBprimary /dev/sdb6 Ext3 mount point none(told to leave as none for now)

NOTE: I was told I would not use /dev/sdb5 for a RAID volume. It would be backup-storage for the upcoming procedures.

 

Following partitioning, I installed Mandriva onto the 9GB partition on Disk 1. The MBR was installed to /dev/sda

 

At this point, everything was working fine, but I had not created the RAID volume as of yet.

 

Using mdadm, I created one RAID volume as such:

#mdadm --create --verbose /dev/md0 --level=0 --raid-devices=2 /dev/sda6 /dev/sdb6

 

After doing this, I got the message: mdadm: chunk size defaults to 64K

mdadm: array /dev/md0 started etc/mdadm.conf

mdadm.conf was in the folder /etc

 

In mdadm.conf I added the following:

DEVICE /dev/sda6 /deev/sdb6

 

I then opened a console and gave the command: # mdadm --detail --scan

 

I copies the line beginning with ARRAY and added it as the second line in the text-file. I saved it in /etc/mdadm/mdadm.conf

 

In the terminal, I then typed the command: # mdadm -As /dev/md0

I got the message: Device /dev/md0 already active -cannot assemble it

 

In /etc/stab I added the following entry:

/dev/md0 /raid ext3 defaults 0 0

I was told this entry would be for the backup partition which will be used later.

 

I then opened a terminal and typed:

mkdir /raid /save

 

I then attempted to mount the backup-partition and RAID array with the commands: mount/dev/sdb5 and mount/dev/md0

 

I got an error: Wrong FS type, bad option, bad superblock on /dev/sdb5, 0r too many mounted file systems. I thenm ran mkfs.ext3 /dev/md0 and mkfs.ext3 /dev/sdb5 after when everything seemed to work.

 

I then tested the RAID device, entering # cp -R /usr /raid

 

After doing this....I found I was in trouble! I could no longer open a terminal and after rebooting, I could only get a logon request and could not logon.

 

Is there anyone out there who could help walk a really dumb newbie through setting up a SATA RAID0 array, using mdadm, as I am attempting to do? I'm really getting tired of re-installing the whole system, when I make a mistake in this...and not making much progress. I really could use some help. I've read and read everything I can and either I'm not understanding it, or I'm not finding the right info. Maybe my senior citizen brain isn't comprehending everything I'm reading, but help would be greatly appreciated!!!

 

Regards,

zenarcher

 

[moved from Software by spinynorman]

 

Well, having posted to every forum I could find, I've been unable to locate anyone who seems to have any understanding of mdadm and the process to set up the SATA RAID0 array. Out of complete desperation, I emailed Neil Brown, who maintains mdadm. Explaining that I'm very new to Linux and completely lost, even after reading about using mdadm, I asked for help from him. I really didn't know if I'd receive a response, or not. Within minutes, Neil responded to my email...and after four or five emails, figuring out exactly what I was trying to do, Neil has walked me through the entire process! What a guy!! If anyone is interested in the SATA RAID0, here is exactly what Neil explained to do:

 

PARTITION DRIVES (SUGGESTED)

 

DRIVE 1

 

Partition Size Name Type Name

01 10G / Ext3 sda1

02 1G Swap Swap sda5

03 69G /home Ext3 sda6

 

DRIVE 2

 

Partition Size Name Type Name

01 1G Swap Swap sdb1

02 79G /home2 Ext3 sdb5

 

 

mdadm -C /dev/md0 -l 0 -n 2 /dev/sda6 /dev/sdb5

mkfs -j /dev/md0

mv /home /home.tmp

mkdir /home

chmod 755 /home

mount /dev/md0 /home

# if there is anything worth keeping in /home.tmp then

cp -a /home.tmp/. /home

rm -r /home.tmp

 

echo "/dev/md0 /home ext3 defaults 0 2" >> /etc/fstab

# edit /etc/fstab and make sure it looks "right"

mdadm -Db /dev/md0 | sed '/devices=/d' >> /etc/mdadm.conf

# edit /etc/mdadm.conf and make sure it looks "right"

 

 

NOTES:

 

You would need to be sure that "mdadm -As" or similar is run by the rc scripts. I don't know exactly how Mandrake decides whether to do that or not. Hunt around in /etc/init.d to see.

IF you aren't confident in judging if fstab and mdadm.conf are

"right", feel free to email them to me and I will look.

Edited by zenarcher
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...