Difference between revisions of "Btrfs"

m
added link to readthedocs
m (added link to readthedocs)
Line 202: Line 202:
It may be good to defragment a logfile, if there is a ''noticeable'' slowdown when booting your system.
It may be good to defragment a logfile, if there is a ''noticeable'' slowdown when booting your system.


== balance ==
== Balance [https://btrfs.readthedocs.io/en/latest/Balance.html ⇒] ==
When adding devices or changing the RAID-level of your volume, it may be necessary to balance your volume. While balancing, btrfs will read ALL (or a subset of all) '''chunks''' in, and write them out again using the actual RAID-level. It will stripe these files over all available devices equally. While this happens, the volume will keep being usable, but you may see some '''heavy load''' on it. Also '''this may take a very long time''' because '''ALL data must be''' read AND '''written''' again.
When adding devices or changing the RAID-level of your volume, it may be necessary to balance your volume. While balancing, btrfs will read ALL (or a subset of all) '''chunks''' in, and write them out again using the actual RAID-level. It will stripe these files over all available devices equally. While this happens, the volume will keep being usable, but you may see some '''heavy load''' on it. Also '''this may take a very long time''' because '''ALL data must be''' read AND '''written''' again.
Don´t worry about shutdown. When you shutdown your computer while the balance is running, the balance will pause. After you restart the computer the balance will restart and continue until it is finished.
Don´t worry about shutdown. When you shutdown your computer while the balance is running, the balance will pause. After you restart the computer the balance will restart and continue until it is finished.


=== filters ===
=== Filters ===
Because a complete balance may take a long time, ther is the possibility of filters in balance. When using a filter only those chunks will be balanced, that are named by the filter.  
Because a complete balance may take '''a long time''', there is the possibility of filters in balance. When using a filter only those chunks will be balanced, that are named by the filter.  


=== merging chunks ===
=== Merging chunks ===
As you use your volume, you will be creating some files, deleting some, modifying some. Then some parts of the chunks are empty. But this is not a coherent space that can be easily reused. Usually this is not a problem for btrfs and will be cleaned up automatically over time. However, if space is scarce (> 80% full), it is advisable to merge free areas together. This can be done by using balance with a filter.
As you use your volume, you will be creating some files, deleting some, modifying some. Then some parts of the chunks are empty. But this is not a coherent space that can be easily reused. Usually this is not a problem for btrfs and will be cleaned up automatically over time. However, if space is scarce (> 80% full), it is advisable to merge free areas together. This can be done by using balance with a filter.


Line 221: Line 221:
When you changed RAID-levels (for example from RAID 0 to RAID 1) there is no automatic duplication of the chunks. Only when writing further, btrfs will respect the changed RAID-level. This may not be what you intended. To complete the conversion to another RAID-level you need to tell btrfs to rewrite chunks where needed. You do this with a manual balance:
When you changed RAID-levels (for example from RAID 0 to RAID 1) there is no automatic duplication of the chunks. Only when writing further, btrfs will respect the changed RAID-level. This may not be what you intended. To complete the conversion to another RAID-level you need to tell btrfs to rewrite chunks where needed. You do this with a manual balance:


btrfs filesystem balance
see: [https://btrfs.readthedocs.io/en/latest/Balance.html btrfs filesystem balance]
 
 
 


== scrub ==
== scrub ==
translator
987

edits