Can't Create RAID1 in Hyper-V CVM (Samsung 990 Pro 2TB) / Geometry Issue

Software-based VM-centric and flash-friendly VM storage + free version

Moderators: anton (staff), art (staff), Max (staff), Anatoly (staff)

Post Reply
Posts: 4
Joined: Tue May 14, 2024 12:24 am

Tue May 14, 2024 12:43 am

Hi Forum,

I am currently testing the StarWind VSAN free edition on what should become a 2 node Hyper-V cluster using the CVM image.

After spending a few days on the configuration I finally got it working using simple volumes.

Am using two Mellanox MCX416-ccat cards.

This is the drives info shown in the management interface:
Model: Samsung SSD 990
Firmware Version: JXD7
Serial Number: 0025_3841_4142_15C3.
Capacity: 1.82 TiB, 2.00 TB, 2000398934016 bytes
Device File: /dev/sdb

One strange thing was that I could not use the full size of the drive for a partition. I had to subtract from the offered default value of 1863 GiB, for example 1862 would work, otherwise I get the error "Error creating partition on /dev/sdb: Failed to create geometry for partition on device '/dev/sdb' (Can't have a partition outside the disk!)". Not a big deal I thought at this point. I can successfully use the createha_2 script and also the other scripts to delete targets and devices. The nodes synchronize.

The next step for me was to try RAID1.

I have two of those Samsung 990 Pro 2TB drives in each node and I wanted to RAID1 them inside of the CVM.

But when creating the RAID and selecting the two drives it gives me a similar error, even though there are no partitions on the disks:

I tried to workaround it by creating a huge partition on both disks and a small one, then deleting the huge one, with identical sizes on both disks but it seems the RAID1 creation expects the full drive.

The drives are passed through as documented in the StarWind documentation. I have NVMe RAID disabled in the physical nodes BIOS. Each node's two drives are offline in Computer Management.

Do these drives have some strange geometry causing this? Is there some way around it?

Does it make sense to try to pass the NVMe drives directly to the guests instead of using hyper-v disks (Hyper-v PCIE passthrough), deviating from the documentation? I never played with that before. Maybe that's not even possible.

I would appreciate any input.

Posts: 4
Joined: Tue May 14, 2024 12:24 am

Tue May 14, 2024 8:55 am


It's me again.

Got the issue resolved. I deleted all visible partitions on the drives from the management interface but it seems there was still some data on them preventing the RAID from being created.

I deleted it from the BIOS by enabling NVMe RAID and then from the built-in AMD Raid Manager, which has a delete drive option. After deleting the drives data and disabling the BIOS RAID again, I was able to create the RAID1 inside the CVM on both nodes as desired. :D

yaroslav (staff)
Posts: 2422
Joined: Mon Nov 18, 2019 11:11 am

Tue May 14, 2024 2:22 pm


Welcome to StarWind Forum and happy to read it worked :)
If there are any partitions on top you cannot RAID the disks again. You can also wipefs for those disks if rebooting a server is too much trouble.
Thanks again for sharing your workaround!
Post Reply