|
Home > Archive > Red Hat Topics > January 2005 > Redhat Linux Software raid
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Redhat Linux Software raid
|
|
| Gambito 2005-01-05, 2:45 am |
|
Good day,
I tried configuring sofware raid 1 with steps as below.
However, once I reboot the machine, the raid drive will not be there.
Practically, one will need to perform "raidstart" and "mount" to remount the
drive.
Im wondering how could I actually have the raidstart service start
automatically when ever I boot into init level 3 ? How could I have the
mount drive automatically mounted to "/raidTest" as soon as the server is
rebooted ?
Do I have to consider the "unmount" process and "raidstop" process when ever
I intend to shutdown the server which having a software drive ?
Thanks a million,
William
[root@Redhat9 /]# more /proc/mdstat
Personalities :
read_ahead not set
unused devices: <none>
[root@Redhat9 /]# more /etc/raidtab
raiddev /dev/md0
raid-level 1
nr-raid-disks 2
chunk-size 64k
persistent-superblock 1
nr-spare-disks 0
device /dev/hdb1
raid-disk 0
device /dev/hdc1
raid-disk 1
[root@Redhat9 /]# mkraid /dev/md0
[root@Redhat9 /]# mke2fs /dev/md0
mke2fs 1.32 (09-Nov-2002)
[root@Redhat9 /]# raidstart /dev/md0
[root@Redhat9 /]# more /proc/mdstat
Personalities : [raid1]
read_ahead 1024 sectors
md0 : active raid1 hdc1[1] hdb1[0]
80035712 blocks [2/2] [UU]
[>....................] resync = 0.0% (37120/80035712)
finish=107.5min speed=12373K/sec
unused devices: <none>
[root@Redhat9 /]# mount /dev/md0 /raidTest/
[root@Redhat9 /]# ls /raidTest/
etc lost+found usr
[root@Redhat9 /]# more /proc/mdstat
Personalities : [raid1]
read_ahead 1024 sectors
md0 : active raid1 hdc1[1] hdb1[0]
80035712 blocks [2/2] [UU]
[=>...................] resync = 6.9% (5529904/80035712)
finish=120.2min speed=10326K/sec
unused devices: <none>
[root@Redhat9 /]# umount /dev/md0
[root@Redhat9 /]# ls /raidTest/
[root@Redhat9 /]# raids
raidsetfaulty raidstart raidstop
[root@Redhat9 /]# raidstop /dev/md0
[root@Redhat9 /]# more /proc/mdstat
Personalities : [raid1]
read_ahead 1024 sectors
unused devices: <none>
[root@Redhat9 /]#
| |
| mercutio 2005-01-07, 2:45 am |
| On Wed, 05 Jan 2005 15:40:44 +0800, Gambito wrote:
> Good day,
>
> I tried configuring sofware raid 1 with steps as below.
>
> However, once I reboot the machine, the raid drive will not be there.
> Practically, one will need to perform "raidstart" and "mount" to remount
> the drive.
>
> Im wondering how could I actually have the raidstart service start
> automatically when ever I boot into init level 3 ? How could I have the
> mount drive automatically mounted to "/raidTest" as soon as the server
> is rebooted ?
>
> Do I have to consider the "unmount" process and "raidstop" process when
> ever I intend to shutdown the server which having a software drive ?
I recently installed a Raid1 array on my Fedora Core 2 machine. The RH9
setup should be very similar. The short synopsis is as follows for a
system already running off a single drive.
1. Install 2nd drive and partition the same as the first drive.
2. On 2nd drive, change partition types to "fd" (Linux Raid Auto).
3. Run "lsmod" to determine that the raid1 module is loaded. If not,
run "modprobe raid1" to start; assumes mdadm installed.)
4. Set up md devices; md0 replaces hda1/hdc1, etc. Start with the first
hard "missing."
"mdadm --create /dev/md0 --level=1 --raid-devices=2 missing /dev/hdc2"
Repeat for the other partitions you need.
5. Make desired file system for each of the md drives.
6. Make directories on md partitions and copy data over from first drive.
7. Bring fstab up to date with /dev/mdX instead of /dev/hdX. This needs
to be done before a new initrd.img is made.
8. Edit modules.conf (or modprobe.conf) to include the line:
"alias md-personality-3 raid1"
9. Copy the new fstab and modules.conf files to the /etc directory on mdX
10. Make a new boot image file with mkinitrd.
11. Edit the grub.conf file to give a Raid boot option and make sure the
revised file is copied to mdX.
12. Umount the md drives and reboot.
13. At boot grub screen, click "c" for command and run setup on the new
drive (e.g., setup (hd1)
14. Go back to grub and select the raid boot option. If everything is
correct it should boot to the raid (md) drive.
15. With the system running off the new raid drive, add the original drive
to the raid array and sync them.
"mdadm /dev/md0 -a /dev/hda1" for example.
Repeat for all partitions. You should get a confirmation that the new
drive has been "hot added."
16. Run the command "cat /proc/mdstat" to check status of the raid. It
will also show how sync is progressing.
17. You can also test with the mdadm "set faulty" command.
Good luck! The proper initrd.img in grub is the key to starting with raid.
----== Posted via webservertalk.com - Unlimited-Uncensored-Secure Usenet News==----
http://www.webservertalk.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
|
|
|
|
|