mkfs refuses to make filesystem with message “is apparently in use by the system; will not make a filesystem here!”

I 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)

Eric Ma

Eric is a systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.

3 comments:

  1. 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.

  2. 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

  3. 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.

Leave a Reply

Your email address will not be published. Required fields are marked *