1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-29 03:55:28 +02:00
tldr/pages/linux/btrfs-subvolume.md

29 lines
919 B
Markdown
Raw Normal View History

2021-01-18 10:15:00 +00:00
# btrfs subvolume
> Manage btrfs subvolumes and snapshots.
> 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
- 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}}`