Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
tips:btrfs [2016/10/12 07:33] – [subvolumes] scipio | tips:btrfs [2021/10/13 19:51] (current) – removed scipio | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== BTRFS ====== | ||
- | |||
- | ====== BTRFS ====== | ||
- | |||
- | ===== with libvirt ===== | ||
- | |||
- | <code bash> | ||
- | btrfs subvolume create / | ||
- | chown libvirt-qemu: | ||
- | chattr +C / | ||
- | </ | ||
- | |||
- | ===== as root filesystem ===== | ||
- | |||
- | |||
- | create root subvolume | ||
- | < | ||
- | mount /dev/sda1 /tmp/btrfs | ||
- | btrfs subvolume set-default 5 /tmp/btrfs | ||
- | cd /tmp/btrfs | ||
- | btrfs subvolume create @ | ||
- | </ | ||
- | |||
- | add " rootflags=subvol=@ " to grub kernel options | ||
- | |||
- | if update-grub fail check [[http:// | ||
- | |||
- | ===== subvolumes ===== | ||
- | |||
- | <code bash> | ||
- | btrfs subvolume list -p / | ||
- | </ | ||
- | |||
- | create subvolume sub1 | ||
- | <code bash> | ||
- | btrfs subvolume create < | ||
- | </ | ||
- | |||
- | take snapshot (thas is another subvolume) | ||
- | < | ||
- | btrfs subvolume snapshot < | ||
- | </ | ||
- | |||
- | delete subvolume or snapshot | ||
- | <code bash> | ||
- | btrfs subvolume delete < | ||
- | </ |