Difference between revisions of "Btrfs"

Tips moved to Solving Problems
(more details included)
(Tips moved to Solving Problems)
Line 267: Line 267:
* look for snapshots !
* look for snapshots !
* don’t forget to remove old snapshots (best done automatically)
* don’t forget to remove old snapshots (best done automatically)
== tips ==
=== move a volume ===
There is an '''easy and secure way''' to move a volume to another disk/device. If you use Btrfs itself to move the volume, there will be no danger. You even can do this '''while the volume is in use'''.
* Create the partition you want to use as ''destination'' '''without formatting''' it. Or remove the filesystem when one is present
* Add the ''destination'' device to your volume by {{RootCmd|command=btrfs device add /dev/[destination]}}
* Remove the ''source'' device from your volume by {{RootCmd|command=btrfs device remove /dev/[source]}}
Btrfs will notice, that it is necessary for this setup to move all data from the source device to the destination device. And it will start immediately to move data in the background. Meanwhile you can use your PC as you want.
* Empty Blocks will not be moved
* Compressed data will remain compressed
* All Snapshots will remain
* '''The UUID of the filesystem will remain the same''', but btrfs will be aware of this
* If you used the UUID to identify your volume, you even wont´t need to edit '''/boot/grub/grub.cfg''' and '''/etc/fstab'''
* Only, '''don't shutdown while the move of the volume is not complete'''.
If you want to watch the volume move, inside a terminal:
{{UserCmd|command=pamac install procps-ng}}
{{RootCmd|command=watch -n 60 btrfs filesystem show /}}


= Btrfs options =
= Btrfs options =
Line 288: Line 308:
* [https://forum.manjaro.org/t/files-disappearing-in-btrfs-and-ssd/28991 files-disappearing-in-btrfs-and-ssd 2020]
* [https://forum.manjaro.org/t/files-disappearing-in-btrfs-and-ssd/28991 files-disappearing-in-btrfs-and-ssd 2020]


= tips =
== move a volume ==
There is an '''easy and secure way''' to move a volume to another disk/device. If you use Btrfs itself to move the volume, there will be no danger. You even can do this '''while the volume is in use'''.
* Create the partition you want to use as ''destination'' '''without formatting''' it. Or remove the filesystem when one is present
* Add the ''destination'' device to your volume by {{RootCmd|command=btrfs device add /dev/[destination]}}
* Remove the ''source'' device from your volume by {{RootCmd|command=btrfs device remove /dev/[source]}}
Btrfs will notice, that it is necessary for this setup to move all data from the source device to the destination device. And it will start immediately to move data in the background. Meanwhile you can use your PC as you want.
* Empty Blocks will not be moved
* Compressed data will remain compressed
* All Snapshots will remain
* '''The UUID of the filesystem will remain the same''', but btrfs will be aware of this
* If you used the UUID to identify your volume, you even wont´t need to edit '''/boot/grub/grub.cfg''' and '''/etc/fstab'''
* Only, '''don't shutdown while the move of the volume is not complete'''.
If you want to watch the volume move, inside a terminal:
{{UserCmd|command=pamac install procps-ng}}
{{RootCmd|command=watch -n 60 btrfs filesystem show /}}


= Btrfs Tools =
= Btrfs Tools =
translator
1,001

edits