translator
987
edits
(colapsible inserted) |
(btrfs slang) |
||
(8 intermediate revisions by the same user not shown) | |||
Line 17: | Line 17: | ||
Because Btrfs is different, you will find some words that do have a special meaning when used for btrfs. This may be a source of confusion. | Because Btrfs is different, you will find some words that do have a special meaning when used for btrfs. This may be a source of confusion. | ||
<div class=" | <div class="mw-collapsible mw-collapsed"><div class="mw-collapsible-toggle" style="float:none;">▶ Btrfs '''volume'''</div><div class="mw-collapsible-content">A '''volume''' is a pool of raw storage and consists of one or more '''device'''s. The size of the volume will be the addition of all devices that are part of this volume. In most cases you will only use one Btrfs volume. You are able to add/remove devices at any time. ''Usually you do '''not''' mount a btrfs volume.'' | ||
<div | |||
<div class="mw-collapsible-content"> | |||
A | |||
</div></div> | </div></div> | ||
<div class="mw-collapsible mw-collapsed"><div class="mw-collapsible-toggle" style="float:none;">▶ Btrfs '''chunk'''</div><div class="mw-collapsible-content">A '''chunk''' is simply a piece of storage that Btrfs can use to put data on. Think of a chunk(usually 1GiB) as of a page in a book. The book is the volume, and the chunk is one page of it. When you start, all pages are empty. When you write data to the volume, one page(chunk) after the other is written to. | |||
</div></div> | |||
<div class="mw-collapsible mw-collapsed"><div class="mw-collapsible-toggle" style="float:none;">▶ '''device'''</div><div class="mw-collapsible-content">A '''device''' is some linux device. It may be '''a partition''' like '''/dev/sdz1''' or /dev/sdz2. Or it may be a raw disk device like /dev/sdz without any partitioning. A Btrfs volume consists of '''at least one device'''. | |||
</div></div> | |||
<div class="mw-collapsible mw-collapsed"><div class="mw-collapsible-toggle" style="float:none;">▶ Btrfs '''subvolume'''</div><div class="mw-collapsible-content">A Btrfs subvolume is an independently mountable POSIX filetree and '''not a block device'''. It is the part of a volume that will be '''mountet writable''' into your Linux system. By convention the names of subvolumes start with @ ('''@''', '''@home''', '''@snapshots''' ...). All subvolumes share the space of the Btrfs volume. You may create subvolumes at will. (You may think of subvolumes ''as sort of "dynamic partitions" inside a Btrfs volume'') | |||
</div></div> | |||
<div class="mw-collapsible mw-collapsed"><div class="mw-collapsible-toggle" style="float:none;">▶ '''default subvolume''' </div><div class="mw-collapsible-content">The default subvolume of a Btrfs volume is special. When you mount, you normally have to name a subvolume to mount. When you don't name a subvolume, the default subvolume will be used by mount. The default subvolume can be changed to any subvolume. It is advisable to set that subvolume as default, that is used for mounting linux '''"/"''' this is often the subvolume with name '''"@"''' | |||
</div></div> | |||
<div class="mw-collapsible mw-collapsed"><div class="mw-collapsible-toggle" style="float:none;">▶ Btrfs '''volume-root''' "/", Btrfs '''layout''' </div><div class="mw-collapsible-content">A Btrfs volume contains one ore more subvolumes. But they are not stored in form of a list. These subvolumes are stored in a tree-like structure like in a filesystem. Sometimes called the "top-level subvolume" or "root of the volume". But be carefull this is '''not linux-root "/"''', but Btrfs '''volume-root "/"'''. There are several basic schemas to '''layout''' subvolumes in a volume | |||
</div></div> | |||
<div class="mw-collapsible mw-collapsed"><div class="mw-collapsible-toggle" style="float:none;">▶ Btrfs '''snapshot'''</div><div class="mw-collapsible-content">A snapshot looks nearly the same as a subvolume. But don´t get confused. When we talk about snapshots we usually mean a "'''readonly photograph''' of a subvolume". While the subvolume changes with time. A snapshot stays in the state of the subvolume at the time we made it. You can mount snapshots into your linux system, but you only can read the content. And the content will never change while this snapshot exists. When creating '''snapshots''' you have to watch out for the Btrfs-'''layout''' in use. | |||
It is possible to make a writable subvolume out of a readonly snapshot. This is the way roll back does work. | |||
</div></div> | |||
<div class="mw-collapsible mw-collapsed"><div class="mw-collapsible-toggle" style="float:none;">▶ Self-healing</div><div class="mw-collapsible-content">A Volume consists of one or more devices. The size of the volume will be the addition of all devices that are part of this volume. In most cases you will only use one Btrfs Volume | |||
</div></div> | |||
<div class="mw-collapsible mw-collapsed"><div class="mw-collapsible-toggle" style="float:none;">▶ Btrfs Scrub</div><div class="mw-collapsible-content">A Volume consists of one or more devices. The size of the volume will be the addition of all devices that are part of this volume. In most cases you will only use one Btrfs Volume | |||
</div></div> | |||
<div class="mw-collapsible mw-collapsed"><div class="mw-collapsible-toggle" style="float:none;">▶ Btrfs Balance</div><div class="mw-collapsible-content">A Volume consists of one or more devices. The size of the volume will be the addition of all devices that are part of this volume. In most cases you will only use one Btrfs Volume | |||
</div></div> | |||
<div class="mw-collapsible mw-collapsed"><div class="mw-collapsible-toggle" style="float:none;">▶ Btrfs Quota</div><div class="mw-collapsible-content">A Volume consists of one or more devices. The size of the volume will be the addition of all devices that are part of this volume. In most cases you will only use one Btrfs Volume | |||
</div></div> | |||
= Parts of Btrfs = | |||
== volume == | |||
=== subvolume === | |||
=== snapshot === | |||
=== RAID === | |||
=== balance === | |||
=== scrub === | |||
=== compression === | |||
=== encryption === | |||
=== send / receive === | |||
= Btrfs Tools = | |||
===btrfs=== | |||
===btrfsck=== | |||
this is not what you think ;-) | |||
== Recomendations == | |||
{| class="wikitable" | |||
|+ We recommend using BTRFS with UEFI and GPT | |||
|- | |||
! Partition !! Filesystem !! Size !! Partition type | |||
|- | |||
| /dev/sda1 || Fat32 || 1GiB || EFI system partition | |||
|- | |||
| /dev/sda2 || Btrfs || 1Gib - 8EiB || Btrfs Volume | |||
|- | |||
| /dev/sda3 || swap || 4GiB, at least your RAM-size || Swap partition (optional) | |||
|} | |||
{| class="wikitable" | |||
|+ IF you don't have UEFI, you may use BTRFS with BIOS and GPT | |||
|- | |||
! Partition !! Filesystem !! Size !! Partition type | |||
|- | |||
| /dev/sda1 ||(bootloader)|| 4MiB || BIOS boot partition | |||
|- | |||
| /dev/sda2 || Btrfs || 1Gib - 8EiB || Btrfs Volume | |||
|- | |||
| /dev/sda3 || swap || 4GiB, at least your RAM-size || Swap partition (optional) | |||
|} | |||
<!-- If you use command, it should be inside of usercmd. You can see below example --> | |||
{{UserCmd|command=example command should be here}} | |||
<!-- If you use code, it should be like below example(a space before that) --> | |||
Example codes should be here. | |||
<!-- Don't forget to look more templates: https://wiki.manjaro.org/index.php/Help:Template --> | |||
<small>Please be aware that the information on this page is a simplified version of the reality. Is is written to make the reader understand a little of these complex things. To get an in depth understanding it will be neccesary to read further at btrfs.wiki.kernel.org or other places.</small> | |||
= additional Information = | |||
=== why not btrfs ? === | === why not btrfs ? === | ||
A lot of people say: "'''I don't use btrfs because''' it is experimental and is '''not stable'''. You can´t use it in production. It is not safe!". | A lot of people say: "'''I don't use btrfs because''' it is experimental and is '''not stable'''. You can´t use it in production. It is not safe!". | ||
==== not stable ? ==== | ==== not stable ? ==== | ||
The status of btrfs was experimental for a long time, but the the core functionality is considered '''good enough for daily use'''. <small>(from kernel.org)</small> | |||
If you see statements declaring Btrfs as not stable, please look for the date of them. Some seem to date from 10 years ago. So if you want to give btrfs a chance, you have to look for newer statements. Maybe even look at btrfs.wiki.kernel.org there sure is the best information regarding btrfs | |||
==== experimental ? ==== | ==== experimental ? ==== | ||
Btrfs is feature-rich! | Btrfs is feature-rich! There are new features being implemented and these should be considered experimental for a few releases when the bugs get ironed out when number of brave users help stabilizing it.<small>(from kernel.org)</small> | ||
Some features are '''not implemented yet'''. Others are only '''partly implemented'''. Some are '''experimental''' and not suggested for production use. As is always the case in Linux-land ''you'' decide what to use, and so you are responsible for your own decisions. | |||
==== not usable for production ? ==== | ==== not usable for production ? ==== | ||
* | * [https://btrfs.wiki.kernel.org/index.php/Getting_started#Distro_support Distro support] for Btrfs as main filesystem | ||
* Some firms do use btrfs in production@wiki.btrfs.kernel.org | * Some firms do use btrfs in production@wiki.btrfs.kernel.org | ||
* Some manufacturers do deploy devices where btrfs is used inside | * Some manufacturers do deploy devices where btrfs is used inside | ||
Line 112: | Line 180: | ||
=See Also= | =See Also= |