Building OS on RAID1 with partitions on different disks

Hello everyone!

I have a need to install an OS on RAID1 and in this regard, I have a question whether there is any experience with installing an OS on RAID1 and whether it is possible?

The current problem is that it is not possible to specify different disks for the MENDER partitions (sda1 for boot and md0 for partitions 2,3,4). Is it possible to specify in the variables MENDER_BOOT_PART = ‘/dev/sda1’ and in the variable MENDER_ROOTFS_PART_A = ‘/dev/md0’ and are there any recommendations on how to do this correctly?

Thank you very much!

Hi @misterzorgy2000,

As far as I can tell, this is not supported out of the box. One of the biggest concerns I see when the core set of partitions is on separate hardware entities is them getting split or recombined, and that obviously will be very problematic.
By customising the Mender configuration it should be possible to achieve, but its an untested path so far unfortunately.

Greets,
Josef

1 Like

Thank you very much for the response! I was expecting that by configuring the setup, it would be possible to specify partitions on different disks for the boot partition (/dev/sda1) and rootfs (dev/sdb2), but it seems strange that Mender always assigns one disk for all partitions in grub.cfg. I’m trying to edit specific Yocto recipes for that part but it seems dangerous

Hi @misterzorgy2000,

As already mentioned - the main concern I would see is that such a path would encourage recombination of the different partitions from various storage areas, and the Mender mindset pretty much requires the combination of the boot strategy + A partition + B partition + persistent data to be coherent for a given device.

Having said that, it does not rule out going beyond it, one can definitely do so. If the platform is Yocto based, I would start by working on meta-mender/meta-mender-core/classes/mender-setup-image.inc at master · mendersoftware/meta-mender · GitHub and then proceeding from there. We are also happy to upstream such a contribution if it provides value to other users. But given the usage so far and requests that we see, it is unlikely that we will actively implement such a feature.

Greets,
Josef

1 Like