BTRFS RAID not showing up in "Storage / Software RAID"

  • Hi,


    I finally got round to take OMV for a spin, and I must say I'm impressed by the extent to which OMV integrates into a Debian install. Well done, many thanks for your efforts!


    All works quite nicely after some minor hiccups, except for one thing: the Software RAID section. As GitHub invites me to discuss things here before creating an issue, here we are.


    My setup is:

    OMV 6.9.7-3

    Debian Bullseye (arm)



    Where:

    • /dev/sda1 and /dev/sdb1 are a BTRFS RAID1 mirror mounted as / for the system.
    • /dev/sda2 and /dev/sdb2 are an MD RAID1 for the swap partition
    • /dev/sda3 and /dev/sdb3 are an unmounted BTRFS RAID1 mirror, intended for data storage


    The /dev/sda1 RAID does not show up in the web UI at all. As it is system, no issue here.

    The MD RAID showed up in "Storage / Software RAID" without doing anything. It is not visible "Storage / File System", nor can it be added manually. As it is swap, no issue here.


    The /dev/sda3, on the other hand, is not present in the "Storage / File System" section, nor the "Storage / Software RAID" section.

    I can add the /dev/sdb3 file system in "Storage / File System" manually, and it is mounted as expected:

    Code
    forage@Barad-dur:~$ df -h
    Filesystem      Size  Used Avail Use% Mounted on
    udev            118M     0  118M   0% /dev
    tmpfs            25M  1.5M   24M   6% /run
    /dev/sda1       3.8G  2.0G  1.4G  60% /
    tmpfs           124M     0  124M   0% /dev/shm
    tmpfs           5.0M     0  5.0M   0% /run/lock
    tmpfs           124M     0  124M   0% /tmp
    /dev/sda3       1.9T  3.9M  1.9T   1% /srv/dev-disk-by-uuid-6e13a369-53b5-4d96-82ea-cba9091f5be6
    tmpfs            25M     0   25M   0% /run/user/1000


    Code
    forage@Barad-dur:~$ sudo btrfs filesystem df /srv/dev-disk-by-uuid-6e13a369-53b5-4d96-82ea-cba9091f5be6
    Data, RAID1: total=1.00GiB, used=512.00KiB
    System, RAID1: total=8.00MiB, used=16.00KiB
    Metadata, RAID1: total=1.00GiB, used=112.00KiB
    GlobalReserve, single: total=3.25MiB, used=0.00B


    But the RAID is not to be found in the "Storage / Software RAID" section afterwards either.



    As BTRFS file system handling has been added at a later stage of the 6.x development, does OMV simply not have full BTRFS integration in the UI yet or is this a bug?

  • chente

    Approved the thread.
  • There's no point in replying to "what is wrong".


    You're using RAID on an arm devices. Bad idea.

    What device?


    How are the drives connected?


    Several partitions with several RAID on the same drive? Bad idea 2x


    With BTRFS/RAID, do you have a UPS?


    Just think through, what you want to achieve with that setup.

  • Guys, this topic isn't about whether RAID is a good idea, how and on what device it should be done. It's about a valid RAID config not showing up.

    I'm running OMV on an old ReadyNAS Duo v2. This one ran three RAID partitions with a stock config on two drivers for many many years without issue as well.

    The drive sizes are not matching, but the partition sizes are. For testing I'm not using two identical drives yet. With the file system being BTRFS different partition sizes shouldn't even matter.

  • votdev

    Added the Label resolved
  • votdev

    Added the Label OMV 6.x
  • Guys, this topic isn't about whether RAID is a good idea, how and on what device it should be done.

    Good luck with that.


    You are using OMV on a proprietary Hardware and wanting RAID in a way that noone here will ever advise you.


    So, good luck with that.

  • The Software RAID page only shows and handles MD devices.

    Thanks for the confirmation. With the "md" path in the URL of the page I suspected as much. Is there a need to file a feature request on GitHub for it for the record, or is it already on your to-do list?

    • Official Post

    Perhaps more information in your first post would have been helpful, especially regarding hardware and testing.


    AFAIK the implementation of a BTRFS raid is now based upon profiles and not mdadm with the BTRFS file system on top, which a user could do previously versions


    If you implemented the raid setup using debian so that you could achieve a raid boot device and you create the btrfs there this might explain the problem. But, OMV uses the full block device (drive) to create an mdadm array and btrfs profiles so in the GUI there is no option to select partitions.

  • Good luck with that.


    You are using OMV on a proprietary Hardware and wanting RAID in a way that noone here will ever advise you.


    So, good luck with that.

    Thank you. Once everything is up and running, I'll be doing the exact same thing on a more recent ReadyNAS. The old one serves as an off-site backup, so speed is not an issue.

    • Official Post

    Thanks for the confirmation. With the "md" path in the URL of the page I suspected as much. Is there a need to file a feature request on GitHub for it for the record, or is it already on your to-do list?

    The text will not be changed in OMV6 because all documentations, tutorials and videos out there will become incorrect otherwise. In OMV7 the MD management is in a separate plugin that has adapted this.

  • Thank you. Once everything is up and running, I'll be doing the exact same thing on a more recent ReadyNAS. The old one serves as an off-site backup, so speed is not an issue.

    If you really want to go with it, only remarks are:


    Use the OS drive seperated from the DATA drives.


    Does that device has a way to boot from USB or SDcard?

    Here's what I did to have BTRFS (with snapshots) on root partition on a Pi4 which can be enhanced after to a RAID1:

    Boot Btrfs root partition with Raid1 on Raspberri Pi | Ephestione's HQ

    [EDIT] I'm not using the above anymore since migrating to a CM4 instead of Pi4. [/EDIT]



    RAID1 on a SWAP partition??? For what???


    When creating the RAID1 on the drives, do it on the OMV GUI.

    That is how it should be done.

  • The text will not be changed in OMV6 because all documentations, tutorials and videos out there will become incorrect otherwise. In OMV7 the MD management is in a separate plugin that has adapted this.

    No, I meant filing a feature request for adding BTRFS RAID support to the "Storage / Software RAID" page. Sorry for the confusion.

  • We are really deviating from the topic here, but anyway...


    The device only supports two drives. Booting from USB is possible, but I like to keep things 'simple' and contained to the device itself.

    The stock firmware creates an exact same partition layout (system+swap+data), with the exception that instead of using BTRFS, the Duo v2 used EXT4 on MD RAID for system and data. At the time BTRFS did not exist yet or was hardly usable. For more recent hardware they used BTRFS on MD RAID, because BTRFS RAID directly was not stable or didn't exist yet, but it did allow using snapshot features and such.


    The reason for this setup, swap as RAID included, I suppose, is quite simple: remove one drive and all keeps functioning as before even after a reboot, swap included. At least if you allow degraded mounting by default.

    Chuck in a new drive and all was copied 1-on-1 without intervention needed.

    I won't have 100% the same with OMV, especially when it comes to recreating the partitions and RAIDs on a new drive automagically and all. That would require additional scripting (what Netgear called XRAID). Implementing such a feature in OMV would be nearly impossible due to the large amount of different setups compared to a closed system. At least not without imposing a partition and drive setup.

    Creating those scripts would also be a waste of time to do just for me, as I will never make up for the time again compared to just fixing it by hand in the rare case that a drive failure does happen.

    What I do get is keeping a fully up and running system when a drive fails, accessible through SSH remotely, or locally without the hassle of connecting through UART again. Which would allow me to swap the drive and recreate the arrays without too much effort.

  • What do you expect from such a feature?

    After looking into OMV a bit more, I realise that there might not even be a need for it.

    At the moment, there's no clean separation between "Software RAID" and "File Systems" any more. The latter allows you to set up RAID configs already, so having a separate section doesn't add much. I suppose that's also the reason you're moving it into a plugin, just for MD.

    (re)creating a full-fledged partition manager is probably out of the OMV scope. Reasons for me to drop to a shell at the moment would be:


    • see the existing RAID setup
    • see the RAID health/status (sync status, etc.)
    • creating new partitions (of a specific size)
    • adding partitions to an existing RAID array
    • fixing an existing array if a drive fails
    • grow existing partitions to utilise the additional free space when replacing a drive with a larger one (if that's not what the existing grow button is for)

    Especially the first two items are something missing from the UI at the moment, since you can set up a RAID but have no means to see what a drive is afterwards. This can either be in "Software RAID" or "File Systems".

    The other items could be considered for inclusion as something to have in the web UI, but they will increase complexity a lot.

  • We are really deviating from the topic here, but anyway...

    Only because you are insisting on the idea that what you want to do, is the right thing.

    OMV is built/intended to have the OS isolated from the DATA drives and with KISS (Keep It Simple, Stupid)


    I won't insist anymore on different ways.


    The reason for this setup, swap as RAID included, I suppose, is quite simple: remove one drive and all keeps functioning as before even after a reboot, swap included. At least if you allow degraded mounting by default.

    I would like to see if the OS would boot, after a drive has failed.

    If you set "degraded" by default (IIRC) the system is always with a drive failed, so your RAID1 isn't working.

    Unless I'm completly wrong and, even degraded, the system will make the RAID1 direct copy to the other drive.


    This is going way out of my league.

    I'll take my leave now but hope you are able to achieve what you want.


    Just to wrap my input, I hope you have, at least added more RAM than the one that comes standard (according to the Documentation that I read above. 256MB just won't cut it).

  • Just to wrap my input, I hope you have, at least added more RAM than the one that comes standard (according to the Documentation that I read above. 256MB just won't cut it).

    The 256MB is onboard with no way to extend it, so I'm stuck with it. So far, everything works nicely, not smoothly, but nicely ;) All good for an off-site solution.

    Next up is the ReadyNas 420 with Intel Atom C3338 and 2GB RAM which should be quite nice compared to the Duo v2.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!