Pcornel
Automation · Storage Automation

Filesystem Provisioning

Cheat sheet · https://pcornel.dk/topic.php?topic=5745

Back to the Topic

Answer

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

Remember

  • mkfs with labels.
  • Ownership and permissions.
  • Idempotent checks.

First 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

Commands

findmnt <mountpoint>
Read-only/validation observation for mount source, target, filesystem type and options for the selected mountpoint.

Verify in this order

volume → filesystem (if absent) → UUID

Where it usually breaks

Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5745

Confirmation

Confirm action

Continue?