| name | list-subvolumes |
| description | Use when the user wants to see BTRFS subvolumes and which are snapper-managed. |
List Subvolumes
Show all BTRFS subvolumes on the system and identify which are managed by snapper.
When to use
- User wants an overview of BTRFS subvolumes
- Checking which snapshots belong to which config
- Verifying a path before creating snapshots
Inputs to gather
- Mount point (optional; defaults to
/)
- Filesystem path to scan (must be BTRFS)
Procedure
- Preflight: Verify target is BTRFS with
stat -f -c %T <mount>. Install snapper and btrfs-progs if missing.
- Run
sudo btrfs subvolume list <mount> to list all subvolumes.
- Run
sudo snapper list-configs to get snapper-managed configs and their associated subvolumes.
- Join the output: parse snapper configs to identify which IDs map to snapper management.
- Render a table: ID | Path | Snapper Config | RO (read-only Y/N).
Output / side effects
Displays a table of subvolumes with snapper association. No state change.
Safety / constraints
Read-only query. Requires sudo to read subvolume metadata.