On Wed, 2014-03-12 at 19:22 -0600, Chris Murphy wrote:
> On Mar 12, 2014, at 7:11 PM, Patrick O'Callaghan <pocallag...@gmail.com> 
> 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
System, RAID1: total=8.00MiB, used=16.00KiB
System, single: total=4.00MiB, used=0.00
Metadata, RAID1: total=1.00GiB, used=295.20Mi
Metadata, single: total=8.00MiB, used=0.00

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

> > $ df -h
> > Filesystem            Size  Used Avail Use% Mounted on
> > /dev/sda3              68G  8.5G   56G  14% /
> > devtmpfs              7.8G     0  7.8G   0% /dev
> > tmpfs                 7.9G  5.6M  7.8G   1% /dev/shm
> > tmpfs                 7.9G  1.1M  7.9G   1% /run
> > tmpfs                 7.9G     0  7.9G   0% /sys/fs/cgroup
> > tmpfs                 7.9G   72K  7.9G   1% /tmp
> > /dev/sda1             477M  113M  335M  26% /boot
> > /dev/sda5              27G  1.8G   24G   7% /var
> > /dev/sda2             932G   73G  858G   8% /home
> > 
> > Note that /dev/sda2 is mounted and /dev/sdb1 is not. However /dev/sda2
> > has around 1TB of space, so it's clearly the hard drive.
> 
> Yeah the multiple device mounting behavior is different. You can mount either 
> device and the entire volume is thus mounted, you don't have to be explicit 
> as btrfs finds its other parts and uses them; it only complains when it can't 
> find them.

OK

> > What's going on, and should I be worried?
> 
> Well, it's raid0 so yeah I'd make a backup of anything important. It is 
> possible to do an online conversion to a single device layout, but depending 
> on what you have in /home it might actually be easier to back it up, blow 
> away the current btrfs partitions, and redo the mkfs on just sdb1, add the 
> new UUID to your fstab, mount the new /home and restore from backup. But I 
> leave that up to you. The conversion is straight forward and it should work, 
> I've done it a bunch of times but you know… "yay btrfs with crossed fingers".

It appears to be RAID1 from the above.

> > 
> > Also, how can I change the label of the BTRFS partition? I used the
> > "btrfs filesystem label ..." command but although it registers the
> > change, the existing fedora_pxeclient.... label still shows up
> > in /dev/disk/by-label.
> 
> What do you get for
> 
> btrfs fi show

$ 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


> 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.

poc


-- 
users mailing list
users@lists.fedoraproject.org
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

Reply via email to