我想重新格式化 /dev/md0,这是一个由 4 个磁盘 (sd[bcde]) 组成的 RAID0 阵列。但是,当我尝试运行命令 mke2fs 时,我收到以下错误消息:
/dev/md0 is apparently in use by the system; will not make a filesystem here!
我也尝试过 mdadm --stop 来停止它,但是没有用:
mdadm: Cannot get exclusive access to /dev/md0:Perhaps a running process, mounted filesystem or active volume group?
仅供参考,/dev/md0 未安装,lsof/fuser 的输出为空。有什么想法吗?
[更新1]
lsblk 的输出如下所示:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdb 8:16 0 5.5T 0 disk
└─md0 9:0 0 21.9T 0 raid0
sdc 8:32 0 5.5T 0 disk
└─md0 9:0 0 21.9T 0 raid0
sdd 8:48 0 5.5T 0 disk
└─md0 9:0 0 21.9T 0 raid0
sde 8:64 0 5.5T 0 disk
└─md0 9:0 0 21.9T 0 raid0
dmsetup 表的输出为“未找到设备”,并且 pvs 没有产生任何内容。
[更新2]
这些磁盘仅属于 /dev/md0,不属于其他 RAID。/dev/md0 曾经被挂载为 NFS 共享目录。但即使我停止了 nfs,问题仍然没有解决。
pvdisplay 和 vgdisplay 没有输出。
对于“dmsetup info”,它显示“未找到设备”。
“cat /proc/mdstat”的输出:
Personalities : [raid0] [raid6] [raid5] [raid4]
md2 : active raid5 sdp[4] sdo[3] sdn[2] sdm[1] sdl[0]
23441565696 blocks super 1.2 level 5, 512k chunk, algorithm 2 [5/5] [UUUUU]
bitmap: 3/44 pages [12KB], 65536KB chunk
md1 : active raid5 sdk[5] sdj[4] sdi[3] sdh[2] sdg[1] sdf[0]
29301957120 blocks super 1.2 level 5, 512k chunk, algorithm 2 [6/6] [UUUUUU]
bitmap: 2/44 pages [8KB], 65536KB chunk
md0 : active raid0 sde[3] sdd[2] sdc[1] sdb[0]
23441565696 blocks super 1.2 512k chunks
unused devices: <none>
安装的输出:
/dev/sda2 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")
/dev/sda1 on /boot type ext4 (rw)
/dev/sda5 on /tmp type ext4 (rw)
/dev/sda3 on /var type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
gvfs-fuse-daemon on /root/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
/dev/md2 on /backup type ext4 (rw)
/dev/md1 on /home type ext4 (rw)