How do I format a device that already contains a filesystem?

Solution Verified - Updated -

Issue

  • When formatting a device that already contains a filesystem the mkfs command will fail out stating the filesystem cannot be formatted as it already contains a filesystem:
/dev/vdb2 appears to contain an existing filesystem (xfs).
Use the -f option to force overwrite.

Environment

  • Red Hat Enterprise Linux

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content