Koozali.org: home of the SME Server

Setup RAID: ssd + 2x hdd for raid1 -- problem

Offline jatan231

  • *
  • 5
  • +0/-0
Setup RAID: ssd + 2x hdd for raid1 -- problem
« on: October 19, 2026, 05:40:59 PM »
Good day.

My setup goal:
1x ssd for boot and install of the OS
2 x hdd in raid1 for /etc/home/files

I have been following the guides on raid in the documentation section. "wiki.koozali.org/Raid"

I can successfully create a raid1:   md211

 lsblk --fs
NAME    FSTYPE            LABEL UUID                                 MOUNTPOINT
sdb
├─sdb1  vfat                    A6C6-EEE6                            /boot/efi
├─sdb2  xfs                     d823d387-aa6e-4496-8ac0-fadfd7eac4a0 /boot
├─sdb3  swap                    4a040fd9-f670-4d17-8960-34d35b7d4779 [SWAP]
└─sdb4  xfs                     23dc1ef0-8f6a-4ee1-9c38-568b6278bbde /
sdc     linux_raid_member 211   f295044e-f81a-9dd3-6553-512577e7d563
└─md211 xfs                     bff6fa99-eec8-4284-9d4f-9e03dcf2992f /mnt/newdisk
sdd     linux_raid_member 211   f295044e-f81a-9dd3-6553-512577e7d563
└─md211 xfs                     bff6fa99-eec8-4284-9d4f-9e03dcf2992f /mnt/newdisk

I then add the needed info to /etc/mdadm.conf:
ARRAY /dev/md211 level=raid1 num-devices=2 metadata=1.2 UUID=f295044e:f81a9dd3:65535125:77e7d563
   devices=/dev/sdc,/dev/sdd

I then add the following to /etc/fstab:

# UUID=bff6fa99-eec8-4284-9d4f-9e03dcf2992f /mnt/newdisk            xfs     uquota,gquota        0 0
UUID=bff6fa99-eec8-4284-9d4f-9e03dcf2992f /home/e-smith/files            xfs     uquota,gquota        0 0

If I restart the system with either of the above active, even none of the above, the raid md211 is gone unfortunately.

Before reboot:

cat /proc/mdstat
Personalities : [raid1]
md211 : active raid1 sdd[1] sdc[0]
      1953382464 blocks super 1.2 [2/2] [UU]
      bitmap: 0/15 pages [0KB], 65536KB chunk

After reboot: There are no raid any longer...
cat /proc/mdstat
Personalities :
unused devices: <none>
??????

 lsblk --fs
NAME   FSTYPE      LABEL UUID                                   MOUNTPOINT
sda
├─sda1 vfat              A6C6-EEE6                              /boot/efi
├─sda2 xfs               d823d387-aa6e-4496-8ac0-fadfd7eac4a0   /boot
├─sda3 swap              4a040fd9-f670-4d17-8960-34d35b7d4779   [SWAP]
└─sda4 xfs               23dc1ef0-8f6a-4ee1-9c38-568b6278bbde   /
sdb
└─sdb1 LVM2_member       yXZ182-32lu-jZ4x-H1VY-dpZV-aPVs-qWy5wU
sdc
└─sdc1 LVM2_member       Ppb9rl-s8cG-H6r0-1XCq-bCFO-I2mi-NiLWbA


I have also added the following to /etc/default/grub:   "rd.md=1 rd.md.conf=1 rd.auto=1"

GRUB_CMDLINE_LINUX="resume=UUID=4a040fd9-f670-4d17-8960-34d35b7d4779 rhgb quiet rootflags=uquota,pquota rd.md=1 rd.md.conf=1 rd.auto=1"

Unfortunately this also does not help the raid survive past a reboot...

After a reboot the system does not boot and gets stuck at "single user mode". I disable the added info at /etc/fstab, only after that the system will complete a reboot...



I am clearly not doing something that is still required, or doing something wrong?

Any assistance would be appreciated pls.


PS.  after a reboot, there are still something on the 2 x hdds...
How can I then get the raid1 active again short of rebuilding again?  (mdadm --create)



Offline Stefano

  • *
  • 10,918
  • +3/-0
Re: Setup RAID: ssd + 2x hdd for raid1 -- problem
« Reply #1 on: October 19, 2026, 08:43:49 PM »
Try this, once the raid Is up and running
Code: [Select]
ls /boot/initrd-*.img | sed 's,.*initrd-\(.*\)\.img,\1,' | while read initrd; do     mkinitrd -f /boot/initrd-$initrd.img $initrd; done
And the reboot

Offline jatan231

  • *
  • 5
  • +0/-0
Re: Setup RAID: ssd + 2x hdd for raid1 -- problem
« Reply #2 on: October 20, 2026, 08:50:42 AM »
Hi

Thanks for the reply.

Unfortunately:
ls /boot/initrd-*.img | sed 's,.*initrd-\(.*\)\.img,\1,' | while read initrd; do     mkinitrd -f /boot/initrd-$initrd.img $initrd; done
ls: cannot access '/boot/initrd-*.img': No such file or directory


I have also done a search initrd*.* and nothing is found on the entire system...?

Offline Stefano

  • *
  • 10,918
  • +3/-0
Re: Setup RAID: ssd + 2x hdd for raid1 -- problem
« Reply #3 on: October 20, 2026, 10:11:30 AM »
Hi

Thanks for the reply.

Unfortunately:
ls /boot/initrd-*.img | sed 's,.*initrd-\(.*\)\.img,\1,' | while read initrd; do     mkinitrd -f /boot/initrd-$initrd.img $initrd; done
ls: cannot access '/boot/initrd-*.img': No such file or directory


I have also done a search initrd*.* and nothing is found on the entire system...?

sorry, my fault.. gave you commands working on SME10 but not in SME11

try
Code: [Select]
dracut -f --regenerate-all

Offline jatan231

  • *
  • 5
  • +0/-0
Re: Setup RAID: ssd + 2x hdd for raid1 -- problem
« Reply #4 on: October 20, 2026, 11:26:04 AM »
Hi

Thanks, that did something...

Unfortunately after a reboot the raid is no more and I have to edit out /etc/fstab entries to be able to boot properly...


Offline Stefano

  • *
  • 10,918
  • +3/-0
Re: Setup RAID: ssd + 2x hdd for raid1 -- problem
« Reply #5 on: October 20, 2026, 01:43:05 PM »
Ok, lets start again

The RAID array is assembled correctly but disappears after reboot. Check that Dracut includes the `mdraid` support and the mdadm configuration.

**1. Check the current RAID status and configuration:**

Code: [Select]
cat /proc/mdstat
mdadm --detail --scan
cat /etc/mdadm.conf

**2. Check `/etc/dracut.conf` and ensure it contains:**

Code: [Select]
add_dracutmodules+=" lvm mdraid "
mdadmconf="yes"

**3. Regenerate all initramfs images:**

Code: [Select]
dracut -f --regenerate-all

**4. Verify the filesystem UUID used in `/etc/fstab`:**

It must identify the XFS filesystem on the RAID array, not an individual disk.

**Important:** Device names (`/dev/sda`, `/dev/sdb`, etc.) can change after reboot. Do not recreate the array with `mdadm --create`; existing RAID metadata may allow recovery.

If the problem persists, provide the output of `mdadm --examine /dev/sdX` for both HDDs and the contents of `/etc/dracut.conf`.

Offline jatan231

  • *
  • 5
  • +0/-0
Re: Setup RAID: ssd + 2x hdd for raid1 -- problem
« Reply #6 on: October 20, 2026, 02:52:08 PM »
Thanks for the detailed reply.

I followed your suggestions...
Unfortunately the raid does not survive a reboot.

/etc/dracut.conf

# PUT YOUR CONFIG IN separate files
# in /etc/dracut.conf.d named "<name>.conf"
# SEE man dracut.conf(5) for options
add_dracutmodules+=" lvm mdraid "
mdadmconf="yes"

 mdadm --examine /dev/sdb
/dev/sdb:
   MBR Magic : aa55
Partition[0] :   3907029167 sectors at            1 (type ee)

 mdadm --examine /dev/sdc
/dev/sdc:
   MBR Magic : aa55
Partition[0] :   3907029167 sectors at            1 (type ee)

===================================

After I bring "up" the raid again:

mdadm --examine /dev/sdb
/dev/sdb:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : ec3e96ed:a71f83a1:be613817:d678e452
           Name : 211
  Creation Time : Tue Oct 20 14:46:33 2026
     Raid Level : raid1
   Raid Devices : 2

 Avail Dev Size : 3906764976 sectors (1862.89 GiB 2000.26 GB)
     Array Size : 1953382464 KiB (1862.89 GiB 2000.26 GB)
  Used Dev Size : 3906764928 sectors (1862.89 GiB 2000.26 GB)
    Data Offset : 264192 sectors
   Super Offset : 8 sectors
   Unused Space : before=264112 sectors, after=48 sectors
          State : clean
    Device UUID : 88f50767:0136b7f4:a67443d3:48ee5975

Internal Bitmap : 8 sectors from superblock
    Update Time : Tue Oct 20 14:46:33 2026
  Bad Block Log : 512 entries available at offset 16 sectors
       Checksum : ee6416fa - correct
         Events : 0


   Device Role : Active device 0
   Array State : AA ('A' == active, '.' == missing, 'R' == replacing)

mdadm --examine /dev/sdc
/dev/sdc:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : ec3e96ed:a71f83a1:be613817:d678e452
           Name : 211
  Creation Time : Tue Oct 20 14:46:33 2026
     Raid Level : raid1
   Raid Devices : 2

 Avail Dev Size : 3906764976 sectors (1862.89 GiB 2000.26 GB)
     Array Size : 1953382464 KiB (1862.89 GiB 2000.26 GB)
  Used Dev Size : 3906764928 sectors (1862.89 GiB 2000.26 GB)
    Data Offset : 264192 sectors
   Super Offset : 8 sectors
   Unused Space : before=264112 sectors, after=48 sectors
          State : clean
    Device UUID : 06cf5187:d96458ea:36ffc866:9d347aa1

Internal Bitmap : 8 sectors from superblock
    Update Time : Tue Oct 20 14:46:33 2026
  Bad Block Log : 512 entries available at offset 16 sectors
       Checksum : c3f4f036 - correct
         Events : 0


   Device Role : Active device 1
   Array State : AA ('A' == active, '.' == missing, 'R' == replacing

Offline Stefano

  • *
  • 10,918
  • +3/-0
Re: Setup RAID: ssd + 2x hdd for raid1 -- problem
« Reply #7 on: October 20, 2026, 03:56:54 PM »
well.. something wrong on your side.
just tested on a vanilla install of SME11, originally installed on a single disk
added 2 more disks to the machine
created raid with
Code: [Select]
#create array
mdadm --create --verbose /dev/md11 --level=1 --raid-devices=2 /dev/sdb /dev/sdc
# add to mdadm.conf
mdadm --detail --scan --verbose /dev/md11 >> /etc/mdadm.conf

created 10-mdadm.conf in /etc/dracut.conf.d/ with

Code: [Select]
add_dracutmodules+=" lvm mdraid "
mdadmconf="yes"

and used dracut -f to regenerate all

once I rebooted, my raid array is stille there and active.

move dracut's added parameters in a separated file and retry

and let us know

please, to improve the visibility, use the correct tags to format your text/code, thank you

Offline jatan231

  • *
  • 5
  • +0/-0
Re: Setup RAID: ssd + 2x hdd for raid1 -- problem
« Reply #8 on: October 21, 2026, 08:50:32 AM »
Good day.
Stefano, thank you for all the good information and the willingness to assist.

I implemented your last suggestions, but after a reboot still no raid...
========================

I decided to start over rather.

I cleared all the hdds involved and did a new fresh install with only the ssd installed in the system.

After installation:
1:  Installed the 2 x 2tB hdds for the raid.
2:  followed your suggestions in the last post:

Code: [Select]
#create array
mdadm --create --verbose /dev/mdXXX --level=1 --raid-devices=2 /dev/sdb /dev/sdc
# add to mdadm.conf
mdadm --detail --scan --verbose /dev/mdXXX >> /etc/mdadm.conf


created 10-mdadm.conf in /etc/dracut.conf.d/ with

Code: [Select]
add_dracutmodules+=" lvm mdraid "
mdadmconf="yes"

3:   
Code: [Select]
dracut -f --regenerate-all
4:  After the raid1 sync completed:
   
Code: [Select]
mkfs.xfs /dev/mdXXX
5:  Reboot the system and the raid was still active...

6:  I then did a mount:

Code: [Select]
mkdir /mnt/newdisk
mount /dev/mdXXX /mnt/newdisk
rsync -arv /home/e-smith/files/ /mnt/newdisk

7:   Add the needed data to /etc/fstab to auto load the mount after a system restart:

Code: [Select]
# UUID= must be from your /mdXXX     xfs
UUID=e5b95838-1a64-42d5-bc15-d211acf5e0f1 /home/e-smith/files            xfs     uquota,gquota        0 0


I don't know what went wrong during my previous attempts...
The above seems to work though.