Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Largeblock driver to support 4KiB drives #51

Merged
merged 1 commit into from
Apr 12, 2024
Merged

Conversation

Nambrok
Copy link

@Nambrok Nambrok commented Feb 21, 2024

No description provided.

drivers/LargeBlockSR.py Outdated Show resolved Hide resolved
drivers/LargeBlockSR.py Outdated Show resolved Hide resolved
drivers/LargeBlockSR.py Outdated Show resolved Hide resolved

@staticmethod
def handles(srtype):
return srtype == LargeBlockSR.DRIVER_TYPE
Copy link
Member

Choose a reason for hiding this comment

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

To discuss, we should probably handle "ext".

Copy link
Member

Choose a reason for hiding this comment

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

Note: only get_o_direct_capability is impacted.

drivers/LargeBlockSR.py Outdated Show resolved Hide resolved
drivers/LargeBlockSR.py Outdated Show resolved Hide resolved
drivers/LargeBlockSR.py Outdated Show resolved Hide resolved
drivers/LargeBlockSR.py Outdated Show resolved Hide resolved
drivers/LargeBlockSR.py Outdated Show resolved Hide resolved
drivers/LargeBlockSR.py Outdated Show resolved Hide resolved
drivers/LargeBlockSR.py Outdated Show resolved Hide resolved
@Nambrok Nambrok force-pushed the largeblock branch 2 times, most recently from d575990 to 9e8e8a0 Compare February 29, 2024 14:15
drivers/LargeBlockSR.py Outdated Show resolved Hide resolved
drivers/LargeBlockSR.py Outdated Show resolved Hide resolved
drivers/LargeBlockSR.py Outdated Show resolved Hide resolved
drivers/LargeBlockSR.py Outdated Show resolved Hide resolved
drivers/LargeBlockSR.py Outdated Show resolved Hide resolved
drivers/LargeBlockSR.py Outdated Show resolved Hide resolved
drivers/LargeBlockSR.py Outdated Show resolved Hide resolved
drivers/LargeBlockSR.py Outdated Show resolved Hide resolved
drivers/LargeBlockSR.py Outdated Show resolved Hide resolved
drivers/LargeBlockSR.py Outdated Show resolved Hide resolved
drivers/LargeBlockSR.py Outdated Show resolved Hide resolved
drivers/LargeBlockSR.py Outdated Show resolved Hide resolved
drivers/LargeBlockSR.py Outdated Show resolved Hide resolved
drivers/LargeBlockSR.py Outdated Show resolved Hide resolved
drivers/LargeBlockSR.py Outdated Show resolved Hide resolved
drivers/LargeBlockSR.py Outdated Show resolved Hide resolved
drivers/LargeBlockSR.py Outdated Show resolved Hide resolved
drivers/LargeBlockSR.py Outdated Show resolved Hide resolved
drivers/lvutil.py Outdated Show resolved Hide resolved
A SR inheriting from a EXTSR allowing to use a 4KiB blocksize device as
SR.
Create a 512 bytes loop device on top of a 4KiB device then give it to
EXTSR code.
It uses the same device-config as a normal local SR, i.e.
`device-config:device=/dev/nvme0n1`

After creation, the driver find the device under the VG to identify the
correct disk.
It means that creating the SR with a non-stable disk identifier is
doable and it will work as EXTSR would by ignoring the device-config
after creation.
Identifying the correct disk by using LVM infos.

The VG is created using a different prefix name from EXTSR.
It is `XSLocalLargeBlock-<SR UUID>`.

The SR artificially limits the creation to disk not being 512b.
It will throw an error if a disk whose blocksize is 512 is given.

We currently don't support multi devices, it fails at the EXTSR creation.

Sometimes the pvremove from EXTSR using the loop device fails.
In this case, we need to remove the real device from PV list ourself in
the error handling.

Signed-off-by: Damien Thenot <[email protected]>
@Nambrok Nambrok merged commit 0ffc775 into 3.0.12-8.3 Apr 12, 2024
3 checks passed
@Nambrok Nambrok deleted the largeblock branch April 12, 2024 13:09
Nambrok added a commit that referenced this pull request Apr 23, 2024
A SR inheriting from a EXTSR allowing to use a 4KiB blocksize device as
SR.
Create a 512 bytes loop device on top of a 4KiB device then give it to
EXTSR code.
It uses the same device-config as a normal local SR, i.e.
`device-config:device=/dev/nvme0n1`

After creation, the driver find the device under the VG to identify the
correct disk.
It means that creating the SR with a non-stable disk identifier is
doable and it will work as EXTSR would by ignoring the device-config
after creation.
Identifying the correct disk by using LVM infos.

The VG is created using a different prefix name from EXTSR.
It is `XSLocalLargeBlock-<SR UUID>`.

The SR artificially limits the creation to disk not being 512b.
It will throw an error if a disk whose blocksize is 512 is given.

We currently don't support multi devices, it fails at the EXTSR creation.
We added an error to explicitly say that multi devices SR is not supported
on the driver.
Before that, it would make another error:
```
Error code: SR_BACKEND_FAILURE_77
Error parameters: , Logical Volume group creation failed,
```
Sometimes the pvremove from EXTSR using the loop device fails.
In this case, we need to remove the real device from PV list ourself in
the error handling.

Signed-off-by: Damien Thenot <[email protected]>
Nambrok added a commit that referenced this pull request May 6, 2024
A SR inheriting from a EXTSR allowing to use a 4KiB blocksize device as
SR.
Create a 512 bytes loop device on top of a 4KiB device then give it to
EXTSR code.
It uses the same device-config as a normal local SR, i.e.
`device-config:device=/dev/nvme0n1`

After creation, the driver find the device under the VG to identify the
correct disk.
It means that creating the SR with a non-stable disk identifier is
doable and it will work as EXTSR would by ignoring the device-config
after creation.
Identifying the correct disk by using LVM infos.

The VG is created using a different prefix name from EXTSR.
It is `XSLocalLargeBlock-<SR UUID>`.

The SR artificially limits the creation to disk not being 512b.
It will throw an error if a disk whose blocksize is 512 is given.

We currently don't support multi devices, it fails at the EXTSR creation.
We added an error to explicitly say that multi devices SR is not supported
on the driver.
Before that, it would make another error:
```
Error code: SR_BACKEND_FAILURE_77
Error parameters: , Logical Volume group creation failed,
```
Sometimes the pvremove from EXTSR using the loop device fails.
In this case, we need to remove the real device from PV list ourself in
the error handling.

Signed-off-by: Damien Thenot <[email protected]>
Nambrok added a commit that referenced this pull request May 7, 2024
A SR inheriting from a EXTSR allowing to use a 4KiB blocksize device as
SR.
Create a 512 bytes loop device on top of a 4KiB device then give it to
EXTSR code.
It uses the same device-config as a normal local SR, i.e.
`device-config:device=/dev/nvme0n1`

After creation, the driver find the device under the VG to identify the
correct disk.
It means that creating the SR with a non-stable disk identifier is
doable and it will work as EXTSR would by ignoring the device-config
after creation.
Identifying the correct disk by using LVM infos.

The VG is created using a different prefix name from EXTSR.
It is `XSLocalLargeBlock-<SR UUID>`.

The SR artificially limits the creation to disk not being 512b.
It will throw an error if a disk whose blocksize is 512 is given.

We currently don't support multi devices, it fails at the EXTSR creation.
We added an error to explicitly say that multi devices SR is not supported
on the driver.
Before that, it would make another error:
```
Error code: SR_BACKEND_FAILURE_77
Error parameters: , Logical Volume group creation failed,
```
Sometimes the pvremove from EXTSR using the loop device fails.
In this case, we need to remove the real device from PV list ourself in
the error handling.

Signed-off-by: Damien Thenot <[email protected]>
Wescoeur pushed a commit that referenced this pull request Jun 12, 2024
A SR inheriting from a EXTSR allowing to use a 4KiB blocksize device as
SR.
Create a 512 bytes loop device on top of a 4KiB device then give it to
EXTSR code.
It uses the same device-config as a normal local SR, i.e.
`device-config:device=/dev/nvme0n1`

After creation, the driver find the device under the VG to identify the
correct disk.
It means that creating the SR with a non-stable disk identifier is
doable and it will work as EXTSR would by ignoring the device-config
after creation.
Identifying the correct disk by using LVM infos.

The VG is created using a different prefix name from EXTSR.
It is `XSLocalLargeBlock-<SR UUID>`.

The SR artificially limits the creation to disk not being 512b.
It will throw an error if a disk whose blocksize is 512 is given.

We currently don't support multi devices, it fails at the EXTSR creation.
We added an error to explicitly say that multi devices SR is not supported
on the driver.
Before that, it would make another error:
```
Error code: SR_BACKEND_FAILURE_77
Error parameters: , Logical Volume group creation failed,
```
Sometimes the pvremove from EXTSR using the loop device fails.
In this case, we need to remove the real device from PV list ourself in
the error handling.

Signed-off-by: Damien Thenot <[email protected]>
Wescoeur pushed a commit that referenced this pull request Jun 12, 2024
A SR inheriting from a EXTSR allowing to use a 4KiB blocksize device as
SR.
Create a 512 bytes loop device on top of a 4KiB device then give it to
EXTSR code.
It uses the same device-config as a normal local SR, i.e.
`device-config:device=/dev/nvme0n1`

After creation, the driver find the device under the VG to identify the
correct disk.
It means that creating the SR with a non-stable disk identifier is
doable and it will work as EXTSR would by ignoring the device-config
after creation.
Identifying the correct disk by using LVM infos.

The VG is created using a different prefix name from EXTSR.
It is `XSLocalLargeBlock-<SR UUID>`.

The SR artificially limits the creation to disk not being 512b.
It will throw an error if a disk whose blocksize is 512 is given.

We currently don't support multi devices, it fails at the EXTSR creation.
We added an error to explicitly say that multi devices SR is not supported
on the driver.
Before that, it would make another error:
```
Error code: SR_BACKEND_FAILURE_77
Error parameters: , Logical Volume group creation failed,
```
Sometimes the pvremove from EXTSR using the loop device fails.
In this case, we need to remove the real device from PV list ourself in
the error handling.

Signed-off-by: Damien Thenot <[email protected]>
benjamreis pushed a commit that referenced this pull request Jun 24, 2024
A SR inheriting from a EXTSR allowing to use a 4KiB blocksize device as
SR.
Create a 512 bytes loop device on top of a 4KiB device then give it to
EXTSR code.
It uses the same device-config as a normal local SR, i.e.
`device-config:device=/dev/nvme0n1`

After creation, the driver find the device under the VG to identify the
correct disk.
It means that creating the SR with a non-stable disk identifier is
doable and it will work as EXTSR would by ignoring the device-config
after creation.
Identifying the correct disk by using LVM infos.

The VG is created using a different prefix name from EXTSR.
It is `XSLocalLargeBlock-<SR UUID>`.

The SR artificially limits the creation to disk not being 512b.
It will throw an error if a disk whose blocksize is 512 is given.

We currently don't support multi devices, it fails at the EXTSR creation.
We added an error to explicitly say that multi devices SR is not supported
on the driver.
Before that, it would make another error:
```
Error code: SR_BACKEND_FAILURE_77
Error parameters: , Logical Volume group creation failed,
```
Sometimes the pvremove from EXTSR using the loop device fails.
In this case, we need to remove the real device from PV list ourself in
the error handling.

Signed-off-by: Damien Thenot <[email protected]>
Wescoeur pushed a commit that referenced this pull request Jun 26, 2024
A SR inheriting from a EXTSR allowing to use a 4KiB blocksize device as
SR.
Create a 512 bytes loop device on top of a 4KiB device then give it to
EXTSR code.
It uses the same device-config as a normal local SR, i.e.
`device-config:device=/dev/nvme0n1`

After creation, the driver find the device under the VG to identify the
correct disk.
It means that creating the SR with a non-stable disk identifier is
doable and it will work as EXTSR would by ignoring the device-config
after creation.
Identifying the correct disk by using LVM infos.

The VG is created using a different prefix name from EXTSR.
It is `XSLocalLargeBlock-<SR UUID>`.

The SR artificially limits the creation to disk not being 512b.
It will throw an error if a disk whose blocksize is 512 is given.

We currently don't support multi devices, it fails at the EXTSR creation.
We added an error to explicitly say that multi devices SR is not supported
on the driver.
Before that, it would make another error:
```
Error code: SR_BACKEND_FAILURE_77
Error parameters: , Logical Volume group creation failed,
```
Sometimes the pvremove from EXTSR using the loop device fails.
In this case, we need to remove the real device from PV list ourself in
the error handling.

Signed-off-by: Damien Thenot <[email protected]>
Wescoeur pushed a commit that referenced this pull request Jun 28, 2024
A SR inheriting from a EXTSR allowing to use a 4KiB blocksize device as
SR.
Create a 512 bytes loop device on top of a 4KiB device then give it to
EXTSR code.
It uses the same device-config as a normal local SR, i.e.
`device-config:device=/dev/nvme0n1`

After creation, the driver find the device under the VG to identify the
correct disk.
It means that creating the SR with a non-stable disk identifier is
doable and it will work as EXTSR would by ignoring the device-config
after creation.
Identifying the correct disk by using LVM infos.

The VG is created using a different prefix name from EXTSR.
It is `XSLocalLargeBlock-<SR UUID>`.

The SR artificially limits the creation to disk not being 512b.
It will throw an error if a disk whose blocksize is 512 is given.

We currently don't support multi devices, it fails at the EXTSR creation.
We added an error to explicitly say that multi devices SR is not supported
on the driver.
Before that, it would make another error:
```
Error code: SR_BACKEND_FAILURE_77
Error parameters: , Logical Volume group creation failed,
```
Sometimes the pvremove from EXTSR using the loop device fails.
In this case, we need to remove the real device from PV list ourself in
the error handling.

Signed-off-by: Damien Thenot <[email protected]>
benjamreis pushed a commit that referenced this pull request Aug 12, 2024
A SR inheriting from a EXTSR allowing to use a 4KiB blocksize device as
SR.
Create a 512 bytes loop device on top of a 4KiB device then give it to
EXTSR code.
It uses the same device-config as a normal local SR, i.e.
`device-config:device=/dev/nvme0n1`

After creation, the driver find the device under the VG to identify the
correct disk.
It means that creating the SR with a non-stable disk identifier is
doable and it will work as EXTSR would by ignoring the device-config
after creation.
Identifying the correct disk by using LVM infos.

The VG is created using a different prefix name from EXTSR.
It is `XSLocalLargeBlock-<SR UUID>`.

The SR artificially limits the creation to disk not being 512b.
It will throw an error if a disk whose blocksize is 512 is given.

We currently don't support multi devices, it fails at the EXTSR creation.
We added an error to explicitly say that multi devices SR is not supported
on the driver.
Before that, it would make another error:
```
Error code: SR_BACKEND_FAILURE_77
Error parameters: , Logical Volume group creation failed,
```
Sometimes the pvremove from EXTSR using the loop device fails.
In this case, we need to remove the real device from PV list ourself in
the error handling.

Signed-off-by: Damien Thenot <[email protected]>
benjamreis pushed a commit that referenced this pull request Aug 12, 2024
A SR inheriting from a EXTSR allowing to use a 4KiB blocksize device as
SR.
Create a 512 bytes loop device on top of a 4KiB device then give it to
EXTSR code.
It uses the same device-config as a normal local SR, i.e.
`device-config:device=/dev/nvme0n1`

After creation, the driver find the device under the VG to identify the
correct disk.
It means that creating the SR with a non-stable disk identifier is
doable and it will work as EXTSR would by ignoring the device-config
after creation.
Identifying the correct disk by using LVM infos.

The VG is created using a different prefix name from EXTSR.
It is `XSLocalLargeBlock-<SR UUID>`.

The SR artificially limits the creation to disk not being 512b.
It will throw an error if a disk whose blocksize is 512 is given.

We currently don't support multi devices, it fails at the EXTSR creation.
We added an error to explicitly say that multi devices SR is not supported
on the driver.
Before that, it would make another error:
```
Error code: SR_BACKEND_FAILURE_77
Error parameters: , Logical Volume group creation failed,
```
Sometimes the pvremove from EXTSR using the loop device fails.
In this case, we need to remove the real device from PV list ourself in
the error handling.

Signed-off-by: Damien Thenot <[email protected]>
benjamreis pushed a commit that referenced this pull request Aug 13, 2024
A SR inheriting from a EXTSR allowing to use a 4KiB blocksize device as
SR.
Create a 512 bytes loop device on top of a 4KiB device then give it to
EXTSR code.
It uses the same device-config as a normal local SR, i.e.
`device-config:device=/dev/nvme0n1`

After creation, the driver find the device under the VG to identify the
correct disk.
It means that creating the SR with a non-stable disk identifier is
doable and it will work as EXTSR would by ignoring the device-config
after creation.
Identifying the correct disk by using LVM infos.

The VG is created using a different prefix name from EXTSR.
It is `XSLocalLargeBlock-<SR UUID>`.

The SR artificially limits the creation to disk not being 512b.
It will throw an error if a disk whose blocksize is 512 is given.

We currently don't support multi devices, it fails at the EXTSR creation.
We added an error to explicitly say that multi devices SR is not supported
on the driver.
Before that, it would make another error:
```
Error code: SR_BACKEND_FAILURE_77
Error parameters: , Logical Volume group creation failed,
```
Sometimes the pvremove from EXTSR using the loop device fails.
In this case, we need to remove the real device from PV list ourself in
the error handling.

Signed-off-by: Damien Thenot <[email protected]>
benjamreis pushed a commit that referenced this pull request Aug 13, 2024
A SR inheriting from a EXTSR allowing to use a 4KiB blocksize device as
SR.
Create a 512 bytes loop device on top of a 4KiB device then give it to
EXTSR code.
It uses the same device-config as a normal local SR, i.e.
`device-config:device=/dev/nvme0n1`

After creation, the driver find the device under the VG to identify the
correct disk.
It means that creating the SR with a non-stable disk identifier is
doable and it will work as EXTSR would by ignoring the device-config
after creation.
Identifying the correct disk by using LVM infos.

The VG is created using a different prefix name from EXTSR.
It is `XSLocalLargeBlock-<SR UUID>`.

The SR artificially limits the creation to disk not being 512b.
It will throw an error if a disk whose blocksize is 512 is given.

We currently don't support multi devices, it fails at the EXTSR creation.
We added an error to explicitly say that multi devices SR is not supported
on the driver.
Before that, it would make another error:
```
Error code: SR_BACKEND_FAILURE_77
Error parameters: , Logical Volume group creation failed,
```
Sometimes the pvremove from EXTSR using the loop device fails.
In this case, we need to remove the real device from PV list ourself in
the error handling.

Signed-off-by: Damien Thenot <[email protected]>
benjamreis pushed a commit that referenced this pull request Aug 13, 2024
A SR inheriting from a EXTSR allowing to use a 4KiB blocksize device as
SR.
Create a 512 bytes loop device on top of a 4KiB device then give it to
EXTSR code.
It uses the same device-config as a normal local SR, i.e.
`device-config:device=/dev/nvme0n1`

After creation, the driver find the device under the VG to identify the
correct disk.
It means that creating the SR with a non-stable disk identifier is
doable and it will work as EXTSR would by ignoring the device-config
after creation.
Identifying the correct disk by using LVM infos.

The VG is created using a different prefix name from EXTSR.
It is `XSLocalLargeBlock-<SR UUID>`.

The SR artificially limits the creation to disk not being 512b.
It will throw an error if a disk whose blocksize is 512 is given.

We currently don't support multi devices, it fails at the EXTSR creation.
We added an error to explicitly say that multi devices SR is not supported
on the driver.
Before that, it would make another error:
```
Error code: SR_BACKEND_FAILURE_77
Error parameters: , Logical Volume group creation failed,
```
Sometimes the pvremove from EXTSR using the loop device fails.
In this case, we need to remove the real device from PV list ourself in
the error handling.

Signed-off-by: Damien Thenot <[email protected]>
Wescoeur pushed a commit that referenced this pull request Oct 3, 2024
A SR inheriting from a EXTSR allowing to use a 4KiB blocksize device as
SR.
Create a 512 bytes loop device on top of a 4KiB device then give it to
EXTSR code.
It uses the same device-config as a normal local SR, i.e.
`device-config:device=/dev/nvme0n1`

After creation, the driver find the device under the VG to identify the
correct disk.
It means that creating the SR with a non-stable disk identifier is
doable and it will work as EXTSR would by ignoring the device-config
after creation.
Identifying the correct disk by using LVM infos.

The VG is created using a different prefix name from EXTSR.
It is `XSLocalLargeBlock-<SR UUID>`.

The SR artificially limits the creation to disk not being 512b.
It will throw an error if a disk whose blocksize is 512 is given.

We currently don't support multi devices, it fails at the EXTSR creation.
We added an error to explicitly say that multi devices SR is not supported
on the driver.
Before that, it would make another error:
```
Error code: SR_BACKEND_FAILURE_77
Error parameters: , Logical Volume group creation failed,
```
Sometimes the pvremove from EXTSR using the loop device fails.
In this case, we need to remove the real device from PV list ourself in
the error handling.

Signed-off-by: Damien Thenot <[email protected]>
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.

4 participants