Btrfs support is heavily developed in Linux Kernel. So do not use old kernel.
I was using gparted-live-0.22.0-1-amd64.iso (NOTE: to match your existing system architecture (i586, amd64, etc)) Which contains:
Edit /etc/apt/sources and add sid release
apt-get update apt-get install linux-image-amd64 apt-get install btrfs-tools update-initramfs -u
Check btrfs-tools version
/bin/btrfs version
To make backups, snapshots, moving much easier and faster, every directory you want to backup by snapshot should be a subvolume. Also root filesystem should be created in separate subvolume not in btrfs root.
To distinguish volumes from directories we will use @ character at beginning of subvolume name. This is Ubuntu naming convention for subvolumes.
Proposed subvolumes structure (where / is BTRFS root)
Mount BTRFS filesystem (BTRFS root) to /mnt/btrfs.
btrfs subvolume snapshot /mnt/btrfs @
UUID=739e6086-d925-4bdb-94f5-26d8c10dc171 / btrfs defaults,subvol=@
btrfs subvolume list /mnt/btrfs
btrfs subvolume set-default 256 /mnt/btrfs
btrfs subvolume create /mnt/btrfs/@home
mv /mnt/btrs/@/home/* /mnt/btrfs/@home/
cp –reflink
is much faster on BTRFSrmdir /mnt/btrfs/@/home
Do not use errors=remount-ro
option which is not valid for BTRFS.
Example working fstab file:
UUID=ed730508-753e-4a7f-ac1e-bf8646f7bd63 / btrfs defaults,subvol=@,compress=no 0 0 UUID=ed730508-753e-4a7f-ac1e-bf8646f7bd63 /var btrfs defaults,subvol=@var,compress=no 0 0 UUID=ed730508-753e-4a7f-ac1e-bf8646f7bd63 /var/log btrfs defaults,subvol=@varlog,compress=no 0 0 UUID=ed730508-753e-4a7f-ac1e-bf8646f7bd63 /home btrfs defaults,subvol=@home,compress=no 0 0 UUID=ed730508-753e-4a7f-ac1e-bf8646f7bd63 /mnt/btrfs btrfs noauto,defaults,subvolid=5,compress=no 0 0
To prevent systemd to halt system during startup if device is not found (nofail and x-systemd.device-timeout):
UUID=<the_device_uuid> /mount/point btrfs nofail,x-systemd.device-timeout=10,noatime,compress=lzo,autodefrag 0 0
NOTE: do not use autodefrag - it consumes lots of cpu