LargeBlockSR for 4KiB blocksize disks
-
Hello,
As some of you may know, there is currently a problem with disks with blocksize of 4KiB not being compatible to be a SR disk.
It is an error with thevhd-util
utilities that is not easily fixed.
As such, we quickly developed a SMAPI driver usinglosetup
ability to emulate another sector size to be able to workaround the problem for the moment.The real solution will involve SMAPIv3, which the first driver is available to test: https://xcp-ng.org/blog/2024/04/19/first-smapiv3-driver-is-available-in-preview/
To go back to the LargeBlock driver, it is available in 8.3 in sm 3.0.12-12.2.
To set it up, it is as simple as creating a EXT SR with
xe
CLI but withtype=largeblock
.xe sr-create host-uuid=<host UUID> type=largeblock name-label="LargeBlock SR" device-config:device=/dev/nvme0n1
It does not support using multiple devices because of quirks with LVM and the EXT SR driver.
It automatically creates a loop device with a sector size of 512b on top of the 4KiB device and then creates a EXT SR on top of this emulated device.
This driver is a workaround, we have automated tests but they can't catch all things.
If you have any feedbacks or problems, don't hesitate to share here -
S stormi referenced this topic on
-
Hello again,
It is now available in 8.2.1 with the testing packages, you can install them by enabling the testing repository and updating.
Available in sm 2.30.8-10.2.yum update --enablerepo=xcp-ng-testing sm xapi-core xapi-xe xapi-doc
You then need to restart the toolstack.
Afterwards, you can create SR with the command in the above post. -
S stormi referenced this topic on
-
@dthenot said in LargeBlockSR for 4KiB blocksize disks:
Hello again,
It is now available in 8.2.1 with the testing packages, you can install them by enabling the testing repository and updating.
Available in sm 2.30.8-10.2.yum update --enablerepo=xcp-ng-testing sm xapi-core xapi-xe xapi-doc
You then need to restart the toolstack.
Afterwards, you can create SR with the command in the above post.Update: now the driver is available on any up to date XCP-ng 8.2.1 or 8.3. No need to try to update from testing repositories (you might get something unexpected).
-
Is there a way to enable this on an SR without using the xe cli? Can we specify this as an option during SR creation from XO? Or did this become the normal way to create an SR? I have both 8.2.x and 8.3, Truenas Scale and NFS shares on both.
-
@Greg_E It is a separate SR type that you can select when you create a SR in Xen Orchestra.
It's also just local SR. For NFS you still use the NFS storage driver.
-
Thanks, I was wondering if that was the case from reading the other threads.
-
@dthenot Are multiple SR-s with type=largeblock supported on the same host?
-
I don't see any reason it couldn't, but I prefer @dthenot to answer