Re: converting to btrfs

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

 



On Thu, Apr 7, 2016 at 5:56 PM, Rick Stevens <ricks@xxxxxxxxxxxxxx> wrote:
> On 04/07/2016 04:00 PM, Jeffrey Ross wrote:
>>
>> I had an raid1 partition with ext4 on it which was empty.
>>
>> it was /dev/md124 which was made up of /dev/sda1 and /dev/sdb1, I decided
>> to change this to be a btrfs partition.
>>
>> Initially I figured I'd simply unmount /dev/md124 and simply do a
>> "mkfs.btrfs -f -L home2 /dev/md124" and remount the partition, however
>> after doing some reading I believe btrfs supports raid1 directly without
>> using the software raid driver md (?).
>>
>> so I then tried "mkfs.btrfs -m raid1 -d raid1 -L home2 -f /dev/sdb1
>> /dev/sda1" and something was successfully created but this is where I am
>> confused, is this truly a raid1 partition? secondly mounting this
>> partition I simply specify something like "mount /dev/sda1 /mntpoint".
>>
>> I can see -
>> # btrfs filesystem show
>> Label: 'home2'  uuid: 635be1e8-31d2-4b5c-b81c-1ec2cd8d9101
>>          Total devices 2 FS bytes used 664.00KiB
>>          devid    1 size 376.46GiB used 2.01GiB path /dev/sdb1
>>          devid    2 size 376.46GiB used 2.01GiB path /dev/sda1
>>
>> To me this looks like two different partitions but I maybe wrong, so
>> assuming it is one raid partition how would I go around having this auto
>> mounted in /etc/fstab? I would assume this entry -
>>
>> UUID=635be1e8-31d2-4b5c-b81c-1ec2cd8d9101 /home2  btrfs defaults  0 0
>>
>> but I'm looking for some confirmation first that I actually have a raid
>> partition and I've done everything correctly first.
>
>
> Yeah, I think you have to use the UUID. From the mkfs.btrfs man page:
>
>         "Multiple devices are grouped by UUID of the filesystem."
>
> You can also include "-o device=/dev/sda1,device=/dev/sdb1" in the fstab
> entry to force a scan at mount time.

I don't recommend using device= in fstab because the enumeration can
change between boots, so it's not reliable. Plug in a USB stick, and
now sda1 is the stick, sdb1 is one btrfs, and sdc1 is the other, which
will fail to mount.

Unless degraded is included as a mount option. And now corruption is
just a matter of time. Each reboot can mean a different btrfs dev gets
written to, and then the stick is pulled, reboot happens, now the
btrfs devs get mounted together again, and poof they're both
irreparably corrupted.

So yeah, it's best to avoid device and degraded in fstab, but whatever
you do don't use them together at the same time in fstab.


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