LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-06-2009, 10:18 AM   #1
ryanvoon
LQ Newbie
 
Registered: May 2008
Posts: 2

Rep: Reputation: 0
Implement software RAID at running live Linux sever


Dear members,

May I know how to implement software RAID at running live Linux sever.

I saw other site on implementing Software RAID at installation stage, but how about a running Linux ( RHEL v5).

I tried to bring down to level 1 , and do mdadm --create /dev/md0 .

But it failed. I am not able to create md0, 1 , 2 ,3 etc

The type of sda 1,2,3,4 sdb 1,2,3,4 was already fd when i did fdisk ( Option : T )

Thanks alot.
Ryan
 
Old 01-07-2009, 02:58 AM   #2
eco
Member
 
Registered: May 2006
Location: BE
Distribution: Debian/Gentoo
Posts: 412

Rep: Reputation: 48
Hi,

You need to setup the environment for RAID before you start building the RAID...

Here are extracts of a few notes I wrote:

// load module(s)
# modprobe raid1
# lsmod | grep raid
raid1 16000 0
md 44744 1 raid1


// partition the 'second' disk to be the same as the 'first' (original). You can do that automatically with sfdisk or manually with fdisk.

// install mdadm
# apt-get install mdadm


// I had 9 partitions so I did:
# mkdir /dev/md
# for i in 1 2 3 5 6 7 8 9; do mknod /dev/md/$i b 9 $i; ln -s /dev/md/$i /dev/md$i; done


// Now you need to create a degraded RAID. BACKUP YOUR DATA AND CHECK IT BEFORE DOING THIS
# for i in 1 2 3 5 6 7 8 9; do mdadm --create /dev/md$i --level=1 --raid-devices=2 missing /dev/sdb$i; done
mdadm: array /dev/md1 started.
mdadm: array /dev/md2 started.
mdadm: array /dev/md3 started.
mdadm: array /dev/md5 started.
mdadm: array /dev/md6 started.
mdadm: array /dev/md7 started.
mdadm: array /dev/md8 started.
mdadm: array /dev/md9 started.


// check the status of the RAID creation
# watch cat /proc/mdstat


// for more detail
# mdadm --detail /dev/md1
/dev/md1:
Version : 00.90.01
Creation Time : Wed Jan 24 10:51:39 2007
Raid Level : raid1
Array Size : 104320 (101.88 MiB 106.82 MB)
Device Size : 104320 (101.88 MiB 106.82 MB)
Raid Devices : 2
Total Devices : 1
Preferred Minor : 1
Persistence : Superblock is persistent

Update Time : Wed Jan 24 10:51:39 2007
State : clean, degraded
Active Devices : 1
Working Devices : 1
Failed Devices : 0
Spare Devices : 0

UUID : 3165639b:c92abf3c:72f0f2b7:767fc1fd
Events : 0.1

Number Major Minor RaidDevice State
0 0 0 - removed
1 8 17 1 active sync /dev/.static/dev/sdb1


//Generate configuration file
mdadm --detail --scan >> /etc/mdadm.conf


//Now change your fstab to point to /dev/mdx rather than sdx, grub, ...
//When all of this is done, boot. If it boots, rebuild the RAID (look on how to do this in the manual of mdadm

# mdadm /dev/md0 -a /dev/<missingdisk>

Best of luck
 
Old 01-07-2009, 09:31 AM   #3
ryanvoon
LQ Newbie
 
Registered: May 2008
Posts: 2

Original Poster
Rep: Reputation: 0
THanks alot for the info

HI,

THanks for the info. I will try out in dev servers.

Happy New Year
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Software Raid with LVM and Live System Partitions centos82 Linux - Software 4 11-13-2008 10:59 AM
How to build software RAID-1 running Tristix Sushy Linux - Software 1 06-14-2006 03:53 PM
implement software RAID at run-time sti2envy Fedora 2 09-20-2004 12:31 PM
implement software RAID at run-time sti2envy Linux - Newbie 1 09-19-2004 08:48 PM
Running a sever w/o an IP address... Thaidog Linux - Newbie 8 09-24-2002 08:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration