VMwareRedHat5.4 disk array RIDA1. add four virtual hard disks to vmware. The partition size is 204m2. Use fdisk-l or df-h to view the partition. 3. Run the following command to create a disk array through mdadm: [root @ dg ~] # Mdadm -- create -- auto = yes/dev/md0 -- level = 5 \ & gt; -- raid-devices = 3 -- spa
VMware RedHat5.4 disk array RIDA
1. Add four virtual hard disks to vmware. The size is 204 MB.
2. After partitioning, use fdisk-l or df-h to view
3. Run the following command to create a disk array using mdadm:
[Root @ dg ~] # Mdadm -- create -- auto = yes/dev/md0 -- level = 5 \
> -- Raid-devices = 3 -- spare-devices = 1/dev/sd {b1, c1, d1, e1}
Note: raid-devices = 3 refers to 3 blocks as backup spare-devices = 1 refers to a idle instance, just in case.
4. Use the command to View Details [root @ dg ~] # Mdadm -- detail/dev/md0
5. Format/dev/md0 and mount it to/mnt/raid.
[Root @ dg ~] # Mkfs-t ext3/dev/md0
6. Check whether/dev/sdb1 is broken,
Command [root @ dg ~] # Mdadm -- manage/dev/md0 -- fail/dev/sdb1
[Root @ dg ~] # Mdadm -- detail/dev/md0: View information quickly
Through the above interface, we can see that/dev/sdb1 is broken./dev/sde1 is fixed immediately.
7. Delete the faulty disk and add it to the new disk.
[Root @ dg ~] # Mdadm -- manage/dev/md0 -- add/dev/sdb2 -- remove/dev/sdb1
The disk array is running normally. The difference is that we changed/dev/sdb2.
8. Boot RAID and mount it automatically
[Root @ dg ~] # Vi/etc/fstab
9. Disable software RAID uninstallation and delete the configuration file settings related to/dev/md0,
Umount/dev/raid
Directly disable mdadm -- stop/dev/md0.
Disk Array RAID is a fault-tolerant and Inexpensive Disk Array
Some technologies can be used to integrate multiple smaller disks into a larger disk device. This larger disk function is not only for storage, but also for data protection.