# Building OS on RAID1 with partitions on different disks

**URL:** <https://hub.mender.io/t/building-os-on-raid1-with-partitions-on-different-disks/6770>\
**Category:** General Discussions\
**Created:** [April 27, 2024, 3:10pm UTC](https://hub.mender.io/t/building-os-on-raid1-with-partitions-on-different-disks/6770 "2024-04-27T15:10:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![misterzorgy2000](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/misterzorgy2000/32/2174_2.png) [@misterzorgy2000](https://hub.mender.io/u/misterzorgy2000)\
**Post date:** [April 27, 2024, 3:10pm UTC](https://hub.mender.io/t/building-os-on-raid1-with-partitions-on-different-disks/6770/1 "2024-04-27T15:10:38Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [April 29, 2024, 2:47pm UTC](https://hub.mender.io/t/building-os-on-raid1-with-partitions-on-different-disks/6770/2 "2024-04-29T14:47:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![misterzorgy2000](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/misterzorgy2000/32/2174_2.png) [@misterzorgy2000](https://hub.mender.io/u/misterzorgy2000)\
**Post date:** [May 2, 2024, 8:45am UTC](https://hub.mender.io/t/building-os-on-raid1-with-partitions-on-different-disks/6770/3 "2024-05-02T08:45:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [May 2, 2024, 10:36am UTC](https://hub.mender.io/t/building-os-on-raid1-with-partitions-on-different-disks/6770/4 "2024-05-02T10:36:31Z")

</div>

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](https://github.com/mendersoftware/meta-mender/blob/master/meta-mender-core/classes/mender-setup-image.inc) 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
