1. Add 5 SATA virtual hard disks in the virtual machine, each 20G, three data disk, a check disk, a spare disk. Restart the virtual machine when you are finished adding it.
2. View system disk Information
sudo fdisk-l
3. Create a partition for the added virtual hard disk
sudo fdisk/dev/sd[d-f]
Follow the instructions, N: Create a new partition, p: Create primary partition, p: View partition settings, W: Save Changes (others are configured by default)
4. Create a soft RAID5
sudo mdadm--create--auto=yes/dev/md0--level=5--raid-devices=4--spare-devices=1/dev/sdb1/dev/sdc1/dev/sdd1/dev/s De1
--level=5: Create RAID5
--raid-devices=4: Four plates, 3+1
--spare-device=1: Spare Disk One
5. View the created RAID5 information
Mdadm--detail/dev/md0
6. Assigning a file system to RAID5
Mkfs.ext3/dev/md0
7. Mounting
sudo mount/dev/md0/mnt/raid5
8. Restart Auto-load
vim /etc/fstab
Add to
/mnt/raid5/dev/md0 ext3 defaults 0 0
9. Save RAID5 Configuration
mdadm --detail --scan --verbose >> /etc/mdadm.conf
The reboot will appear when it is mounted automatically: Host SMBus Controller not enabled! Filesystem Check or Mount failed!
Workaround: http://xlogin.blog.51cto.com/3473583/823056
After reboot:
View RAID5:
1 [email protected]:~$ df-ht2Filesystem Type Size used Avail use%mounted on3/DEV/SDA1 Ext4 46G4.8G 39G A% /4None Tmpfs4.0K0 4.0K0%/sys/fs/Cgroup5Udev DEVTMPFS2.0G4.0K2.0G1% /Dev6Tmpfs Tmpfs 394M1.4M393M1% /Run7None Tmpfs5.0M 0 5.0M 0%/run/Lock8None Tmpfs2.0G 156K2.0G1%/run/SHM9None Tmpfs 100M 60K 100M1%/run/UserTen /dev/md127 ext3 59G 52M 56G 1/media/meow/0c2bf3fe-e17b-436f-8670-ee636773 8a37 One [email protected]:~$ sudo mdadm--detail/dev/md127 A/dev/md127: -Version:1.2 -Creation time:wed Mar in Geneva: -: - . the Raid LEVEL:RAID5 -Array Size:62860800(59.95GiB64.37GB) -Used Dev Size:20953600(19.98GiB21.46GB) -Raid Devices:4 +Total Devices:5 -Persistence:superblock isPersistent + AUpdate time:wed Mar in +: +:Geneva . at State:clean -Active Devices:4 -Working Devices:5 -Failed Devices:0 -Spare Devices:1 - inlayout:left-symmetric - Chunk size:512k to +Name:ubuntu:0(Local to host Ubuntu) - UUID:DA08FAC9:2B1D0988:B2B19AF5:45166BA4 theEvents: - * $ Number Major Minor raiddevice StatePanax Notoginseng 0 8 - 0Active sync/dev/SDB1 - 1 8 - 1Active sync/dev/SDC1 the 2 8 the 2Active sync/dev/SDD1 + 5 8 $ 3Active sync/dev/Sde1 A the 4 8 Bayi-SPARE/DEV/SDF1
Well? Md127?
Ubuntu Create soft RAID5