sudo apt-get install btrfs-tools # mkfs.btrfs /dev/sdb sudo mkfs.btrfs -L lxc /dev/sdb1 # list volumes btrfs filesystem show # list subvolumes mount /dev/sdb1 /mnt/ btrfs subvolume list /mnt/ # create subvolume sudo btrfs subvolume create /mnt/@sub1 # get default subvolume btrfs subvolume get-default /mnt/ # set default subvolume btrfs subvolume set-default 299 /mnt/ # mount subvolume mount -o subvol=new_subvol /dev/sdb1 /tmp/2 btrfs filesystem resize 64g /mnt # enable comprsssion (mountparameter) compress # /etc/fstab /dev/sda / btrfs rw,autodefrag,compress=lzo,noatime,thread_pool=16 00 # directroy to subvolume? # mv /var/lib/lxc/installserver /var/lib/lxc/installserver_tmp # btrfs subvol create /var/lib/lxc/installserver # time cp -a --reflink /var/lib/lxc/installserver_tmp/rootfs /var/lib/lxc/installserver # create snapshot sudo btrfs subvolume snapshot / /@snap1 # list snapshots btrfs subvolume list / # delete snapshot btrfs subvolume delete /@snap1
Links
http://wiki.ubuntuusers.de/Installieren_auf_Btrfs-Dateisystem
http://wiki.ubuntuusers.de/Befehle_Btrfs-Dateisystem