Target Linux host · filesystem/mount namespace context
mkfs
mkfs
Create a new filesystem structure on a selected block device or logical volume.
Primary lookup intent: destructive. Use `mkfs` when the lookup goal is to create a new filesystem structure on a selected block device or logical volume. Tie the result to the same host, namespace, user identity and time window as the symptom.
Inspect the exact process namespace/credentials/cgroup and owning kernel subsystem, then test the resource from the original workload context. Repeat the original workload/request before closure.
Privilege Write access to the target block device, normally root/CAP_SYS_ADMIN in operational environments.State impact DestructiveProduction Unknown
Field glossary
Important fields projected from persisted Command guidance.
Expected-state cue for `mkfs`The exact target now contains the intended filesystem signature and parameters after successful creation. Capture the exact invocation, exit status, stdout/stderr, target identity and observation time.
Used in these Topics
Each relation carries both placement role and operational semantic: verifies, configures, troubleshoots, collects evidence, changes state or general.
Evidence boundary
What this output can establish — and where you must not over-claim.
Supports the state directly exposed by mkfs for the selected object and execution context.
Does not by itself prove root cause, adjacent dependency health, effective end-to-end behavior, return-path health or workload recovery.
Inspect the exact process namespace/credentials/cgroup and owning kernel subsystem, then test the resource from the original workload context. Repeat the original workload/request before closure.
Command guidance
Execution context
Target Linux host · filesystem/mount namespace context
Use when
Primary lookup intent: destructive. Use mkfs when the lookup goal is to create a new filesystem structure on a selected block device or logical volume. Tie the result to the same host, namespace, user identity and time window as the symptom.
Important fields
Expected-state cue for mkfs: The exact target now contains the intended filesystem signature and parameters after successful creation. Capture the exact invocation, exit status, stdout/stderr, target identity and observation time.
Common problems
Suspicious-output cue for mkfs: Wrong device is formatted, creation errors occur, signature/type differs, or old consumers still reference previous content. Treat this as a troubleshooting signal, not automatic root cause.
Operational impact
Recovery class: restore_only. Before-state for mkfs: Capture exact device identity, existing signatures/partition layout and a verified backup before filesystem creation. DANGEROUS — mkfs can destroy or irreversibly alter data/state. Validate exact target and recovery path before execution. mkfs safety classification: destructive — potential irreversible data, identity or storage change; require explicit target validation, backup/recovery path and post-change verification.
Runtime cautions
Rollback for mkfs: Formatting has no generic rollback; restore the previous filesystem/data from backup or image to the verified target device. Failure recovery: Stop writes immediately after a wrong-target format, preserve the device and perform recovery/restore before creating anything else. Prerequisites for mkfs: DANGEROUS prerequisite: prove the exact target device/LV is disposable or backed up, unmounted and not an active RAID/LVM/application member. Confirm device/filesystem identity, mount namespace, active consumers and whether the operation requires an unmounted/offline filesystem. Privilege boundary for mkfs: Write access to the target block device, normally root/CAP_SYS_ADMIN in operational environments. Confirm distribution/tool version and effective namespace before relying on option-specific behavior.
Technical context
Post-change verification for mkfs: Verify filesystem signature/UUID and then validate mounted fresh I/O plus restored application data. Output review: healthy and suspicious cues are command-specific interpretation boundaries, not fixed literal output samples. Intent class: destructive. Safety class: destructive. Intent describes the primary lookup role; safety remains command-family capability and can be higher than a read-only invocation. mkfs is documented as an operational lookup primitive under Filesystems & Mounting. The canonical leaf intentionally represents the command family; options remain distribution/tool-version specific.
Variants · known-good and broken output
Read the stored sample against its authored expected state and interpretation, then return to the Command evidence boundary for what the observation can and cannot prove.
Known-good state patternKnown-good · Linux
State pattern: expected object is present, identity/scope matches the controlled test, terminal state is healthy and relevant counters/results are internally consistent.healthy/terminal
mkfs — Known-good. State pattern: expected object is present, identity/scope matches the controlled test, terminal state is healthy and relevant counters/results are internally consistent. Why: this command exposes Linux kernel/userspace resource path state. What it proves: only the selected object/context and fields directly returned here. What it does not prove: root cause, adjacent dependency health or end-to-end workload success. Next check: Inspect the exact process namespace/credentials/cgroup and owning kernel subsystem, then test the resource from the original workload context. Then repeat the original workload/request and verify the return path.
Supports the state directly exposed by mkfs for the selected object and execution context.
Does not prove: Does not by itself prove root cause, adjacent dependency health, effective end-to-end behavior, return-path health or workload recovery.Inspect the exact process namespace/credentials/cgroup and owning kernel subsystem, then test the resource from the original workload context. Repeat the original workload/request before closure.
Transitional state patternTransitional · Linux
State pattern: object exists but negotiation, convergence, reconciliation, retry or recovery is still progressing; timers/counters or stage markers should change between samples.in-progress
mkfs — Transitional. State pattern: object exists but negotiation, convergence, reconciliation, retry or recovery is still progressing; timers/counters or stage markers should change between samples. Why: this command exposes Linux kernel/userspace resource path state. What it proves: only the selected object/context and fields directly returned here. What it does not prove: root cause, adjacent dependency health or end-to-end workload success. Next check: Inspect the exact process namespace/credentials/cgroup and owning kernel subsystem, then test the resource from the original workload context. Then repeat the original workload/request and verify the return path.
Supports the state directly exposed by mkfs for the selected object and execution context.
Does not prove: Does not by itself prove root cause, adjacent dependency health, effective end-to-end behavior, return-path health or workload recovery.Inspect the exact process namespace/credentials/cgroup and owning kernel subsystem, then test the resource from the original workload context. Repeat the original workload/request before closure.
Broken state patternBroken · Linux
State pattern: expected object is absent, denied, unresolved, failed or divergent from the controlled test; error/result fields identify the directly observed boundary, not automatic root cause.failed/degraded
mkfs — Broken. State pattern: expected object is absent, denied, unresolved, failed or divergent from the controlled test; error/result fields identify the directly observed boundary, not automatic root cause. Why: this command exposes Linux kernel/userspace resource path state. What it proves: only the selected object/context and fields directly returned here. What it does not prove: root cause, adjacent dependency health or end-to-end workload success. Next check: Inspect the exact process namespace/credentials/cgroup and owning kernel subsystem, then test the resource from the original workload context. Then repeat the original workload/request and verify the return path.
Supports the state directly exposed by mkfs for the selected object and execution context.
Does not prove: Does not by itself prove root cause, adjacent dependency health, effective end-to-end behavior, return-path health or workload recovery.Inspect the exact process namespace/credentials/cgroup and owning kernel subsystem, then test the resource from the original workload context. Repeat the original workload/request before closure.