906 B
906 B
Btrfs
Snapshot
Create shapshot
btrfs subvolume snapshot xyz xyz-snapshot-path-name
or
btrfs subvolume snapshot main "main-`date +%Y-%m-%d`"
Delete shapshot
btrfs subvolume delete xyz-snapshot-path-name
or
btrfs subvolume delete "`echo main-* | tr ' ' \\\\n | sort | head -n 1`"
Common
Resize
btrfs filesystem resize max /mnt/dmp/
# or for view ID
btrfs device usage /mnt/dmp/
btrfs filesystem resize ID:max /mnt/dmp/
Defragment / compress
btrfs filesystem defragment -v -clzo /boot/*
Set RO / RW
btrfs property set -f . ro false
btrfs property set -f . ro true
LVM
Extend
lvextend -L+1G /dev/vg4/homevol
Ext4
Resize
resize2fs /dev/device [size]
if superblock fail
dumpe2fs /dev/sda5 | grep -i backup
fsck -b 32768 /dev/sda5