Welcome to the TechSpot OpenBoards. Please read the FAQ if you have any questions. Sign up or Login to participate.
|
|||||||
Download Now:
mdadm (software RAID in Linux)
|
|
Thread Tools | Search this Thread |
|
#1
|
||||
|
||||
|
mdadm (software RAID in Linux)
Hi guys!
Trying to get a software RAID-1 array to work the way I want it to... I'm using the program mdadm to create my array I use this program because it's under development and supports a feature to send a mail when something goes wrong in the array... I used this command to create the array: Quote:
When it's done the array is started... But if I shut down my server and then start it again the array will not automatically start... So I need to manually give it this command: Quote:
I could of course just add it to the same file I use to start apache and everything else but I'm not sure that is the right thing to do... I.e. what runlevel would be the right one to initiate it on? Keep in mind that I'm a total newbie to Linux, this is being done on a Red Hat 9 test server but when successfull will also be implemented on the Techspot server running RH7.3... I guess what I'm really looking for is a guide on this(a book perhaps?) i.e. you should do it like this and that because of that and that...
__________________
"The one who says it cannot be done should never interrupt the one who is doing it."
|
|
#2
|
||||
|
||||
|
I would add the line "mdadm -A /dev/md0 /dev/sda /dev/sdb" to a file called raidinit. Place the file in the /bin directory & mark it as "exectutable".
Then it's only a matter of doing a symbolic link of the file to the different directories in /etc/rc.d/ that correspond to runlevel 1 to 5. To do so, type the command "ln -s /bin/raidinit /etc/rc.d/rc1.d/raidinit" to add the raidinit to the startup of the Runlevel 1. I believe you also mentionned a command to properly shutdown the RAID array ( "mdadm -A /dev/md0 /dev/sda /dev/sdb" ). Create a file called raidshutdown & copy it to the bin directory & then do a symbolic link to the /etc/rc.d/rc0.d/ & /etc/rc.d/rc6.d/ ( 0 = Shutdown, 6 = Reboot ). |
|
#3
|
||||
|
||||
|
Ok, I think I'm understanding what you are saying...
Will try it out tonight and report back I'm still intrested in a good book or site explaining all this for me though... Since I'm a newbie to Linux.... (but not RAID in general) so the book should be about Linux implementation of RAID...
__________________
"The one who says it cannot be done should never interrupt the one who is doing it."
|
|
#4
|
||||
|
||||
|
|
|
#5
|
||||
|
||||
|
Hmm, did some changes to the machine and rebooted it but now it wont come back online again...
Will have to investigate what went wrong tomorrow (the test server is at another location from me...) Though I suspect I restarted to quickly before recreating the array (was testing something) so it was prolly not done and thus all dat was lost, it's fortunate this is a test server ;-)
__________________
"The one who says it cannot be done should never interrupt the one who is doing it."
|
|
|
|
#6
|
||||
|
||||
|
Yes, I sure was correct...
I had rebooted before the new array had been created and thus the boot failed.... (How far the array creation process has come can be verified in the /proc/mdstat file...) Had to manually boot from the other harddrive and now everything is fine again... But this brings me back to the point of when to init the array... Because as I saw now a failed harddrive made the system unable to boot.... So perhaps I should not have the boot loader on the harddrive at all, or atleast have a floppy ready which the system can be manually booted from... However it feels like someone smarter than me should already have figured out a good solution to this... So I'll rephrase my question: how can I make my boot process "smart" so if booting from one drive fails the system tries the other one? Completely automatically of course
__________________
"The one who says it cannot be done should never interrupt the one who is doing it."
|
![]() |
| Similar Topics | ||||
| Topic | Replies | Forum | ||
Sata RAID 0 - hardware or software?
|
5 | Storage and Networking | ||
Adobe and Macromedia Software on Linux
|
4 | The Alternative OS | ||
mdadm: диск does not appear to be an md device
|
3 | The Alternative OS | ||
Installing software in linux
|
27 | The Alternative OS | ||
Linux Redhat 7.2 with Raid
|
3 | The Alternative OS | ||
| Thread Tools | Search this Thread |
|
|
All times are GMT -4. The time now is 12:39 PM.



Sata RAID 0 - hardware or software?