2021-01-18 10:15:00 +00:00
|
|
|
# btrfs subvolume
|
|
|
|
|
|
|
|
> Manage btrfs subvolumes and snapshots.
|
2022-11-15 11:50:15 +00:00
|
|
|
> More information: <https://btrfs.readthedocs.io/en/latest/btrfs-subvolume.html>.
|
2021-01-18 10:15:00 +00:00
|
|
|
|
|
|
|
- Create a new empty subvolume:
|
|
|
|
|
2025-07-20 01:28:02 +03:00
|
|
|
`sudo btrfs {{[su|subvolume]}} {{[c|create]}} {{path/to/new_subvolume}}`
|
2021-01-18 10:15:00 +00:00
|
|
|
|
|
|
|
- List all subvolumes and snapshots in the specified filesystem:
|
|
|
|
|
2025-07-20 01:28:02 +03:00
|
|
|
`sudo btrfs {{[su|subvolume]}} {{[l|list]}} {{path/to/btrfs_filesystem}}`
|
2021-01-18 10:15:00 +00:00
|
|
|
|
|
|
|
- Delete a subvolume:
|
|
|
|
|
2025-07-20 01:28:02 +03:00
|
|
|
`sudo btrfs {{[su|subvolume]}} {{[d|delete]}} {{path/to/subvolume}}`
|
2021-01-18 10:15:00 +00:00
|
|
|
|
2025-06-27 15:33:04 +03:00
|
|
|
- Create a [r]ead-only snapshot of an existing subvolume:
|
2021-01-18 10:15:00 +00:00
|
|
|
|
2025-07-20 01:28:02 +03:00
|
|
|
`sudo btrfs {{[su|subvolume]}} {{[sn|snapshot]}} -r {{path/to/source_subvolume}} {{path/to/target}}`
|
2021-01-18 10:15:00 +00:00
|
|
|
|
|
|
|
- Create a read-write snapshot of an existing subvolume:
|
|
|
|
|
2025-07-20 01:28:02 +03:00
|
|
|
`sudo btrfs {{[su|subvolume]}} {{[sn|snapshot]}} {{path/to/source_subvolume}} {{path/to/target}}`
|
2021-01-18 10:15:00 +00:00
|
|
|
|
|
|
|
- Show detailed information about a subvolume:
|
|
|
|
|
2025-07-20 01:28:02 +03:00
|
|
|
`sudo btrfs {{[su|subvolume]}} {{[sh|show]}} {{path/to/subvolume}}`
|