initiators | vi /etc/udev/rules.d/001_raid.rules
Code :
- # Nommage fixe des disques pour le RAID
- BUS="scsi", ID="0:0:0:0", KERNEL="sd?", NAME="disk1"
- BUS="scsi", ID="0:0:1:0", KERNEL="sd?", NAME="disk2"
- BUS="scsi", ID="1:0:0:0", KERNEL="sd?", NAME="disk3"
- BUS="scsi", ID="1:0:1:0", KERNEL="sd?", NAME="disk4"
- # Nommage fixe des partitions pour le RAID
- BUS="scsi", ID="0:0:0:0", KERNEL="sd[a-z][1-9]", NAME="disk1part%n"
- BUS="scsi", ID="0:0:1:0", KERNEL="sd[a-z][1-9]", NAME="disk2part%n"
- BUS="scsi", ID="1:0:0:0", KERNEL="sd[a-z][1-9]", NAME="disk3part%n"
- BUS="scsi", ID="1:0:1:0", KERNEL="sd[a-z][1-9]", NAME="disk4part%n"
|
ls /dev/sd*
Code :
- ls: /dev/sd*: Aucun fichier ou répertoire de ce type
|
ls /dev/disk*
Code :
- /dev/disk1 /dev/disk2 /dev/disk3 /dev/disk4
- /dev/disk1part1 /dev/disk2part1 /dev/disk3part1 /dev/disk4part1
- /dev/disk1part2 /dev/disk2part2 /dev/disk3part2 /dev/disk4part2
- /dev/disk1part3 /dev/disk2part3 /dev/disk3part3 /dev/disk4part3
|
vi /etc/fstab
Code :
- # /etc/fstab: static file system information.
- #
- # <file system> <mount point> <type> <options> <dump> <pass>
- proc /proc proc defaults 0 0
- /dev/md1 / ext3 defaults,errors=remount-ro 0 1
- /dev/md0 /boot ext3 defaults 0 2
- /dev/disk1part1 none swap sw 0 0
- /dev/disk2part1 none swap sw 0 0
- /dev/disk3part1 none swap sw 0 0
- /dev/disk4part1 none swap sw 0 0
- /dev/hda /media/cdrom0 iso9660 ro,user,noauto 0 0
- /dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
|
vi /etc/mdadm/mdadm.conf
Code :
- DEVICE /dev/disk?part?
- ARRAY /dev/md1 level=raid5 num-devices=4 UUID=1b32d770:14ab0a2c:af208525:cf494d6d
- devices=/dev/disk1part3,/dev/disk2part3,/dev/disk3part3,/dev/disk4part3
- ARRAY /dev/md0 level=raid1 num-devices=4 UUID=306eaffc:e1da87d6:95aa4777:7ee4e4dc
- devices=/dev/disk1part2,/dev/disk2part2,/dev/disk3part2,/dev/disk4part2
|
cat /proc/mdstat
Code :
- Personalities : [raid0] [raid1] [raid5]
- md0 : active raid1 sda2[0] sdd2[3] sdc2[2] sdb2[1]
- 979840 blocks [4/4] [UUUU]
- md1 : active raid5 sda3[0] sdd3[3] sdc3[2] sdb3[1]
- 723792192 blocks level 5, 64k chunk, algorithm 2 [4/4] [UUUU]
- unused devices: <none>
|
mdadm --detail /dev/md1
Code :
- /dev/md1:
- Version : 00.90.01
- Creation Time : Fri Sep 9 11:56:07 2005
- Raid Level : raid5
- Array Size : 723792192 (690.26 GiB 741.16 GB)
- Device Size : 241264064 (230.09 GiB 247.05 GB)
- Raid Devices : 4
- Total Devices : 4
- Preferred Minor : 1
- Persistence : Superblock is persistent
- Update Time : Thu Sep 29 10:35:19 2005
- State : clean
- Active Devices : 4
- Working Devices : 4
- Failed Devices : 0
- Spare Devices : 0
- Layout : left-symmetric
- Chunk Size : 64K
- UUID : 1b32d770:14ab0a2c:af208525:cf494d6d
- Events : 0.961797
- Number Major Minor RaidDevice State
- 0 8 3 0 active sync /dev/.static/dev/sda3
- 1 8 19 1 active sync /dev/.static/dev/sdb3
- 2 8 35 2 active sync /dev/.static/dev/sdc3
- 3 8 51 3 active sync /dev/.static/dev/sdd3
|
|