//将硬盘设备/dev/sdb移除磁盘阵列[root@centos ~]# mdadm /dev/md5 -f /dev/sdb
mdadm: set /dev/sdb faulty in /dev/md5
//查看/dev/md0磁盘阵列的详细信息[root@centos ~]# mdadm -D /dev/md5
/dev/md5:
Version :1.2
Creation Time : Thu Apr 2718:14:092023
Raid Level : raid5
Array Size :41908224(39.97 GiB 42.91 GB)
Used Dev Size :20954112(19.98 GiB 21.46 GB)
Raid Devices :3
Total Devices :4
Persistence : Superblock is persistent
Update Time : Thu Apr 2718:23:312023
State : clean, degraded, recovering
Active Devices :2
Working Devices :3
Failed Devices :1
Spare Devices :1
Layout : left-symmetric
Chunk Size :512K
Consistency Policy : resync
Rebuild Status :69% complete
Name : centos:5(local to host centos)
UUID :279cba83:dcd23661:cbd67fac:8bae8d86
Events :31
Number Major Minor RaidDevice State
38640 active sync /dev/sde
18321 active sync /dev/sdc
48482 active sync /dev/sdd
0816- faulty /dev/sdb
4、删除磁盘阵列
(1)、卸载
[root@centos ~]# umount /RAID
(2)、模拟损坏硬盘并删除
[root@centos ~]# mdadm /dev/md5 -f /dev/sdb -r /dev/sdb
mdadm: set /dev/sdb faulty in /dev/md5
mdadm: hot removed /dev/sdb from /dev/md5
[root@centos ~]# mdadm /dev/md5 -f /dev/sdc -r /dev/sdc
mdadm: set /dev/sdc faulty in /dev/md5
mdadm: hot removed /dev/sdc from /dev/md5
[root@centos ~]# mdadm /dev/md5 -f /dev/sdd -r /dev/sdd
mdadm: set /dev/sdd faulty in /dev/md5
mdadm: hot removed /dev/sdd from /dev/md5
[root@centos ~]# mdadm /dev/md5 -f /dev/sde -r /dev/sde
mdadm: set /dev/sde faulty in /dev/md5
mdadm: hot removed /dev/sde from /dev/md5
(3)、查看详细信息
[root@centos ~]# mdadm -D /dev/md5
/dev/md5:
Version :1.2
Creation Time : Thu Apr 2718:14:092023
Raid Level : raid5
Array Size :41908224(39.97 GiB 42.91 GB)
Used Dev Size :20954112(19.98 GiB 21.46 GB)
Raid Devices :3
Total Devices :0
Persistence : Superblock is persistent
Update Time : Thu Apr 2718:27:362023
State : clean, degraded
Active Devices :0
Working Devices :0
Failed Devices :0
Spare Devices :0
Layout : left-symmetric
Chunk Size :512K
Consistency Policy : resync
Name : centos:5(local to host centos)
UUID :279cba83:dcd23661:cbd67fac:8bae8d86
Events :41
Number Major Minor RaidDevice State
-000 removed
-001 removed
-002 removed
//将硬盘添加到storage卷组
[root@centos ~]# vgcreate storage /dev/sdb /dev/sdc
Volume group "storage" successfully created
//查看卷组状态
[root@centos ~]# vgdisplay storage
--- Volume group ---
VG Name storage
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 1
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 0
Open LV 0
Max PV 0
Cur PV 2
Act PV 2
VG Size 39.99 GiB
PE Size 4.00 MiB
Total PE 10238
Alloc PE / Size 0 / 0
Free PE / Size 10238 / 39.99 GiB
VG UUID GImCki-hscS-une3-74Xa-XOkz-2JhH-ugaUdU
(4)、创建逻辑卷并查看状态
//分割一个约150MB的逻辑卷设备[root@centos ~]# lvcreate -n vo -L 150MB storage
Rounding up size to full physical extent 152.00 MiB
Logical volume "vo" created.[root@centos ~]# lvdisplay
--- Logical volume ---
LV Path /dev/storage/vo
LV Name vo
VG Name storage
LV UUID 4VinRD-jJfs-s0Pe-Wva1-9kAX-QUAd-Vjq2MS
LV Write Access read/write
LV Creation host, time centos,2023-04-2719:08:01+0800
LV Status available
#open0
LV Size 152.00 MiB
Current LE 38
Segments 1
Allocation inherit
Read ahead sectors auto- currently set to 8192
Block device 253:2--- Logical volume ---
LV Path /dev/cl/swap
LV Name swap
VG Name cl
LV UUID fNUlBi-Vdj3-OcaE-Waaq-DsQy-eNb6-3zAUN4
LV Write Access read/write
LV Creation host, time 192.168.2.22,2023-04-2118:57:34+0800
LV Status available
#open2
LV Size 2.00 GiB
Current LE 512
Segments 1
Allocation inherit
Read ahead sectors auto- currently set to 8192
Block device 253:1--- Logical volume ---
LV Path /dev/cl/root
LV Name root
VG Name cl
LV UUID LRAw0u-HJN0-jaZc-VSIJ-sVxe-G7F7-izx3yi
LV Write Access read/write
LV Creation host, time 192.168.2.22,2023-04-2118:57:34+0800
LV Status available
#open1
LV Size <17.00 GiB
Current LE 4351
Segments 1
Allocation inherit
Read ahead sectors auto- currently set to 8192
Block device 253:0
[root@centos ~]# vgdisplay
--- Volume group ---
VG Name storage
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 2
Act PV 2
VG Size 39.99 GiB
PE Size 4.00 MiB
Total PE 10238
Alloc PE / Size 30/120.00 MiB
Free PE / Size 10208/<39.88 GiB
VG UUID GImCki-hscS-une3-74Xa-XOkz-2JhH-ugaUdU
--- Volume group ---
VG Name cl
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size <19.00 GiB
PE Size 4.00 MiB
Total PE 4863
Alloc PE / Size 4863/<19.00 GiB
Free PE / Size 0/0
VG UUID nbPTja-DqYx-A8wh-Njm0-YyWW-nanS-IGIdRl
(4)、写入文件
[root@centos ~]# echo "Welcome to www.baidu.com">/RAID2/content.txt
[root@centos ~]# lvremove /dev/storage/vo
Do you really want to remove active logical volume storage/vo?[y/n]: y
Logical volume "vo" successfully removed.
(3)、删除卷组
[root@centos ~]# vgremove storage
Volume group "storage" successfully removed
(4)、删除物理卷设备
[root@centos ~]# pvremove /dev/sdb /dev/sdc
Labels on physical volume "/dev/sdb" successfully wiped.
Labels on physical volume "/dev/sdc" successfully wiped.
[root@centos ~]# lvremove /dev/storage/vo
Do you really want to remove active logical volume storage/vo?[y/n]: y
Logical volume "vo" successfully removed.
(3)、删除卷组
[root@centos ~]# vgremove storage
Volume group "storage" successfully removed
(4)、删除物理卷设备
[root@centos ~]# pvremove /dev/sdb /dev/sdc
Labels on physical volume "/dev/sdb" successfully wiped.
Labels on physical volume "/dev/sdc" successfully wiped.
文章目录 前言ALBEF:Align before Fuse: Vision and Language Representation Learning with Momentum Distillation(2021-10)VLMO: Unified Vision-Language Pre-Training with Mixture-of-Modality-Experts(2021-11)relatedmethod BLIP:Bootstrapping Language-Im…