I have Intel Software RAID (Intel® VROC) configured on my Red Hat host machine, and I would like to access its status etc within a Debian-based KVM guest VM.
[root@localhost ~]# mdadm --detail-platform mdadm: imsm capabilities not found for controller: /sys/devices/pci0000:00/0000:00:17.0 (type SATA) mdadm: imsm capabilities not found for controller: /sys/devices/pci0000:00/0000:00:19.0 (type SATA) Platform : Intel(R) Virtual RAID on CPU Version : 8.5.0.1096 RAID Levels : raid0 raid1 raid10 Chunk Sizes : 4k 8k 16k 32k 64k 128k 2TB volumes : supported 2TB disks : supported Max Disks : 96 Max Volumes : 2 per array, 24 per controller 3rd party NVMe : supported I/O Controller : /sys/devices/pci0000:9a/0000:9a:00.5 (VMD) NVMe under VMD : /dev/nvme0n1 (S64FNN0X507593) Encryption(Ability|Status): SED|Unencrypted NVMe under VMD : /dev/nvme2n1 (S64FNN0X507591) Encryption(Ability|Status): SED|Unencrypted NVMe under VMD : /dev/nvme1n1 (S64FNN0X507583) Encryption(Ability|Status): SED|Unencrypted I/O Controller : /sys/devices/pci0000:c6/0000:c6:00.5 (VMD) [root@localhost ~]# sudo mdadm --detail /dev/md126 /dev/md126: Container : /dev/md/imsm, member 0 Raid Level : raid1 Array Size : 890806272 (849.54 GiB 912.19 GB) Used Dev Size : 890806272 (849.54 GiB 912.19 GB) Raid Devices : 2 Total Devices : 2 State : active Active Devices : 2 Working Devices : 2 Failed Devices : 0 Consistency Policy : resync UUID : 991e034f:faaee5eb:fc8c7c50:8482898a Number Major Minor RaidDevice State 1 259 0 0 active sync /dev/nvme0n1 0 259 2 1 active sync /dev/nvme1n1 While I understand I can use PCI passthrough to directly expose the RAID controller to the guest, I am concerned about losing access to the RAID from the host.
One approach I’ve considered is using file sharing to dump all the required RAID data into a shared file, which can then be mounted by the VM. However, this method doesn’t feel flexible enough for my needs since, after rebooting the VM, I would need to manually remount the file. I also prefer not to add mount entries in the VM’s /etc/fstab.
Is there a better way to achieve this?
