| YaK:: Learning about Linux Software Raid (md, mdadm | [Changes] [Calendar] [Search] [Index] [PhotoTags] |
cat
http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch26_:_Linux_Software_RAID
http://www.planamente.ch/emidio/pages/linux_howto_root_lvm_raid_etch.php#5.1
mdadm -E /dev/hda1
root@pling:~# cat /etc/mdadm/mdadm.conf
# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#
# by default, scan all partitions (/proc/partitions) for MD superblocks.
# alternatively, specify devices to scan, using wildcards if desired.
DEVICE partitions
# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes
# automatically tag new arrays as belonging to the local system
HOMEHOST <system>
# instruct the monitoring daemon where to send mail alerts
MAILADDR root
# definitions of existing MD arrays
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=16a6ddf5:8afcf689:28c79ea4:d49b1739
# This file was auto-generated on Fri, 14 Mar 2008 15:25:28 -0700
# by mkconf $Id: mkconf 324 2007-05-05 18:49:44Z madduck $
root@pling:~#
root@pling:~#
root@pling:~# mdadm -E /dev/hda1
/dev/hda1:
Magic : a92b4efc
Version : 00.90.00
UUID : 16a6ddf5:8afcf689:28c79ea4:d49b1739
Creation Time : Tue Jul 4 16:48:19 2006
Raid Level : raid1
Used Dev Size : 192643328 (183.72 GiB 197.27 GB)
Array Size : 192643328 (183.72 GiB 197.27 GB)
Raid Devices : 2
Total Devices : 3
Preferred Minor : 0
Update Time : Thu Mar 13 10:07:39 2008
State : active
Active Devices : 2
Working Devices : 2
Failed Devices : 1
Spare Devices : 0
Checksum : e031b94b - correct
Events : 0.42
Number Major Minor RaidDevice State
this 0 3 1 0 active sync /dev/hda1
0 0 3 1 0 active sync /dev/hda1
1 1 3 65 1 active sync /dev/hdb1
root@pling:~# mdadm -E /dev/hdb1
/dev/hdb1:
Magic : a92b4efc
Version : 00.90.00
UUID : 16a6ddf5:8afcf689:28c79ea4:d49b1739
Creation Time : Tue Jul 4 16:48:19 2006
Raid Level : raid1
Used Dev Size : 192643328 (183.72 GiB 197.27 GB)
Array Size : 192643328 (183.72 GiB 197.27 GB)
Raid Devices : 2
Total Devices : 3
Preferred Minor : 0
Update Time : Thu Mar 13 10:07:39 2008
State : active
Active Devices : 2
Working Devices : 2
Failed Devices : 1
Spare Devices : 0
Checksum : e031b98d - correct
Events : 0.42
Number Major Minor RaidDevice State
this 1 3 65 1 active sync /dev/hdb1
0 0 3 1 0 active sync /dev/hda1
1 1 3 65 1 active sync /dev/hdb1
root@pling:~# lsmod | grep md
md_mod 82324 1
amd74xx 15260 0 [permanent]
ide_core 116804 2 ide_disk,amd74xx
root@pling:~#
root@pling:~#
Just installing mdadm created the conf file.
The following make it work:
root@pling:~# modprobe md raid1 || modprobe md
root@pling:~# mdadm --assemble --scan
mdadm: /dev/md0 has been started with 2 drives.
root@pling:~# mkdir /brat root@pling:~# mount -r /dev/md0 /brat root@pling:~# df /brat Filesystem 1K-blocks Used Available Use% Mounted on /dev/md0 189620228 36042828 143945236 21% /brat root@pling:~# ls /brat
| (last modified 2008-03-17) [Login] |