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

Answered by Eric Z Ma.

Eric Z Ma

Eric is a father and 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.

Leave a Reply

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