Re: Wierd partition behaviour with BTRFS

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

 



On Mar 13, 2014, at 4:53 AM, Patrick O'Callaghan <pocallaghan@xxxxxxxxx> wrote:

> On Wed, 2014-03-12 at 19:22 -0600, Chris Murphy wrote:
>> On Mar 12, 2014, at 7:11 PM, Patrick O'Callaghan <pocallaghan@xxxxxxxxx> wrote:
>> 
>>> (Sorry for the subject line but it's the best I could come up with)
>>> 
>>> I recently installed F20 on a new system with a 120GB SSD and 1TB hard
>>> drive. I'm using the SSD for /, /boot, /var and swap, and the hard drive
>>> for /home. I decided to live on the edge and partition /home as BTRFS.
>>> All this was done from Anaconda with no subsequent changes except adding
>>> a few labels.
>>> 
>>> This is what I find:
>>> 
>>> $ lsblk --fs
>>> NAME   FSTYPE LABEL                                                     UUID                                 MOUNTPOINT
>>> sda                                                                                                          
>>> ├─sda1 ext4   boot                                                      6d5929d8-fd35-49e6-a8bf-aab5309dad77 /boot
>>> ├─sda2 btrfs  fedora_pxeclient-arch-00000-undi-002001-d4-3d-7e-f4-1b-08 22fecad3-619d-4a9b-aace-35a2e4e04c49 /home
>>> ├─sda3 ext4   root                                                      6a9a800c-309b-4b69-b269-884ad495e7b9 /
>>> ├─sda4                                                                                                       
>>> ├─sda5 ext4   var                                                       d5955869-af07-4d6e-b1b3-6ccb31208b41 /var
>>> └─sda6 swap                                                             1431e6d2-531e-46cd-8633-1cf878c6b2a1 [SWAP]
>>> sdb                                                                                                          
>>> └─sdb1 btrfs  fedora_pxeclient-arch-00000-undi-002001-d4-3d-7e-f4-1b-08 22fecad3-619d-4a9b-aace-35a2e4e04c49 
>>> 
>>> Note that /dev/sda2 and /dev/sdb1 have the same UUID and label.
>> 
>> I think you've stumbled into a bug. Since Btrfs directly supports multiple devices, it's like LVM or raid in this respect, and for LVM and RAID, anaconda might be eager to configure multiple device layouts this way.
>> 
>> So I'm going to bet dollars to donuts this is a Btrfs raid0 volume. What do you get for
>> 
>> btrfs fi df /home     #this is short for btrfs filesystem df /home
> 
> $ sudo btrfs fi df /home
> Data, single: total=78.01GiB, used=73.44GiB
^^^^^^^^^

So this means the data profile is single, which means it's allocating in 1GB chunks, alternating devices once they have the same free space remaining.



> System, RAID1: total=8.00MiB, used=16.00KiB
> Metadata, RAID1: total=1.00GiB, used=295.20Mi
^^^^^^^^^^^

And metadata is raid1 so it's mirrored on both devices.

> 
> I'm wondering where the bulk of the 1TB HDD has gone.

Your btrfs fi show will reveal the breakdown:

> 
> $ sudo btrfs fi show
> Label: xtra  uuid: 22fecad3-619d-4a9b-aace-35a2e4e04c49
>        Total devices 2 FS bytes used 73.72GiB
>        devid    1 size 4.19GiB used 1.03GiB path /dev/sda2
>        devid    2 size 927.32GiB used 79.01GiB path /dev/sdb1

So there is a 1GB allocation on the SSD, and 79GB allocation on the HDD, which is consistent with the single profile filling up the device with the most free space first. Once free space is equal, it will alternate allocations between the two drives.



> 
> 
>> And does the first line Label: match the new label or the old?
> 
> xtra is the new label. /dev/disk/by-label still shows the old label and
> not the new one.

Does the old one persist after a reboot? There's a huge pile of btrfs patches in 3.14 so it'd be interesting if you get different results with 3.14.0-0.rc6.git0.1.fc21.x86_64 available in koji (which is NOT a debug kernel, newer ones are unless otherwise specified in the changelog section; typically the first build on Monday after the release of a new rc version on kernel.org is git0 and is not a debug kernel so you can use it on F20; the debug kernels are much much slower).


Chris Murphy

-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
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