Configure Linux Soft RAID0
[Email protected] ~]# mdadm-c-v/dev/md0-l 0-n 2/DEV/SDB/DEV/SDC
[Email protected] ~]# mdadm-c-v/dev/md0-l 0-n 2/DEV/SDB/DEV/SDC
Mdadm:chunk size defaults to 512K
Mdadm:/dev/sdb appears to BES part of a RAID array:
LEVEL=RAID0 devices=0 ctime=thu Jan 1 08:00:00 1970
Mdadm:partition table exists On/dev/sdb but would be lost or
Meaningless after creating array
Continue creating array? Y
Mdadm:defaulting to version 1.2 metadata
Mdadm:array/dev/md0 started.
[Email protected] ~]#
[Email protected] ~]# Mdadm-ds
Array/dev/md0 metadata=1.2 name=rhel7.2:0 uuid=cf8fac13:5d74d4da:d142582c:567b346b
[Email protected] ~]# mdadm-ds >/etc/mdadm.conf
[Email protected] ~]#
[Email protected] ~]# mdadm-d/dev/md0
/DEV/MD0:
version:1.2
Creation time:wed 17 21:19:31 2016
Raid LEVEL:RAID0
Array size:10484736 (10.00 GiB 10.74 GB)
Raid Devices:2
Total Devices:2
Persistence:superblock is persistent
Update time:wed 17 21:19:31 2016
State:clean
Active Devices:2
Working devices:2
Failed devices:0
Spare devices:0
Chunk size:512k
name:rhel7.2:0 (Local to host RHEL7.2)
uuid:cf8fac13:5d74d4da:d142582c:567b346b
events:0
Number Major Minor Raiddevice state
0 8 0 Active Sync/dev/sdb
1 8 1 Active SYNC/DEV/SDC
[Email protected] ~]#
[Email protected] ~]# mkfs-t xfs-f/dev/md0
Log stripe unit (524288 bytes) is too large (maximum is 256KiB)
Log stripe unit adjusted to 32KiB
Meta-data=/dev/md0 isize=256 agcount=16, agsize=163712 blks
= sectsz=512 attr=2, projid32bit=1
= Crc=0
data = bsize=4096 blocks=2619392, imaxpct=25
= sunit=128 swidth=256 blks
Naming =version 2 bsize=4096 ascii-ci=0 ftype=0
Log =internal log bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=8 Blks, lazy-count=1
Realtime =none extsz=4096 blocks=0, rtextents=0
[Email protected] ~]# MOUNT/DEV/MP0/RAID0
[Email protected] ~]# Vim/etc/fstab
/DEV/MD0/RAID0 Defaults 0 0
[Email protected] ~]# df-h
Filesystem Size used Avail use% mounted on
/dev/mapper/rhel-root 9.8G 3.3G 6.5G 34%/
Devtmpfs 908M 0 908M 0%/dev
Tmpfs 914M 80K 914M 1%/DEV/SHM
Tmpfs 914M 8.9M 905M 1%/run
Tmpfs 914M 0 914M 0%/sys/fs/cgroup
/DEV/SDA1 197M 91M 106M 47%/boot
/dev/md0 10G 33M 10G 1%/raid0
View directory capacity
[Email protected] ~]# DU-SH/RAID0
0/raid0
[Email protected] ~]# mdadm-r/DEV/MD0/DEV/SDC
Mdadm:hot Remove failed For/dev/sdc:device or resource busy
[Email protected] ~]#
[Email protected] ~]# Cat/proc/mdstat
Personalities: [RAID0]
Md0:active RAID0 sdc[1] sdb[0]
10484736 Blocks Super 1.2 512k chunks
Unused devices: <none>
[[email protected] raid0]# blkid[[email protected] raid0]# blkid[[email protected] raid0]# Blkid
/dev/md0:uuid= "20fefde8-3544-436a-9d48-28ce3863539e" type= "XFS"
This article is from the "Technical Achievement Dream" blog, please be sure to keep this source http://andyliu.blog.51cto.com/518879/1839711
Configure Linux Soft RAID0