你好,我的服务器有问题,我试图删除设备并进行raid,我删除了/dev/sda1:
mdadm --manage /dev/md3 --fail /dev/sda1
mdadm --manage /dev/md3 --remove /dev/sda1
但是当我对 sdb1 尝试同样的操作时,我得到了
hot remove failed for /dev/sdb1: Device or resource busy
我在这里找到了我已经用于 sda1 的所有答案
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 1 447.1G 0 disk
└─sda1 8:1 1 447.1G 0 part
sdb 8:16 1 447.1G 0 disk
└─sdb1 8:17 1 447.1G 0 part
└─md3 9:3 0 447G 0 raid1
loop0 7:0 0 4G 0 loop /home/virtfs/user/var/tmp
nvme0n1 259:0 0 477G 0 disk
├─nvme0n1p1 259:1 0 32G 0 part
│ └─md0 9:0 0 32G 0 raid1 [SWAP]
├─nvme0n1p2 259:2 0 512M 0 part
│ └─md1 9:1 0 511.4M 0 raid1 /boot
└─nvme0n1p3 259:3 0 444.4G 0 part
└─md2 9:2 0 444.3G 0 raid1 /
nvme1n1 259:4 0 477G 0 disk
├─nvme1n1p1 259:5 0 32G 0 part
│ └─md0 9:0 0 32G 0 raid1 [SWAP]
├─nvme1n1p2 259:6 0 512M 0 part
│ └─md1 9:1 0 511.4M 0 raid1 /boot
└─nvme1n1p3 259:7 0 444.4G 0 part
└─md2 9:2 0 444.3G 0 raid1 /
更多信息:
mdadm --detail /dev/md3
/dev/md3:
Version : 1.2
Creation Time : Mon Mar 11 00:19:21 2019
Raid Level : raid1
Array Size : 468718400 (447.00 GiB 479.97 GB)
Used Dev Size : 468718400 (447.00 GiB 479.97 GB)
Raid Devices : 2
Total Devices : 1
Persistence : Superblock is persistent
Intent Bitmap : Internal
Update Time : Wed Oct 9 18:49:28 2019
State : clean, degraded
Active Devices : 1
Working Devices : 1
Failed Devices : 0
Spare Devices : 0
Consistency Policy : bitmap
Name : host.name.tld:3 (local to host host.name.tld)
UUID : 02aec08a:fb79e60e:c21a3562:d747c22f
Events : 2413
Number Major Minor RaidDevice State
- 0 0 0 removed
1 8 17 1 active sync /dev/sdb1
我试图找到与 lsof | 一起使用它的内容grep /mnt/home2/ 因为我使用该 raid 作为 home2
没有运气
有关系统的信息:CentOS 7、cPanel 服务器共享托管、生产服务器、CloudLinux
答案1
从 fdisk 中删除,并且 mdadm conf 重新启动后失败,可以删除 mdadm --manage /dev/md3 --remove ,就是这样