Mailinglist Archive: opensuse-features (45 mails)

< Previous Next >
[openFATE 313130] Support btrfs RAID1 mirrored partitions
Feature changed by: Terence Honles (terencehonles)
Feature #313130, revision 8
Title: Support btrfs RAID1 mirrored partitions

openFATE: Unconfirmed
Requester: Important

Requested by: Bat Pul (batpul)
Partner organization:

In release 12.1 openSUSE adds support for btrfs. The btrfs filesystem
supports several RAID configurations on the filesystem level. This is
great since now it is no longer necessary to use Multiple Devices or
other mechanisms to support RAID filesystems. Mirrored filesystems are
a means to increase data reliability and read speed. However, btrfs
mirrored filesystems are currently not supported during installation
nor in yast2. Since it is not trivial to add such a filesystem to a
openSUSE 12.1 system this is a useful addition. In addition there
should be integrated support in openSUSE to detect and recover from
situations where one partition fails which is part of a btrfs RAID1

Use Case:
It is far from trivial to accomplish integration of a RAID1 btrfs
mirrored filesystem in the system. Such a filesystem can be created
mkfs.btrfs -L mylabel -m raid1 -d raid1 /dev/sda4 /dev/sdb4
This filesystem can then be mounted with:
mount /dev/sda4 /mnt
However, after reboot openSUSE 12.1 fails to mount this again with the
identical command. As a response it gives the following two unclear
messages in dmesg:
btrfs: failed to read the system array on sda4 btrfs: open_ctree failed
The trick is to specify both devices as:
mount -o device=/dev/sda4,device=/dev/sdb4 /dev/sda4 /mnt
The fstab entry should then become:
/dev/sda4 /mnt btrfs device=/dev/sda4,device=/dev/sdb4 1 2
Then after reboot the filesystem is mounted. Knowledge of these facts
and integration of btrfs RAID options during installation and in yast2
would help.
There currently doesn't appear to be a way to convert a single
partition root btrfs filesystem to RAID1. The only way to achieve a
btrfs RAID1 root partition is therefore during installation.

#1: Jan Engelhardt (jengelh) (2012-03-31 16:25:19)
The trick is actually to run `btrfs device scan`. Then, either
/dev/sda4 or /dev/sdb4 can be used for mounting, and you don't need
that fugly devices= extra option.

#2: Terence Honles (terencehonles) (2012-04-26 04:14:08)
I thought I saw ``btrfs device scan`` as part of the boot up scripts
when I was configuring the drive, but I believe this is the issue I ran
into today. (I did see this before but I ran fschk and then everything
worked) Unfortunately I'm not at home so I'm going to have to ask my
dad to make the changes and then see if the issue is fixed. (I will
...Luckily my father introduced me to openSUSE and can manage fixing
the config

+ #3: Terence Honles (terencehonles) (2012-05-15 01:54:37) (reply to #2)
+ I can confirm adding the additional devices to fstab works as a fix,
+ but ``btrfs device scan`` should really be run during the systemd
+ ````.
+ I was looking for where I saw the ``btrfs scan`` and the only thing I
+ could easily find was in ``/lib/mkinitrd/scripts/``

openSUSE Feature:

< Previous Next >
This Thread
  • No further messages