650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M01/82/F5/wKiom1dnYQKiTa0zAAAzSXVkFoU070.png-wh_500x0-wm_3 -wmp_4-s_3281562824.png "title=" 1.png "alt=" Wkiom1dnyqkita0zaaazsxvkfou070.png-wh_50 "/>
For example, add three disks
Now, let's start RAID0.
Tool Mdadm
Command Common parameters
-C or--creat |
Create a new array |
-R |
Removing a device |
-A |
Activating a disk array |
-L or--level= |
Set the level of the disk array |
-D or--detail |
Print Array Device details |
-N or--raid-devices= |
Specify the number of array members (partitions/disks) |
-S or--scan |
Scan configuration file or/proc/mdstat to get array missing information |
-X or--spare-devicds= |
Specify the number of spare disks in the array |
-F |
Set the device status as a fault |
-C or--chunk= |
Sets the block chunk size of the array, in kilobytes |
-A or--add |
Add device to Array |
-G or--grow |
Change the size or shape of an array |
-V |
--verbose Show Details |
|
|
Well-divided area
[Email protected] ~]# mdadm-c/dev/md11-l 0-n 3/dev/sdb1/dev/sdc1/dev/sdd1mdadm:defaulting to version 1.2 metadata Mdadm:array/dev/md11 started. [Email protected] ~]# mdadm-dsarray/dev/md11 metadata=1.2 name=duwen113.cn:11 uuid=6689430a:4d3a76e2:9a832442: Bf61bdfa[[email protected] ~]#
Effects such as
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/82/F4/wKioL1dnYkXDyXbrAACHlSftiwI345.png-wh_500x0-wm_3 -wmp_4-s_49142090.png "title=" 2.png "alt=" Wkiol1dnykxdyxbraachlsftiwi345.png-wh_50 "/>
Build configuration file
[Email protected] ~]# Fdisk/dev/md11
[Email protected] ~]# Ls/dev/md*/dev/md11/dev/md11p1[[email protected] ~]#
Start encryption
[[email protected] ~]# ls /dev/md*/dev/md11 /dev/md11p1[[email protected] ~]# cryptsetup luksFormat /dev/md11p1WARNING!========This will overwrite data on /dev/md11p1 irrevocably. are you sure? (Type uppercase yes): yes enter passphrase: // Enter the password here 51cto.comverify passphrase: //Enter the password here 51cto.com[[email protected] ~]# cryptsetup luksopen /dev/md11p1 ys_diskenter passphrase for /dev/md11p1:[[email protected] ~]# mkdir /ys_disk[[email protected] ~]# mkfs.xfs /dev/mapper/ys_diskmeta-data=/dev /mapper/ys_disk isize=256 agcount=16, agsize=191872 blks = sectsz=4096 attr=2, projid32bit=1 = crc=0 finobt=0data = bsize=4096 blocks=3069952, imaxpct=25 = sunit=128 swidth=384 blksnaming =version 2 Bsize=4096 ascii-ci=0 ftype=0log =internal log bsize=4096 blocks=2560, version=2 = sectsz=4096 sunit=1 blks, lazy-count=1realtime =none extsz=4096 blocks=0, rtextents=0[[email protected] ~]# mount /dev/mapper/ys_disk /ys_disk/[[email protected] ~]# touch /root/cryptpasswd[[email protected] ~]# cryptsetup luksaddkey /dev/md11p1 /root/cryptpasswdEnter any passphrase: //Enter the password here 51cto.com[[email protected] ~]# cat /root/cryptpasswd[[email protected] ~]# vim /etc/crypttab[[email protected] ~]#[[email protected] ~]# vim /etc/fstab[[email protected] ~]# tail -1 $!tail: cannot open ' 1823 ' for reading: no such file or directory[[email protected] ~]# tail -1 /etc/fstab/dev/mapper /ys_disk /ys_disk xfs defaults 0 0[[email protected] ~]#
Test if encryption is successful
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M00/82/F5/wKioL1dnaFDS-3VTAAIzY206EN8779.png-wh_500x0-wm_3 -wmp_4-s_2291160660.png "title=" 3.png "alt=" Wkiol1dnafds-3vtaaizy206en8779.png-wh_50 "/>
See that red box, it is necessary to enter the password to go in//red box here Enter the password 51cto.com
The end
This article is from the "duwers" blog, make sure to keep this source http://duwers.blog.51cto.com/7376225/1790967
raid0+ Disk Encryption