Difference between revisions of "Btrfs"

Resorted
(first approach)
(Resorted)
Line 1: Line 1:
<!-- This is a boilerplot to help you -->
<!-- This is a boilerplot to help you -->


<!-- TOC shows contents of the page -->__TOC__
[[File:Page Under Construction.jpg|thumb|center|Page under construction]]
[[File:Page Under Construction.jpg|thumb|center|Page under construction]]


Line 13: Line 12:
*'''RAID''' - support for software-based RAID 0, RAID 1, RAID 10
*'''RAID''' - support for software-based RAID 0, RAID 1, RAID 10
*'''Self-healing''' - checksums for data and metadata, automatic detection of silent data corruption (see [https://btrfs.wiki.kernel.org/index.php/Main_Page btrfs@kernel.org], [https://wiki.archlinux.org/title/Btrfs Btrfs@ARC-wiki], [https://de.wikipedia.org/wiki/Btrfs Btrfs@wikipedia])
*'''Self-healing''' - checksums for data and metadata, automatic detection of silent data corruption (see [https://btrfs.wiki.kernel.org/index.php/Main_Page btrfs@kernel.org], [https://wiki.archlinux.org/title/Btrfs Btrfs@ARC-wiki], [https://de.wikipedia.org/wiki/Btrfs Btrfs@wikipedia])
<!-- TOC shows contents of the page -->__TOC__


=== Familiar with btrfs-slang ? ===
=== Familiar with btrfs-slang ? ===
Line 43: Line 44:
</div></div>
</div></div>


= Parts of Btrfs =
= Btrfs Volume =
 
== Volume ==
A pool of raw storage. Consists of one or more devices. The size of the volume will be the addition of all included devices, unless you use RAID.  
A pool of raw storage. Consists of one or more devices. The size of the volume will be the addition of all included devices, unless you use RAID.  


If you do use more then one device, please also read the section about RAID. You are able to add/remove devices at any time. With adding/removing devices it is also possible to move a volume from one device to another (without changing the UID).
If you do use more then one device, please also read the section about RAID. You are able to add/remove devices at any time to increase/decrease the size of the volume. With adding/removing devices it is also possible to move a volume from one device to another (without changing the UUID).


Usually you do not mount the Btrfs volume itself, but you mount subvolumes. There may be times when it is practical to mount the Btrfs volume itself.Then you are able to change the volume layout. All (writeable) subvolumes inside a volume are movable inside the volume with mv. Moving subvolumes will not touch the data, but change the volume layout in an instant.
Usually you do not mount the Btrfs volume itself, but you mount subvolumes. There may be times when it is practical to mount the Btrfs volume itself. Then you are able to change the volume layout. All (writeable) subvolumes inside a volume are movable inside the volume with mv. Moving subvolumes will not touch the data, but change the volume layout in an instant.


When not otherwise specified, additional devices are handled as '''J'''ust a '''B'''unch '''o'''f '''D'''isks (JBOD); this means  
When not otherwise specified, additional devices are handled as '''J'''ust a '''B'''unch '''o'''f '''D'''isks (JBOD); this means  
{{Info|In most cases it is advisable to use only one Btrfs volume}}  
{{Info|In most cases it is advisable to use only one Btrfs volume}}  
=== subvolume ===


=== snapshot ===
== subvolume ==
 
== snapshot ==
A snapshot looks nearly the same as a subvolume. But snapshots really are "read-only photographs of a subvolume". While the subvolume changes with time. The snapshot is frozen in the state of the subvolume at the time you made it.
A snapshot looks nearly the same as a subvolume. But snapshots really are "read-only photographs of a subvolume". While the subvolume changes with time. The snapshot is frozen in the state of the subvolume at the time you made it.
A snapshot is read-only. Therefore it is guaranteed not to change. In a snapshot you will find all files of the subvolume frozen in time. {{BoxWarning|where to place snapshots|When creating snapshots you have to watch out for the volume layout in use}}
A snapshot is read-only. Therefore it is guaranteed not to change. In a snapshot you will find all files of the subvolume frozen in time. {{BoxWarning|where to place snapshots|When creating snapshots you have to watch out for the volume layout in use}}
Line 82: Line 82:
* Create a new subvolume from the snapshot chosen for roll back
* Create a new subvolume from the snapshot chosen for roll back
* Make the new subvolume the default
* Make the new subvolume the default


{{BoxDanger|Snapshots together with quotas|There are reports about massive problems when using '''quotas''' together with snapshots (snapper, timeshift)}}
{{BoxDanger|Snapshots together with quotas|There are reports about massive problems when using '''quotas''' together with snapshots (snapper, timeshift)}}


=== quotas ===
== RAID ==
Quota support in Btrfs is implemented at the subvolume level.
 
For more info see [https://btrfs.wiki.kernel.org/index.php/Quota_support Quota_support@btrfs.kernel.org]
{{BoxDanger|Reports about problems|There are reports about massive problems when using quotas (especially together with snapshots, snapper, timeshift)}}
* [https://forum.manjaro.org/t/freeze-issues-with-btrfs-and-timeshift/22005/10 freeze-issues-with-btrfs-and-timeshift 2021]
* [https://forum.manjaro.org/t/cannot-clone-btrfs-boot-drive-with-clonezilla/78836/10 cannot-clone-btrfs-boot-drive-with-clonezilla 2021]
* [https://forum.manjaro.org/t/btrfs-qgroups-warning-error/64029 btrfs-qgroups-warning-error 2021]
* [https://forum.manjaro.org/t/files-disappearing-in-btrfs-and-ssd/28991 files-disappearing-in-btrfs-and-ssd 2020]
 
=== RAID ===
Btrfs can add and remove devices while running, and can freely switch between RAID levels after the volume has been created.
Btrfs can add and remove devices while running, and can freely switch between RAID levels after the volume has been created.


Line 152: Line 141:


=== send / receive ===
=== send / receive ===
=== quotas ===
Quota support in Btrfs is implemented at the subvolume level.
For more info see [https://btrfs.wiki.kernel.org/index.php/Quota_support Quota_support@btrfs.kernel.org]
{{BoxDanger|Reports about problems|There are reports about massive problems when using quotas (especially together with snapshots, snapper, timeshift)}}
* [https://forum.manjaro.org/t/freeze-issues-with-btrfs-and-timeshift/22005/10 freeze-issues-with-btrfs-and-timeshift 2021]
* [https://forum.manjaro.org/t/cannot-clone-btrfs-boot-drive-with-clonezilla/78836/10 cannot-clone-btrfs-boot-drive-with-clonezilla 2021]
* [https://forum.manjaro.org/t/btrfs-qgroups-warning-error/64029 btrfs-qgroups-warning-error 2021]
* [https://forum.manjaro.org/t/files-disappearing-in-btrfs-and-ssd/28991 files-disappearing-in-btrfs-and-ssd 2020]


= Btrfs Tools =
= Btrfs Tools =
translator
987

edits