How do I format a device that already contains a filesystem?
Issue
- When formatting a device that already contains a filesystem the
mkfscommand 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 of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
