How do I format a device that already contains a filesystem?
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.