Re: btrfs or ext4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 31, 2020 at 1:58 PM Chris Murphy <lists@xxxxxxxxxxxxxxxxx> wrote:
>
> And the other one:
>
> btrfs device add /dev/sdXY /mnt/btrfs
> btrfs balance start -dconvert=raid1 -mconvert=raid1 /mnt/btrfs


It's not obvious that 'btrfs dev add' implies a few things:

- mkfs. It will write Btrfs super blocks on this device and zero the
areas that ordinarily get zero'd. If it detects anything it recognizes
like ext4, xfs, another btrfs, maybe mdadm super blocks (not sure) it
will refuse. You'll either need to wipefs the target partition, or use
the -f option when adding the device.

- filesystem resize. Adding a device grows the file system. Removing a
device shrinks it.

- conversion to raid1 will read all data, and write it back out as
raid1 chunks to each of the two devices per block group (i.e. one
block group becomes two chunks, one per device). One day we may have a
kind of optimization like replace and use a scrub to replicate the
data. But right now it will read from devid1 and then write out a new
pair of chunks to both devid1 and devid2. Mirroring on Btrfs is per
blockgroup, it's not mirroring an entire device.

- If you like the idea of doing a regular timed scrub, which reads all
the data on a Btrfs file system, and will report on any problems found
and whether they were fixed up: the 'btrfsmaintenance' package is in
Fedora repo. It contains a bunch of service units and timers for Btrfs
related things, all of them are disabled by default. You can configure
and enable the scrub timer to do a scrub once per month if you wish. I
do a scrub once per month lazy style (manually and when I remember to
do it). I don't do any other maintenance on any of my Btrfs file
systems (either manually or scheduled).


--
Chris Murphy
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux