Skip to content

Latest commit

 

History

147 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libraidmeta

A C library that translates RAID metadata between Linux native 1.2 format and Intel IMSM/ISM (Intel Matrix Storage Manager) format.

Purpose

Linux software RAID arrays use native MD metadata that is invisible to firmware. GRAID's VROC UEFI driver is heavy integrated with IMSM. libraidmeta bridges that gap. It converts native 1.2 superblocks into IMSM buffers so the UEFI driver can see the array at boot, and converts IMSM MPBs back into native so Linux can sume managing the array after boot.

The library performs no I/O. Callers supply raw in-memory buffers read from each member device; the library reads, converts, and returns new buffers. Writing those buffers back to disk is the caller's responsibility.

Conversions

Native → IMSM (raidmeta_convert_native_to_imsm)

Converts existing native MD mdp_superblock_1 superblocks into an IMSM MPB buffer. The resulting MPB is what gets handed to the UEFI driver so it can recognise the array at firmware level. All member devices of the same array are processed together; the library groups them by UUID and produces one shared MPB that is copied to every member.

IMSM → Native (raidmeta_convert_imsm_to_native)

Translates a (possibly modified) IMSM MPB buffer back into a native mdp_superblock_1 superblock so Linux can resume managing the array. Because IMSM does not carry all fields present in native metadata, the caller may supply the original native superblock (init_mdp) alongside the IMSM buffer; information that cannot be reconstructed from IMSM alone is recovered from that original.

If original is not set set of has different uuid, it assumes that this is fresh array created in UEFI environment, in that case some properties are constructed to guarantee compatibility.

Headers

Header Contents
include/raidmeta/raid_meta_lib.h Conversion API, status codes, device structs
include/raidmeta/raid_meta_debug.h JSON serialisation helpers (debug/test only)

Build

make

Produces:

  • src/lib/build/libraidmeta.a — production conversion library
  • src/debug/build/libraidmeta_debug.a — JSON dump/load helpers (debug and testing)
  • apps/converter/converter — CLI tool that drives both libraries

Link libraidmeta_debug.a before libraidmeta.a when both are needed, as the debug library depends on symbols from the production library.

About

Library developed for conversion IMSM metadata to Linux native 1.2 metadata

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages