磁盘阵列
磁盘列阵:是把多个磁盘设备合并成一个磁盘空间
功能:
磁盘列阵差异表:
进行Raid 5 配置
1.
现有三磁盘sda 、sdb 、 sdc
[root@www ~]# fdisk /dev/sda
[root@www ~]# fdisk /dev/sdb
[root@www ~]# fdisk /dev/sdc
The number of cylinders for this disk is set to 13054.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
Command (m for help): n
Command action
p
Partition number (1-4): 2
First cylinder (367-13054, default 367):
Using default value 367
Last cylinder or +size or +sizeM or +sizeK (367-13054, default 13054): +3000M
Command (m for help): t
Partition number (1-4): 2
Hex code (type L to list codes): fd
Changed system type of partition 2 to fd (Linux raid autodetect)
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: 设备或资源忙.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
2.
[root@www ~]#madam -C /dev/md2 --level 1 --raid-devices 3 /dev/sda2 /dev/sdb2 /dev/sdc2
[root@www ~]#mdadm -D /dev/md2
[root@www ~]#mdadm /dev/md2 --set-faulty /dev/sdb2
[root@www ~]#mdadm /dev/md2 –remove /dev/sdb2
[root@www ~]#mdadm /dev/md2 --add /dev/sdb3
停用磁盘列阵
#mdadm --stop /dev/md2
启用磁盘列阵 raid
查看对应厂商和对应的raid类型
读取磁盘列阵设备:
启动raid
停用raid