Difference between revisions of "Btrfs"
From wiki
(sudo) |
(add snapshot instructions) |
||
Line 34: | Line 34: | ||
To create a subvolume just use the command<syntaxhighlight lang="console"> | To create a subvolume just use the command<syntaxhighlight lang="console"> | ||
$ sudo btrfs subvolume create /<path> | $ sudo btrfs subvolume create /<path> | ||
+ | </syntaxhighlight>To create a snapshot use<syntaxhighlight lang="console"> | ||
+ | $ sudo btrfs subvolume snapshot /<source-path> /<destination-path> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
[[Category:Linux Desktop]] | [[Category:Linux Desktop]] | ||
[[Category:Linux Server]] | [[Category:Linux Server]] | ||
[[Category:Debian Release]] | [[Category:Debian Release]] |
Revision as of 20:11, 12 February 2017
Warning: | Btrfs is still a new filesystem. While many (including myself) find it stable enough for everyday use, don't use it for critical services and be prepared to use you backups. See status page on Btrfs wiki for up-to-date info. |
Install
To create and manipulate Btrfs volumes, you will need to install
$ sudo apt install btrfs-progs
Debian Jessie
Btrfs being still very young, it is recommended to use recent version of the kernel and btrfs-progs
- Kernel from Jessie Backports
$ sudo apt install btrfs-progs/jessie-backports
Create a filesystem
Single Disk
$ sudo mkfs.btrfs /dev/sdb
Raid 1
$ sudo mkfs.btrfs -mraid1 -draid1 /dev/sdb /dev/sdc
Raid 0
$ sudo mkfs.btrfs -mraid1 -draid0 /dev/sdb /dev/sdc
Subvolumes
To create a subvolume just use the command
$ sudo btrfs subvolume create /<path>
To create a snapshot use
$ sudo btrfs subvolume snapshot /<source-path> /<destination-path>