Skip to content

host: include mdadm RAID devices in disk detection#447

Merged
stormi merged 1 commit into
masterfrom
gln/mdadm-raid-detection-lxkz
May 12, 2026
Merged

host: include mdadm RAID devices in disk detection#447
stormi merged 1 commit into
masterfrom
gln/mdadm-raid-detection-lxkz

Conversation

@glehmann
Copy link
Copy Markdown
Member

@glehmann glehmann commented Mar 30, 2026

This PR is part of a tree containing 19 PRs:

  1. master
  2. storage: avoid removing the xva/vdi before going in the debugger #436master
  3. storage: test large volumes #437storage: avoid removing the xva/vdi before going in the debugger #436
  4. "host: include mdadm RAID devices in disk detection" (this PR) → storage: test large volumes #437
  5. Update randstream to 0.5.0 #446host: include mdadm RAID devices in disk detection #447
  6. storage: Avoid writing the whole device in coalesce tests #449Update randstream to 0.5.0 #446
  7. storage: avoid writing the whole device in migration tests #450storage: Avoid writing the whole device in coalesce tests #449
  8. xva/vdi: only write a small data amount in large volumes for faster tests #452storage: avoid writing the whole device in migration tests #450
  9. storage: test full device write #453xva/vdi: only write a small data amount in large volumes for faster tests #452
  10. storage: test that we can't create a vdi over its max allowed size #454storage: test full device write #453
  11. storage: add jobs for large volume tests #461storage: test that we can't create a vdi over its max allowed size #454
  12. skip large volume tests for zvol and nfsv4 #464storage: add jobs for large volume tests #461
  13. storage: add comprehensive tests for lvmohba storage repositories #470skip large volume tests for zvol and nfsv4 #464
  14. storage: free space for XVA import by destroying source VM first #471storage: add comprehensive tests for lvmohba storage repositories #470
  15. storage: limit data written per VDI with --write-volume-cap #481storage: free space for XVA import by destroying source VM first #471
  16. Add Packer configuration to build a minimal Alpine 3.23 UEFI VM for XCP-ng tests #523storage: limit data written per VDI with --write-volume-cap #481
  17. migration: create a xfs sr on the second host for intra/cross-pool migration #497storage: limit data written per VDI with --write-volume-cap #481
  18. Enhance block device management #498migration: create a xfs sr on the second host for intra/cross-pool migration #497
  19. Add VHD_MAX and QCOW2_MAX symbolic size constants #500Enhance block device management #498
  20. partially_populate_device: align span positions to block size for better performance #509Add VHD_MAX and QCOW2_MAX symbolic size constants #500

@glehmann glehmann requested a review from a team as a code owner March 30, 2026 18:39
@glehmann glehmann force-pushed the gln/mdadm-raid-detection-lxkz branch from cfc6b2d to 88817d6 Compare March 30, 2026 19:28
Comment thread lib/host.py
(
disk
for disk in self.block_devices_info
if (not disk["pkname"] or disk['type'] == 'raid0') and disk['kname'] not in pknames
Copy link
Copy Markdown
Contributor

@olivierh-pro olivierh-pro Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: Maybe in the future, it could be great to implement a class BlockDevice with appropriates methods to enhance readability and intent. eg:

my_block = BlockDevice()
my_block.has_children()
my_block.is_raid()

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

100% agree, we should make that cleaner, but this one works with only a few changes, so I'll keep it for another PR if you don't mind :)

@olivierh-pro olivierh-pro requested a review from a team March 31, 2026 14:20
@glehmann glehmann force-pushed the gln/mdadm-raid-detection-lxkz branch from 88817d6 to ea4bbd2 Compare March 31, 2026 18:27
@glehmann glehmann force-pushed the gln/storage-volume-size-support-vzxu branch from a11ecb2 to 9b0818e Compare March 31, 2026 20:33
@glehmann glehmann force-pushed the gln/mdadm-raid-detection-lxkz branch from ea4bbd2 to 1ca167d Compare March 31, 2026 20:33
@glehmann glehmann force-pushed the gln/storage-volume-size-support-vzxu branch from 9b0818e to 5800d41 Compare March 31, 2026 20:36
@glehmann glehmann force-pushed the gln/mdadm-raid-detection-lxkz branch from 1ca167d to 0d5b7e0 Compare March 31, 2026 20:36
@glehmann glehmann force-pushed the gln/storage-volume-size-support-vzxu branch from 5800d41 to a6a78f3 Compare April 7, 2026 13:20
@glehmann glehmann force-pushed the gln/mdadm-raid-detection-lxkz branch 2 times, most recently from 5a70972 to aefdeee Compare April 7, 2026 13:32
@glehmann glehmann force-pushed the gln/storage-volume-size-support-vzxu branch from a6a78f3 to 0f07c9b Compare April 7, 2026 13:32
@glehmann glehmann force-pushed the gln/storage-volume-size-support-vzxu branch from 0f07c9b to f9ef7d9 Compare April 8, 2026 20:28
@glehmann glehmann force-pushed the gln/mdadm-raid-detection-lxkz branch 2 times, most recently from 36e3f27 to c087f3f Compare April 8, 2026 21:22
@glehmann glehmann force-pushed the gln/storage-volume-size-support-vzxu branch from f9ef7d9 to b6785fe Compare April 8, 2026 21:22
Copy link
Copy Markdown
Member

@stormi stormi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would appreciate a commit message which conforms to https://docs.xcp-ng.org/project/development-process/commit-message-conventions/

Commit messages must always describe the problem they solve.

I'll approve anyway given the size of the commit.

@glehmann glehmann force-pushed the gln/storage-volume-size-support-vzxu branch from b6785fe to 942d050 Compare April 9, 2026 05:39
@glehmann glehmann force-pushed the gln/storage-volume-size-support-vzxu branch from f4248cf to eb0eac0 Compare April 15, 2026 16:18
@glehmann glehmann force-pushed the gln/mdadm-raid-detection-lxkz branch from 55afccc to 391e5c2 Compare April 15, 2026 16:18
@glehmann glehmann changed the title Add mdadm RAID support to disk detection host: include mdadm RAID devices in disk detection Apr 16, 2026
@glehmann glehmann force-pushed the gln/storage-volume-size-support-vzxu branch from eb0eac0 to 9ade0b0 Compare April 16, 2026 18:00
@glehmann glehmann force-pushed the gln/mdadm-raid-detection-lxkz branch 2 times, most recently from 89f4a1e to caa6494 Compare April 17, 2026 13:52
@glehmann glehmann force-pushed the gln/storage-volume-size-support-vzxu branch 2 times, most recently from a63e581 to d7826f6 Compare April 21, 2026 06:08
@glehmann glehmann force-pushed the gln/mdadm-raid-detection-lxkz branch 2 times, most recently from 68e4d09 to 3030f33 Compare April 24, 2026 14:56
@glehmann glehmann requested review from a team as code owners April 24, 2026 14:56
@glehmann glehmann force-pushed the gln/storage-volume-size-support-vzxu branch from d7826f6 to a29798c Compare April 24, 2026 14:57
@glehmann glehmann removed the request for review from a team April 28, 2026 11:43
@glehmann glehmann force-pushed the gln/mdadm-raid-detection-lxkz branch from 3030f33 to 1b5757b Compare April 29, 2026 17:39
@glehmann glehmann force-pushed the gln/storage-volume-size-support-vzxu branch from a29798c to 9d399c6 Compare April 29, 2026 17:39
Detect RAID devices and exclude child devices to properly enumerate all
available disks including software RAID arrays.

Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>
@glehmann glehmann force-pushed the gln/mdadm-raid-detection-lxkz branch from 1b5757b to 5b525a6 Compare May 11, 2026 15:49
Base automatically changed from gln/storage-volume-size-support-vzxu to master May 12, 2026 12:48
@stormi stormi merged commit 425c896 into master May 12, 2026
9 checks passed
@stormi stormi deleted the gln/mdadm-raid-detection-lxkz branch May 12, 2026 12:50
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.

6 participants