mirror of
https://github.com/chubin/cheat.sh.git
synced 2024-11-29 23:36:40 +03:00
e50a9f937f
CHEATSH_UPDATE_TESTS_RESULTS=YES bash run-tests.sh
4.4 KiB
4.4 KiB
cheat.sheets:btrfs
# create the subvolume /mnt/sv1 in the /mnt volume
btrfs subvolume create /mnt/sv1
# list subvolumes
btrfs subvolume list /mnt
# mount subvolume without mounting the main filesystem
mount -o subvol=sv1 /dev/sdb /mnt
# delete subvolume
btrfs subvolume delete /mnt/sv1
# taking snapshot of a subvolume
btrfs subvolume snapshot /mnt/sv1 /mnt/sv1_snapshot
tldr:btrfs
# Create subvolume:
sudo btrfs subvolume create path/to/subvolume
# List subvolumes:
sudo btrfs subvolume list path/to/mount_point
# Enable quota:
sudo btrfs quota enable path/to/subvolume
# Show quota:
sudo btrfs qgroup show path/to/subvolume
tldr:btrfs-filesystem
# Defragment a directory recursively (does not cross subvolume boundaries):
sudo btrfs filesystem defragment -v -r path/to/directory
tldr:btrfs-subvolume
# btrfs subvolume
# Manage btrfs subvolumes and snapshots.
# More information: <https://btrfs.wiki.kernel.org/index.php/Manpage/btrfs-subvolume>.
# Create a new empty subvolume:
sudo btrfs subvolume create path/to/new_subvolume
# List all subvolumes and snapshots in the specified filesystem:
sudo btrfs subvolume list path/to/btrfs_filesystem
# Delete a subvolume:
sudo btrfs subvolume delete path/to/subvolume
# Create a read-only snapshot of an existing subvolume:
sudo btrfs subvolume snapshot -r path/to/source_subvolume path/to/target
# Create a read-write snapshot of an existing subvolume:
sudo btrfs subvolume snapshot path/to/source_subvolume path/to/target
# Show detailed information about a subvolume:
sudo btrfs subvolume show path/to/subvolume
# create the subvolume /mnt/sv1 in the /mnt volume
btrfs subvolume create /mnt/sv1
# list subvolumes
btrfs subvolume list /mnt
# mount subvolume without mounting the main filesystem
mount -o subvol=sv1 /dev/sdb /mnt
# delete subvolume
btrfs subvolume delete /mnt/sv1
# taking snapshot of a subvolume
btrfs subvolume snapshot /mnt/sv1 /mnt/sv1_snapshot
tldr:btrfs
# Create subvolume:
sudo btrfs subvolume create path/to/subvolume
# List subvolumes:
sudo btrfs subvolume list path/to/mount_point
# Enable quota:
sudo btrfs quota enable path/to/subvolume
# Show quota:
sudo btrfs qgroup show path/to/subvolume
tldr:btrfs-filesystem
# Defragment a directory recursively (does not cross subvolume boundaries):
sudo btrfs filesystem defragment -v -r path/to/directory
tldr:btrfs-subvolume
# btrfs subvolume
# Manage btrfs subvolumes and snapshots.
# More information: <https://btrfs.wiki.kernel.org/index.php/Manpage/btrfs-subvolume>.
# Create a new empty subvolume:
sudo btrfs subvolume create path/to/new_subvolume
# List all subvolumes and snapshots in the specified filesystem:
sudo btrfs subvolume list path/to/btrfs_filesystem
# Delete a subvolume:
sudo btrfs subvolume delete path/to/subvolume
# Create a read-only snapshot of an existing subvolume:
sudo btrfs subvolume snapshot -r path/to/source_subvolume path/to/target
# Create a read-write snapshot of an existing subvolume:
sudo btrfs subvolume snapshot path/to/source_subvolume path/to/target
# Show detailed information about a subvolume:
sudo btrfs subvolume show path/to/subvolume