Re: converting to btrfs

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

 



On Fri, Apr 8, 2016 at 12:56 AM, Chris Murphy <lists@xxxxxxxxxxxxxxxxx> wrote:

> You could use the 'degraded' mount option in fstab, but then that
> shows as a mount option and kernel messages, the same as if you're
> really degraded. So you have no idea if you're really degraded or not
> unless you check 'btrfs fi show' or 'btrfs fi us'.
>
> You really need to know if you've mounted degraded because there's no
> automatic rebuilds either.

There's actually a more pernicious problem that affects degraded raid1
writes (and probably raid10): Degraded writes are marked as single
copy, not raid1. So even after the missing device is found and you
remount normally, and either scrub or balance, data written while
degraded is not raid1. You actually have a device with mixed profile
chunks.

Example:

[root@f23s ~]# btrfs fi df /mnt/1
Data, RAID1: total=1.00GiB, used=458.06MiB
Data, single: total=1.00GiB, used=824.00MiB
System, RAID1: total=64.00MiB, used=16.00KiB
System, single: total=32.00MiB, used=0.00B
Metadata, RAID1: total=2.00GiB, used=576.00KiB
Metadata, single: total=256.00MiB, used=912.00KiB
GlobalReserve, single: total=16.00MiB, used=0.00B


There are two files on this file system. A 458M file was copied while
two devices were normally mounted, so that file is in a chunk with
raid1 profile. While mounted degraded with a device missing, a 824M
file was copied, and that caused the creation of a new chunk with
single profile to be created. Even if I do a normal scrub or balance,
that data *and* its associated metadata, isn't made raid1.

Upstream knows about this. It doesn't happen to raid56 profiles. It
will get fixed, I just don't know when.

The work around is:

btrfs balance start -dconvert=raid1,soft -mconvert=raid1,soft /mnt/1

That converts non-raid1 chunks into raid1 chunks, skipping the ones
that are already raid1. The result is df will only show raid1 chunks
now, which is what you want.

Anyway, yet another reason to do not setup silent degraded Btrfs mounts.


-- 
Chris Murphy
--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
http://lists.fedoraproject.org/admin/lists/users@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org



[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