mkfs refuses to make filesystem with message “is apparently in use by the system; will not make a filesystem here!”
Posted on In QAI have a disk from another server installed on a new server. However, when I try to make a filesystem on it, mkfs
reports
# mkfs -t ext4 /dev/sdd1
mke2fs 1.42.8 (20-Jun-2013)
/dev/sdd1 is apparently in use by the system; will not make a filesystem here!
This is a new disk to the new server. It is not mounted.
I deleted the partition sdd1 and recreated it using cfdisk
. It did not help. The same error message.
What’s wrong here? How to fix it?
This is possibly caused by a RAID signature on the disk showing that the disk belongs to a RAID.
If you are sure that the disk will never be used in a RAID system anymore, you may follow this tutorials to clean the RAID signature: How to Clean RAID Signatures on Linux
This issue can also be caused by multipath, if it is installed and in use. The device will need to included in multipath’s blacklist. (tip from Marcus White)
This issue can also be caused by multipath, if it is installed and in use. The device will need to included in multipath’s blacklist.
Hi,
change the type of create filesystem from mkfs.ext4 to another type mkfs.xfs or else it depends what volume space is the disk
sudo dd if=/dev/urandom of=/dev/sdb bs=1M status=progress
This command will delete the metadata and digital signatures which is even caused by Intel VROC (virtual raid on CPU), but takes more time depending on the size of hard disk.