How to setup RAID

  • Freedombox is plugged into AVM Fritzbox 7590 Router at home.
  • Ordered it on 2021-01-06
  • “About”: You are running Debian GNU/Linux 10 (buster) and FreedomBox version 21.1. FreedomBox is up to date.

I have a question regarding RAID and didn’t find any useful information on the web. I’ve successfully attached 2 extern 1TB hard disks and formatted them to ext3:

Mounted /dev/sda1 at /media/root/BACKUP2 on behalf of uid 0
Mounted /dev/sdb1 at /media/root/BACKUP1 on behalf of uid 0

I had the drives formatted as ext4 before but then had a lot of write access on that drives. However, I seem not to be able to setup RAID, When I click on the PLUS-Button to configure RAID, it says: ‘No disks are available’, no matter how the disks are formatted or being mounted or not.
How is one supposed to setup a RAID1 on that box? Is there documentation available somewhere? What requirements are needed?
Regards Oliver

What button are you talking about?

If you would like the disks to spin-down when idle and have the data checksummed (and allow for snapshot send/receive backups!), and possibly compress the data on the fly, you could consider formatting a BTRFS raid1 with mulitple devices, and mounting it with noatime.

BTRFS guide:

Related but not btrfs specific issues:

Btrfs would also support to scrub (verify) the raid array.

Ah, sorry, I was talking about the Cockpit app. On the Storage page there is a + Sign in the upper right corner, right next to the title ‘RAID devices’. When I click on it, a dialog box opens and there it says ‘No disks are available’.
What do you mean by snapshot send/receive backups?
Mainly I bought this pioneer in the hope of a replacement of my old NSLU2, which unfortunetaly died a couple of weeks ago after working for about 13 years. I used this box mainly as a backup device for some computers in my home network (My own and family) and for storing photos, videos, music and so on. The NSLU2 worked as an NFS and had 2 hard disks attached and was configured to clone one disk to the other once a week.
I’m quite a noob when it comes to freedombox but willing to experiment.
Gonna try the links @NickA provided and see if I can get on.

Oh, there it’s hidden, never saw it. That would be md raid without checksuming, though.

Btrfs supports taking snapshots, and also to “send” the snapshots to remote locations or to another local btrfs disk (backup clone). The transfer is extremely efficient and fast.

There are many tools for taking, sending and expiring snapshots, but I have not compared them.
This example has some further explanations: Easy sync BTRFS snapshots with btrfs-sync – Own your bits

With md, you would mean mdadm, right?
On the command line, I would first create partitions on my hard disks with parted, mark them as RAID-partitions, set up RAID with mdadm and then create a file system on the RAID.
How is this supposed to be working within Cockpit?
Anyway, after having read a bit, I’d like to go the btrfs road and I’m going to come back here if it works (or not)…
Thank you for listening!

Just make sure not to use a sdcard for the freedombox system disk, as freedombox is not designed to conserve them like openwrt, they fail way too quickly.

The mdadm, yes. but sorry, I don’t know about cockpit.

What I found with btrfs is that depending on snapshot preferences, and whether using a SSD or HD, there are some beneficial config adjustments to do for the default (btrfs) rootfilesystem.

How did you get cockpit to work, by the way? → [buster] cockpit: not authorized to perform operation (#2033) · Issues · FreedomBox / FreedomBox · GitLab

I stumbled over exactly the same authorization problem and finally logged in as fbx after setting up a password for that user.

That makes me feel unsure:

The kit includes the A20-OlinuXino-LIME2, a custom metal case with a laser-engraved FreedomBox logo, a high-speed 32GB micro SD card with the FreedomBox software pre-installed, a backup battery, a power adapter, and an ethernet cable.

That’s exactly how I bought the Pioneer-FreedomBox-HSK, so I assume the sd card IS definitely the system disk.
How else would that work?

I would expect usual sdcards to sustain above writes issues only for months.

Everyone who wants the system to last longer will currently either have to deal with the workarounds in


Well, or use the sdcard with minimized writes, like the OpenWrt or MX Linux “frugal” base system.

Thank you for the hints.

So, my best bet would be to buy an additional storage add-on with a ssd , connect it to the SATA port and follow the instructions in the freedombox manual to setup the system on this disk. I will consider this.

For a NAS setup, the openwrt image should work ok directly from the sdcard and always be able to cleanly reboot into the RAM after power outages. I don’t know if your device can boot from sata or usb. If it can, then you could try writing the freedombox image to that device, otherwise you could start with booting the sdcard and move the running btrfs root filesystem over to another drive (like in the issue posted above), while keeping the boot loader on the sdcard.

I own the Pioneer Edition FreedomBox Home Server Kit (A20-OlinuXino-LIME2) from Olimex. They also sell a BAY-SSD-xxxGB metal enclosure. Pioneer-FreedomBox-HSK supports BAY-HDD/SSD and when assembled the external storage is seen as additional disk.
What’s unclear to me is if this also means the system can boot from that disk.
I don’t quite understand how openwrt fits in that picture. As I understand it, freedombox is almost plain debian with freedombox packages installed. If I go the openwrt route, freedombox is not possible anymore, so I have to follow the docs here to roll my own services.

Well, I found a promising answer in the olimex forum:

So it should be possible to boot from ssd. Now I have to find the time to to do this.

Someone who knows your device would have to answer about its boot features.

I mentioned openwrt because it boots local adjustments to its readonly squashfs from F2FS into a RAM overlayfs (minimizing sdcard wear and corruption on power interruption). And you would have to manually fix the mentioned issues in freedombox also, anyway. So for just btrfs+sshserver-sftp-server the effort seems about the same.

That sounds like the freedombox workaround from the “move system to SSD” issue could work for you (leaving only the boot loader on sdcard).