Skip to content

[Accton][as9957-32db] Add IMSM RAID1 boot support for ONL - #219

Merged
akenliu merged 2 commits into
accton:support_new_platform_and_syncfrom
roger530-ho:as9957_32db_support_raid
Oct 16, 2026
Merged

akenliu merged 2 commits into
accton:support_new_platform_and_syncfrom
roger530-ho:as9957_32db_support_raid

Conversation

@roger530-ho

Copy link
Copy Markdown

Activate the IMSM RAID1 volume before ONL mounts its filesystems and manage external RAID metadata across rootfs switching and shutdown. Prevent filesystem lookup from selecting raw RAID member partitions.

  • Enable CONFIG_MD_RAID1 and package static mdadm/mdmon 4.3 binaries for both the loader and runtime.
  • Detect and validate two matching NVMe RAID1 members by UUID, select available MD device numbers, and provide stable ONL device aliases.
  • Resolve filesystem labels through a verified MD partition map.
  • Use a separate /run tmpfs to preserve early boot logs and RAID state.
  • Wait for pending resync with progress reporting and stall detection, temporarily raising the speed limit and restoring it afterward.
  • Quiesce the array before init process cleanup, restart mdmon before restoring writable rootfs access, and handle runtime mdmon takeover.
  • Keep mdmon alive during shutdown and request clean RAID metadata after the root filesystem becomes read-only.

Keep the standard ONL boot flow when no IMSM RAID is detected. Require both RAID1 members; boot with a missing or failed member is not supported.

Activate the IMSM RAID1 volume before ONL mounts its filesystems and
manage external RAID metadata across rootfs switching and shutdown.
Prevent filesystem lookup from selecting raw RAID member partitions.

- Enable CONFIG_MD_RAID1 and package static mdadm/mdmon 4.3 binaries
  for both the loader and runtime.
- Detect and validate two matching NVMe RAID1 members by UUID, select
  available MD device numbers, and provide stable ONL device aliases.
- Resolve filesystem labels through a verified MD partition map.
- Use a separate /run tmpfs to preserve early boot logs and RAID state.
- Wait for pending resync with progress reporting and stall detection,
  temporarily raising the speed limit and restoring it afterward.
- Quiesce the array before init process cleanup, restart mdmon before
  restoring writable rootfs access, and handle runtime mdmon takeover.
- Keep mdmon alive during shutdown and request clean RAID metadata
  after the root filesystem becomes read-only.

Keep the standard ONL boot flow when no IMSM RAID is detected.
Require both RAID1 members; boot with a missing or failed member
is not supported.
backing-file validation to prevent repeated boot failures.
@akenliu
akenliu merged commit b85f72a into accton:support_new_platform_and_sync Oct 16, 2026
roger530-ho added a commit to roger530-ho/OpenNetworkLinux-Accton that referenced this pull request Oct 22, 2026
…NL mdraid support

Move the Intel IMSM (VROC) RAID boot support from the as9957-32db
platform package into the common ONL base, so that every x86-64
platform booting from an IMSM RAID0/RAID1 volume is handled without
per-platform code.

This reverts the platform-specific implementation added by accton#219
(platform-config/r0/src/{boot,boot.d,init.d,lib/raid}, the platform
PKG.yml/Makefile changes and the onl.mounts hook) and adds instead:

  - packages/base/any/mdadm: static mdadm/mdmon, installed as
    /sbin/mdadm and /sbin/mdmon in the loader initrd and the rootfs
  - onl.mdraid python package: discovery, read-only assembly in the
    loader, rootfs handoff (INSTALLED and SWI/NFS boot modes), takeover
    and shutdown cleanup, plus the onl-mdraid command
  - loader hooks (sysinit/boot/switchroot), /etc/boot.d/05.mdraid and
    /etc/init.d/onl-mdraid-clean in vendor-config-onl
  - onl.blockdev refuses RAID member disks

Detection is automatic: a machine without an IMSM RAID logs
"ONL mdraid: standard ONL boot" and follows the unchanged ONL flow.
akenliu pushed a commit that referenced this pull request Oct 30, 2026
…NL mdraid support (#222)

Move the Intel IMSM (VROC) RAID boot support from the as9957-32db
platform package into the common ONL base, so that every x86-64
platform booting from an IMSM RAID0/RAID1 volume is handled without
per-platform code.

This reverts the platform-specific implementation added by #219
(platform-config/r0/src/{boot,boot.d,init.d,lib/raid}, the platform
PKG.yml/Makefile changes and the onl.mounts hook) and adds instead:

  - packages/base/any/mdadm: static mdadm/mdmon, installed as
    /sbin/mdadm and /sbin/mdmon in the loader initrd and the rootfs
  - onl.mdraid python package: discovery, read-only assembly in the
    loader, rootfs handoff (INSTALLED and SWI/NFS boot modes), takeover
    and shutdown cleanup, plus the onl-mdraid command
  - loader hooks (sysinit/boot/switchroot), /etc/boot.d/05.mdraid and
    /etc/init.d/onl-mdraid-clean in vendor-config-onl
  - onl.blockdev refuses RAID member disks

Detection is automatic: a machine without an IMSM RAID logs
"ONL mdraid: standard ONL boot" and follows the unchanged ONL flow.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants