Pcornel
Browse topics
Options
Recent
Favorites
Automation · Technical reference

Filesystem Provisioning

Direct answer

Filesystem provisioning automation creates file systems on new volumes with mkfs, labels them, mounts them and sets ownership and permissions consistently.

When to use this

Use this when creating file systems automatically.

First 30 seconds

1. Filesystem provisioning: create only if none exists (idempotent modules).

2. Choose type.

3. Record UUID.

4. Labels.

5. Never reformat existing data.

Operational verification

volume → filesystem (if absent) → UUID

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
storage automation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

Platformstorage automation · Automation implementations are tool and platform specific. Use the adjacent Domain for the technology being automated and this Domain for automation behavior. · Linux / util-linux
Key commandfindmnt <mountpoint>
Scope / prerequisiteUse this when creating file systems automatically.
Reference · 1
What next?3 suggested next steps
Catalog command links1
Evidence0
On this pageJump to a specific section
Automation command reference

Primary Commands

Configuration and operational commands for this Topic.

Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

3 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Command read-back and what it shows Verify boundary

For Storage Automation → Filesystem Provisioning, read back with findmnt <mountpoint>. Success is discriminated by the requested mount point resolves to the intended stable source with expected filesystem type/options, survives the intended persistence check and supports the bounded read/write behavior required by the consumer; failure remains when unmounted or wrong source, unexpected options/filesystem, unstable device name, persistence mismatch or correct mount state with unusable permissions/capacity. findmnt <mountpoint> shows current mount-source/type/options for that namespace, but it does not show underlying storage redundancy, future boot persistence or application-level correctness.

Step 2 Observation-driven branch and next-check logic Narrow the fault

Start Storage Automation → Filesystem Provisioning from one identified target/request/artifact and timestamp. Decision path: if mount point is not mounted, inspect device visibility and persistent configuration; if it is mounted from the wrong source/options, compare UUID/device mapping and requested policy; if source/options are correct but workload fails, inspect permissions, capacity, labels and application behavior.

Step 3 Common mistakes Narrow the fault
  • Wrong file system options for the workload.
Key points
  • mkfs with labels.
  • Ownership and permissions.
  • Idempotent checks.
Key checks
  • mkfs.xfs /dev/<vg>/<lv> — create filesystem
  • blkid /dev/<vg>/<lv> — UUID
  • ansible <h> -m community.general.filesystem -a 'fstype=xfs dev=/dev/<vg>/<lv>' --check — idempotent module
ReferenceHow it works1 section · depth on demand

How it works

Storage Automation → Filesystem Provisioning owns requested mount point, backing block/logical device, filesystem identity, mount options and persistent configuration used to make the filesystem available after reboot. Filesystem provisioning allocates or selects storage, creates a filesystem when appropriate, mounts it into the namespace and usually persists a stable identifier in fstab or an equivalent systemd mount unit. Keep these adjacent boundaries separate: SAN/cloud volume attachment, multipath, LVM, encryption, permissions, SELinux and application ownership are separate things to check. A key diagnostic distinction is that a directory existing is not a mounted filesystem, and a mounted filesystem is not evidence that persistence, capacity or ownership matches the request.

ReferenceImportant terms & boundaries1 section · depth on demand

In depth

Filesystem provisioning prepares storage for use on a host: partitioning, creating volumes, making a filesystem, mounting it persistently and setting permissions. Automating it ensures identical layouts across servers and avoids mistakes such as formatting the wrong disk.

- community.general.parted: { device: /dev/sdb, number: 1, state: present }
- community.general.lvg: { vg: vg_data, pvs: /dev/sdb1 }
- community.general.lvol: { vg: vg_data, lv: lv_backups, size: 200g }
- community.general.filesystem: { fstype: xfs, dev: /dev/vg_data/lv_backups }
- ansible.posix.mount:
    path: /srv/backups
    src: /dev/vg_data/lv_backups
    fstype: xfs
    opts: defaults,nofail
    state: mounted

Identify disks by stable identifiers (WWN, serial, /dev/disk/by-id) rather than /dev/sdX, which can change between boots, and guard formatting steps so they never run against a disk that already has a filesystem.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docstorage automation current

Authoritative/upstream documentation reviewed for bounded claims in Storage Automation > Filesystem Provisioning. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://docs.ansible.com/ansible/latest/collections/community/general/lvol_module.html · confidence 94%
Confirmation

Confirm action

Continue?