亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

linux磁盤管理軟RAID的實現(xiàn)原理分析和方法分享

 更新時間:2017年12月07日 08:56:55   作者:趙杰迪  
這篇文章主要介紹了linux磁盤管理中做軟RAID的實現(xiàn)原理分析和方法分享,需要的朋友跟著學習下。

1 什么是RAID

RAID全稱是獨立磁盤冗余陣列(Redundant Array of Independent Disks),基本思想是把多個磁盤組合起來,組合一個磁盤陣列組,使得性能大幅提高。

RAID分為幾個不同的等級,各個不同的等級均在數(shù)據(jù)可靠性及讀寫性能做了不同的權(quán)衡。實際工作中根據(jù)自己的業(yè)務需求選擇不同的RAID方案。

2 RAID的實現(xiàn)方式

外接式磁盤陣列:通過擴展卡提供適配能力內(nèi)接式RAID:主板集成RAID控制器安裝OS前在BIOS里配置軟件RAID:通過OS實現(xiàn)

3 標準的RAID

3.1 RAID0

RAID0稱為條帶化存儲,將數(shù)據(jù)分段存儲在各個磁盤中,讀寫均可以并行處理,因此讀寫速率為單個磁盤的N倍,沒有冗余功能,任何一個磁盤的損壞就會導致的數(shù)據(jù)不可用。

3.2 RAID1

RADI1是鏡像存儲,沒有數(shù)據(jù)校驗,數(shù)據(jù)被同等的寫入到2個或者多個磁盤中,寫入速度相對慢, 但是讀取速度比較快。

3.3 RAID 4

RADI4在RAID1的基礎上,N個盤用于數(shù)據(jù)存儲,另外加入了1個磁盤作為校驗盤。一共N+1個盤,任何一個盤壞掉也不影響數(shù)據(jù)的訪問

3.4 RAID 5

RAID5在RAID4的基礎上,由原來的一個盤來存儲校驗數(shù)據(jù),改為每個盤都有數(shù)據(jù)和校驗信息的。

4 混合RAID

4.1 RAID01

先組成RAID0,然后組成RAID1.

4.2 RAID10

先組成RAID1,然后組成RAID0

5 軟RAID的實現(xiàn)

5.1 RAID5的實現(xiàn)

創(chuàng)建由三塊硬盤組成的可用空間為2G的RAID5設備,要求其chunk大小為256k,文件系統(tǒng)為ext4,開機可自動掛載至/mydata目錄

5.1.1 先看看我們的磁盤情況

[root@centos7 Bash]$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 200G 0 disk 
├─sda1 8:1 0 1G 0 part /boot
├─sda2 8:2 0 128G 0 part 
├─sda3 8:3 0 48.8G 0 part /
├─sda4 8:4 0 512B 0 part 
└─sda5 8:5 0 19.5G 0 part /app
sdb 8:16 0 100G 0 disk 
sdc 8:32 0 20G 0 disk 
sdd 8:48 0 20G 0 disk 
sde 8:64 0 20G 0 disk 
sdf 8:80 0 20G 0 disk 
sr0 11:0 1 8.1G 0 rom /run/media/root/CentOS 7 x86_64 

這里我們使用sdb,sdc,sdd,每個盤創(chuàng)建一個主分區(qū)1G,構(gòu)建RADI5.

5.1.2 根據(jù)實際情況分區(qū)

[root@centos7 Bash]$ fdisk /dev/sdb
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x93d380cf.

Command (m for help): n
Partition type:
 p primary (0 primary, 0 extended, 4 free)
 e extended
Select (default p): p
Partition number (1-4, default 1): 
First sector (2048-209715199, default 2048): 
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-209715199, default 209715199): +1G
Partition 1 of type Linux and of size 1 GiB is set

Command (m for help): t
Selected partition 1
Hex code (type L to list all codes): fd
Changed type of partition 'Linux' to 'Linux raid autodetect'

Command (m for help): p

Disk /dev/sdb: 107.4 GB, 107374182400 bytes, 209715200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x93d380cf

 Device Boot Start  End Blocks Id System
/dev/sdb1  2048 2099199 1048576 fd Linux raid autodetect

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@centos7 Bash]$ fdisk /dev/sdc
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0xc56b90d8.

Command (m for help): n
Partition type:
 p primary (0 primary, 0 extended, 4 free)
 e extended
Select (default p): p
Partition number (1-4, default 1): 
First sector (2048-41943039, default 2048): 
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-41943039, default 41943039): +1G
Partition 1 of type Linux and of size 1 GiB is set

Command (m for help): t
Selected partition 1
Hex code (type L to list all codes): fd
Changed type of partition 'Linux' to 'Linux raid autodetect'

Command (m for help): p

Disk /dev/sdc: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0xc56b90d8

 Device Boot Start  End Blocks Id System
/dev/sdc1  2048 2099199 1048576 fd Linux raid autodetect

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@centos7 Bash]$ fdisk /dev/sdd
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x7e0900d8.

Command (m for help): n
Partition type:
 p primary (0 primary, 0 extended, 4 free)
 e extended
Select (default p): p
Partition number (1-4, default 1): 
First sector (2048-41943039, default 2048): 
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-41943039, default 41943039): +1G
Partition 1 of type Linux and of size 1 GiB is set

Command (m for help): p

Disk /dev/sdd: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x7e0900d8

 Device Boot Start  End Blocks Id System
/dev/sdd1  2048 2099199 1048576 83 Linux

Command (m for help): t
Selected partition 1
Hex code (type L to list all codes): fd
Changed type of partition 'Linux' to 'Linux raid autodetect'

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

5.1.3 創(chuàng)建raid

[root@centos7 Bash]$ mdadm -C /dev/md5 -a yes -l 5 -n 3 /dev/sd{b1,c1,d1} -c 256 # -C指定創(chuàng)建, -a yes 自動創(chuàng)建設備 , -l 設定level , -n 設定磁盤個數(shù), -c chunk大小
Continue creating array? y
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md5 started.
[root@centos7 Bash]$ mdadm -Ds        # 查看信息
ARRAY /dev/md5 metadata=1.2 name=centos7.magedu.com:5 UUID=2c8ae60d:a799fcb7:9008a046:ae6ea430
[root@centos7 Bash]$ mdadm -Ds >/etc/mdadm.conf      # 將軟raid信息寫入到配置文件中去
[root@centos7 Bash]$ mkdir /mnt/md5 # 創(chuàng)建掛載點目錄 [root@centos7 Bash]$ mkfs.ext4 /dev/md5 # 創(chuàng)建文件系統(tǒng) mke2fs 1.42.9 (28-Dec-2013) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=64 blocks, Stripe width=128 blocks 131072 inodes, 523776 blocks 26188 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=536870912 16 block groups 32768 blocks per group, 32768 fragments per group 8192 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912 Allocating group tables: done Writing inode tables: done Creating journal (8192 blocks): done Writing superblocks and filesystem accounting information: done [root@centos7 Bash]$ mount /dev/md5 /mnt/md5 # 掛載設備 [root@centos7 Bash]$ tail -n 1 /etc/mtab /dev/md5 /mnt/md5 ext4 rw,seclabel,relatime,stripe=128,data=ordered 0 0 # 查看掛載信息 [root@centos7 Bash]$ tail -n 1 /etc/mtab >>/etc/fstab #添加到fstab文件中,確保開機啟動,這里建議使用uuid

5.1.4 驗證raid

[root@centos7 md5]$ mdadm -D /dev/md5       #查看詳細raid5詳細信息,可以發(fā)現(xiàn)有3個都是working狀態(tài)的
/dev/md5:
Version : 1.2
Creation Time : Wed Dec 6 19:28:22 2017
Raid Level : raid5
Array Size : 2095104 (2046.00 MiB 2145.39 MB)
Used Dev Size : 1047552 (1023.00 MiB 1072.69 MB)
Raid Devices : 3
Total Devices : 3
Persistence : Superblock is persistent

Update Time : Wed Dec 6 19:39:06 2017
State : clean 
Active Devices : 3
Working Devices : 3
Failed Devices : 0
Spare Devices : 0

Layout : left-symmetric
Chunk Size : 256K

Consistency Policy : resync
Name : centos7.magedu.com:5 (local to host centos7.magedu.com)
UUID : 2c8ae60d:a799fcb7:9008a046:ae6ea430
Events : 18

Number Major Minor RaidDevice State
 0 8 17 0 active sync /dev/sdb1
 1 8 33 1 active sync /dev/sdc1
 3 8 49 2 active sync /dev/sdd1
[root@centos7 md5]$ man mdadm
[root@centos7 md5]$ mdadm /dev/md5 -f /dev/sdc1       # -f 設定指定設備故障, 將/dev/sdc1 這個盤標記失敗, 看是否數(shù)據(jù)能訪問,我這里使用-f標記失敗,工作中可以根據(jù)硬盤指示燈判斷磁盤狀態(tài)
mdadm: set /dev/sdc1 faulty in /dev/md5  
[root@centos7 md5]$ mdadm -D /dev/md5        #在次查看信息,發(fā)現(xiàn)工作的是2個, 一個失敗的設備 
/dev/md5:
Version : 1.2
Creation Time : Wed Dec 6 19:28:22 2017
Raid Level : raid5
Array Size : 2095104 (2046.00 MiB 2145.39 MB)
Used Dev Size : 1047552 (1023.00 MiB 1072.69 MB)
Raid Devices : 3
Total Devices : 3
Persistence : Superblock is persistent

Update Time : Wed Dec 6 19:41:08 2017
State : clean, degraded        # 這里注意了。 我們的一個盤壞掉了。 raid5狀態(tài)為降級使用了。
Active Devices : 2
Working Devices : 2
Failed Devices : 1
Spare Devices : 0

Layout : left-symmetric
Chunk Size : 256K

Consistency Policy : resync
Name : centos7.magedu.com:5 (local to host centos7.magedu.com)
UUID : 2c8ae60d:a799fcb7:9008a046:ae6ea430
Events : 20

Number Major Minor RaidDevice State
0 8 17 0 active sync /dev/sdb1
- 0 0 1 removed
3 8 49 2 active sync /dev/sdd1
1 8 33 - faulty /dev/sdc1
[root@centos7 md5]$ cat a.txt      # 發(fā)現(xiàn)我們的數(shù)據(jù)還是能訪問的。沒有問題。

5.1.5 替換設備

我這里是磁盤壞掉后的執(zhí)行替換的, 完全可以多一個備用盤, 壞掉自動替換的。

[root@centos7 md5]$ mdadm /dev/md5 -a /dev/sde1   # 上面我們的sdc1數(shù)據(jù)損壞,我們需要更換新的磁盤來頂替他的位置。這里添加一個sde1的磁盤, fdisk操作這里省去了。
mdadm: added /dev/sde1
[root@centos7 md5]$ mdadm -Ds      # 查看詳細信息
ARRAY /dev/md5 metadata=1.2 name=centos7.magedu.com:5 UUID=2c8ae60d:a799fcb7:9008a046:ae6ea430
[root@centos7 md5]$ mdadm -D /dev/md5     # 查看詳細信息
/dev/md5:
Version : 1.2
Creation Time : Wed Dec 6 19:28:22 2017
Raid Level : raid5
Array Size : 2095104 (2046.00 MiB 2145.39 MB)
Used Dev Size : 1047552 (1023.00 MiB 1072.69 MB)
Raid Devices : 3
Total Devices : 4
Persistence : Superblock is persistent

Update Time : Wed Dec 6 19:50:01 2017
State : clean       # 狀態(tài)恢復正常了。沒有問題
Active Devices : 3
Working Devices : 3
Failed Devices : 1
Spare Devices : 0

Layout : left-symmetric
Chunk Size : 256K

Consistency Policy : resync
Name : centos7.magedu.com:5 (local to host centos7.magedu.com)
UUID : 2c8ae60d:a799fcb7:9008a046:ae6ea430
Events : 43

Number Major Minor RaidDevice State
0 8 17 0 active sync /dev/sdb1
4 8 65 1 active sync /dev/sde1
3 8 49 2 active sync /dev/sdd1

1 8 33 - faulty /dev/sdc1  # 這個盤是壞掉的,我們已經(jīng)加入了新的磁盤, 這個盤可以干掉了
[root@centos7 md5]$ man mdadm
[root@centos7 md5]$ mdadm /dev/md5 --remove /dev/sdc1   # 這個盤我們從raid5中移除去。 
mdadm: hot removed /dev/sdc1 from /dev/md5

5.1.6擴展raid

我們上面使用的是2+1構(gòu)成的raid5,磁盤利用率為66%,如果我們想改成3+1 可以執(zhí)行類似如下命令

[root@centos7 mnt]$ mkadm -G -r /dev/md5 -n 4 -a /dev/sdxx   # 這里我就不測試了。使用/dev/sdxx代替一個設備。-G 是Grown增長的意思,-r 是resizefs的意思,

5.1.7 清空raid信息

[root@centos7 mnt]$ umount /dev/md5     # 卸載設備
[root@centos7 mnt]$ mdadm -S /dev/md5     # 停止raid5 
mdadm: stopped /dev/md5
[root@centos7 mnt]$ sed -i '$d' /etc/fstab    # 刪除fstab中關(guān)于raid5掛載的行
[root@centos7 mnt]$ cat /etc/fstab     # 確保fstab沒有大問題

#
# /etc/fstab
# Created by anaconda on Tue Nov 7 16:07:01 2017
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#

UUID=59ccea87-3c4e-4bbc-9e2f-3fadb1dcf2e6 /   ext4 defaults 1 1
UUID=f4e867e8-bcde-43a2-adc7-c80b0948e85f /app   ext4 noatime,usrquota,grpquota 1 2
UUID=1d6cbe88-ffb4-4adf-bacf-76be1fa75708 /boot   ext4 defaults 1 2
#UUID=b2c064f5-1ee5-4b5c-9e75-ed41cb99c5aa swap   swap defaults 0 0
#UUID=a0516c4f-40e6-4919-905a-8b44db12ff7b swap  swap defaults,pri=0 0 0 
#/dev/sdb2 /test ext4 rw,seclabel,relatime,data=ordered 0 0
#/dev/sdb1 /home xfs rw,seclabel,relatime,attr2,inode64,usrquota,grpquota 0 0
[root@centos7 mnt]$ rm -rf /etc/mdadm.conf     # 刪除raid默認配置文件
[root@centos7 mnt]$ mdadm --zero-superblock /dev/sd{b1,e1,d1,c1}  # 清空設置上的超級塊信息

5.2 RAID10的實現(xiàn)

raid10 ,6個分區(qū),2個一組raid1,3組raid0

5.2.1 案例分析

分析下,我們創(chuàng)建一個raid10設置,2個設備組成一個raid1,6個設備2個一組可以組成3個raid1, 然后把3個raid1組成一個raid0即可

5.2.2 先創(chuàng)建6個設備

[root@centos7 mnt]$ lsblk    # 就是使用fdisk 創(chuàng)建的設備, 具體這里就不寫了。 最終使用lsblk顯示,我們可以看到sdb1,sdb2,sdd1,sde1一共6個磁盤
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 200G 0 disk 
├─sda1 8:1 0 1G 0 part /boot
├─sda2 8:2 0 128G 0 part 
├─sda3 8:3 0 48.8G 0 part /
├─sda4 8:4 0 512B 0 part 
└─sda5 8:5 0 19.5G 0 part /app
sdb 8:16 0 100G 0 disk 
├─sdb1 8:17 0 1G 0 part 
└─sdb2 8:18 0 1G 0 part 
sdc 8:32 0 20G 0 disk 
├─sdc1 8:33 0 1G 0 part 
└─sdc2 8:34 0 1G 0 part 
sdd 8:48 0 20G 0 disk 
└─sdd1 8:49 0 1G 0 part 
sde 8:64 0 20G 0 disk 
└─sde1 8:65 0 1G 0 part 
sdf 8:80 0 20G 0 disk 
sr0 11:0 1 8.1G 0 rom /run/media/root/CentOS 7 x86_64

5.2.3 創(chuàng)建raid

[root@centos7 mnt]$ mdadm -C /dev/md11 -a yes -l 1 -n 2 /dev/sd{b1,c1}    # 創(chuàng)建第一個raid1
mdadm: /dev/sdb1 appears to be part of a raid array:
 level=raid5 devices=3 ctime=Wed Dec 6 19:28:22 2017
mdadm: Note: this array has metadata at the start and
 may not be suitable as a boot device. If you plan to
 store '/boot' on this device please ensure that
 your boot-loader understands md/v1.x metadata, or use
 --metadata=0.90
mdadm: /dev/sdc1 appears to be part of a raid array:
 level=raid5 devices=3 ctime=Wed Dec 6 19:28:22 2017
Continue creating array? y
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md11 started.
[root@centos7 mnt]$ mdadm -C /dev/md12 -a yes -l 1 -n 2 /dev/sd{b2,c2}    #創(chuàng)建第二個raid1
mdadm: Note: this array has metadata at the start and
 may not be suitable as a boot device. If you plan to
 store '/boot' on this device please ensure that
 your boot-loader understands md/v1.x metadata, or use
 --metadata=0.90
Continue creating array? y
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md12 started.
[root@centos7 mnt]$ mdadm -C /dev/md13 -a yes -l 1 -n 2 /dev/sd{d1,e1}     # 創(chuàng)建第三個raid1
mdadm: /dev/sdd1 appears to be part of a raid array:
level=raid5 devices=3 ctime=Wed Dec 6 19:28:22 2017
mdadm: Note: this array has metadata at the start and
may not be suitable as a boot device. If you plan to
store '/boot' on this device please ensure that
your boot-loader understands md/v1.x metadata, or use
--metadata=0.90
mdadm: /dev/sde1 appears to be part of a raid array:
level=raid5 devices=3 ctime=Wed Dec 6 19:28:22 2017
Continue creating array? y
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md13 started.
[root@centos7 mnt]$ mdadm -C /dev/md10 -a yes -l 0 -n 3 /dev/md{11,12,13}    # 將3個raid1 合并為一個raid0 
mdadm: /dev/md11 appears to contain an ext2fs file system
size=2095104K mtime=Wed Dec 6 19:29:45 2017
mdadm: /dev/md13 appears to contain an ext2fs file system
size=2095104K mtime=Wed Dec 6 19:29:45 2017
Continue creating array? y
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md10 started.
[root@centos7 mnt]$ mkfs.ext
mkfs.ext2 mkfs.ext3 mkfs.ext4  
[root@centos7 mnt]$ mkfs.ext4 /dev/md10         # 創(chuàng)建文件系統(tǒng)            
mke2fs 1.42.9 (28-Dec-2013)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=128 blocks, Stripe width=384 blocks
196224 inodes, 784896 blocks
39244 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=805306368
24 block groups
32768 blocks per group, 32768 fragments per group
8176 inodes per group
Superblock backups stored on blocks: 
32768, 98304, 163840, 229376, 294912

Allocating group tables: done    
Writing inode tables: done    
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done 

[root@centos7 mnt]$ mdadm -Ds          # 查看配置信息
ARRAY /dev/md11 metadata=1.2 name=centos7.magedu.com:11 UUID=0ce2cd6c:cd21fab6:3e65cfb5:64bd86f3
ARRAY /dev/md12 metadata=1.2 name=centos7.magedu.com:12 UUID=8af31dff:efab06ed:48e2613b:a599c774
ARRAY /dev/md13 metadata=1.2 name=centos7.magedu.com:13 UUID=a8c99d60:2d0c61e7:97a76809:9396c020
ARRAY /dev/md10 metadata=1.2 name=centos7.magedu.com:10 UUID=50b2fa58:4ce65d67:8c50c853:fa175a28
[root@centos7 mnt]$ mdadm -Ds >> /etc/mdadm.conf        # 寫配置文件到mdadm的配置文件中
[root@centos7 mnt]$ mkdir /mnt/md10         # 創(chuàng)建掛載目錄
[root@centos7 mnt]$ mount /dev/md10 /mnt/md10        # 掛載文件系統(tǒng)
[root@centos7 mnt]$ tail -n 1 /etc/mtab         # 查看mtab文件中的最后一行, 也就是我們的md10掛載信息
/dev/md10 /mnt/md10 ext4 rw,seclabel,relatime,stripe=384,data=ordered 0 0
[root@centos7 mnt]$ tail -n 1 /etc/mtab >> /etc/fstab       #添加到開機啟動

5.2.4 raid 清除工作

[root@centos7 mnt]$ umount /dev/md10         # 取消掛載
[root@centos7 mnt]$ rm -rf /etc/mdadm.conf        # 刪除mdadm的默認配置
[root@centos7 mnt]$ mdadm -S /dev/md10         # 停止raid0設置
mdadm: stopped /dev/md10
[root@centos7 mnt]$ mdadm -S /dev/md11         # 停止raid1設置
mdadm: stopped /dev/md11
[root@centos7 mnt]$ mdadm -S /dev/md12         # 停止radi1 設置
mdadm: stopped /dev/md12 
[root@centos7 mnt]$ mdadm -S /dev/md13         # 停止raid 1 設置
mdadm: stopped /dev/md13
[root@centos7 mnt]$ sed -i '$d' /etc/fstab        # 刪除fstab的掛載 
[root@centos7 mnt]$ cat /etc/fstab         # 確保正確

#
# /etc/fstab
# Created by anaconda on Tue Nov 7 16:07:01 2017
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#

UUID=59ccea87-3c4e-4bbc-9e2f-3fadb1dcf2e6 /   ext4 defaults 1 1
UUID=f4e867e8-bcde-43a2-adc7-c80b0948e85f /app   ext4 noatime,usrquota,grpquota 1 2
UUID=1d6cbe88-ffb4-4adf-bacf-76be1fa75708 /boot   ext4 defaults 1 2
#UUID=b2c064f5-1ee5-4b5c-9e75-ed41cb99c5aa swap   swap defaults 0 0
#UUID=a0516c4f-40e6-4919-905a-8b44db12ff7b swap  swap defaults,pri=0 0 0 
#/dev/sdb2 /test ext4 rw,seclabel,relatime,data=ordered 0 0
#/dev/sdb1 /home xfs rw,seclabel,relatime,attr2,inode64,usrquota,grpquota 0 0
[root@centos7 mnt]$ mdadm -D           # 再次查看下mdadm信息,確保沒有了
mdadm: No devices given.
[root@centos7 mnt]$ mdadm --zero-superblock /dev/sd{b1,b2,c1,c2,d1,e1} # 請求md的元數(shù)據(jù)信息

以上就是我們給大家整理的在linux磁盤管理中實現(xiàn)軟RAID的方法講解,大家有不明白的可以在下方的留言區(qū)討論。

相關(guān)文章

  • 解決Linux+Apache服務器URL區(qū)分大小寫問題

    解決Linux+Apache服務器URL區(qū)分大小寫問題

    Linux服務器的大小寫敏感有時候很不方便,在地址欄里一定要輸入準確的URL才能訪問,對搜索引擎和用戶不是很友好,那么如何解決LINUX服務器URL的大小寫問題
    2020-01-01
  • 如何使用iostat查看linux硬盤IO性能

    如何使用iostat查看linux硬盤IO性能

    這篇文章主要介紹了如何使用iostat查看linux硬盤IO性能,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友可以參考下
    2020-05-05
  • Linux下亂碼問題的解決方案小結(jié)

    Linux下亂碼問題的解決方案小結(jié)

    linux系統(tǒng)中文件名內(nèi)容為urf8編碼, windows系統(tǒng)中文件名默認為gbk編碼, 多數(shù)文檔使用gbk編碼,系統(tǒng)采用utf8編碼.這篇文章主要介紹了Linux下亂碼問題的解決方案,需要的朋友可以參考下
    2016-10-10
  • Linux安裝Oracle出現(xiàn)亂碼怎么解決

    Linux安裝Oracle出現(xiàn)亂碼怎么解決

    Linux系統(tǒng)下Oracle經(jīng)常會出現(xiàn)亂碼,不管是安裝還是使用過程中都會出現(xiàn)中文亂碼。這是因為Linux系統(tǒng)中缺少了某些字體,只要安裝了這些字體,就能解決這個問題了
    2016-02-02
  • 從Linux源碼看Socket(TCP)Client端的Connect的示例詳解

    從Linux源碼看Socket(TCP)Client端的Connect的示例詳解

    這篇文章主要介紹了從Linux源碼看Socket(TCP)Client端的Connect,本文通過實例代碼給大家介紹的非常詳細,對大家的學習或工作具有一定的參考借鑒價值,需要的朋友可以參考下
    2020-07-07
  • Linux使用HTTPie進行HTTP請求的詳細教程

    Linux使用HTTPie進行HTTP請求的詳細教程

    HTTPie?是一個用戶友好的?HTTP?客戶端工具,旨在讓與?HTTP?服務器的交互變得更簡單、更直觀,無論是開發(fā)人員、測試人員還是運維工程師,HTTPie?都是執(zhí)行?HTTP?請求、調(diào)試和測試?API?的理想工具,本文將詳細介紹Linux使用HTTPie進行HTTP請求的詳細教程
    2024-09-09
  • linux 使用bond實現(xiàn)雙網(wǎng)卡綁定單個IP的示例代碼

    linux 使用bond實現(xiàn)雙網(wǎng)卡綁定單個IP的示例代碼

    這篇文章主要介紹了linux 使用bond實現(xiàn)雙網(wǎng)卡綁定單個IP的示例代碼,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧
    2020-08-08
  • 詳解在Linux中怎么使用cron計劃任務

    詳解在Linux中怎么使用cron計劃任務

    本篇文章主要介紹了在Linux中怎么使用cron計劃任務,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧
    2018-03-03
  • Linux下強制殺死進程的方法詳解

    Linux下強制殺死進程的方法詳解

    這篇文章中我們給大家分享了關(guān)于Linux下強制殺死進程的方法技巧相關(guān)內(nèi)容,有興趣的朋友們可以參考了下。
    2018-09-09
  • CentOS6.3添加nginx系統(tǒng)服務的實例詳解

    CentOS6.3添加nginx系統(tǒng)服務的實例詳解

    這篇文章主要介紹了CentOS6.3添加nginx系統(tǒng)服務的實例詳解的相關(guān)資料,希望通過本文能幫助到大家,讓大家掌握這部分內(nèi)容,需要的朋友可以參考下
    2017-10-10

最新評論