I want to reformat /dev/md0, which is a RAID0 array consisting of 4 disks (sd[bcde]). However, when I tried to run the command mke2fs, I received the following error message:
/dev/md0 is apparently in use by the system; will not make a filesystem here!
I also tried mdadm --stop to stop it, but it didn't work:
mdadm: Cannot get exclusive access to /dev/md0:Perhaps a running process, mounted filesystem or active volume group?
FYI, /dev/md0 is not mounted, and the output of lsof/fuser is just empty. Any thoughts?
[Update1]
The output of lsblk is showed below:
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
The output of dmsetup table is "No devices found", and pvs produces nothing.
[Update2]
The disks only belong to /dev/md0 and are not in other RAID. /dev/md0 used to be mounted as a NFS shared directory. But even after I stopped nfs, it does not solve the problem.
No output for pvdisplay and vgdisplay.
For "dmsetup info", it says "No devices found".
The output of "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>
Output of mount:
/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)