AlmaLinux changes: Enable Btrfs support

This commit is contained in:
Neal Gompa 2026-04-17 03:19:59 +00:00 committed by root
commit 7d04e9b2ed
2 changed files with 35 additions and 2 deletions

View File

@ -0,0 +1,28 @@
From 342802d2575a51b71560849d1f638b7d898f3398 Mon Sep 17 00:00:00 2001
From: Vojtech Trefny <vtrefny@redhat.com>
Date: Wed, 28 Jan 2026 09:35:36 +0100
Subject: [PATCH] Account for unusable space in the PV in LVMFactory
When calculating the amount of space needed in the factory, we
need to take PV metadata and alignment in account to make sure
the VG has enough free space for the LV which is being created.
Resolves: RHEL-45174
---
blivet/devicefactory.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/blivet/devicefactory.py b/blivet/devicefactory.py
index e02f6c4f8..43a9c0eb6 100644
--- a/blivet/devicefactory.py
+++ b/blivet/devicefactory.py
@@ -1442,6 +1442,9 @@ def _get_total_space(self):
space -= self.vg.free_space
# we need to account for the LVM metadata being placed somewhere
space += self.vg.lvm_metadata_space
+ # account for unusable space in the PV (difference between PV size and its usable
+ # space), this is dues to PV metadata and data alignment to
+ space += sum(pv.size - self.vg._get_pv_usable_space(pv) for pv in self.vg.parents)
else:
# we need to account for the LVM metadata being placed on each disk
# (and thus taking up to one extent from each disk)

View File

@ -5,7 +5,7 @@ Version: 3.13.0
#%%global prerelease .b2
# prerelease, if defined, should be something like .a1, .b1, .b2.dev1, or .c2
Release: 5%{?prerelease}%{?dist}.alma.1
Release: 6%{?prerelease}%{?dist}.alma.1
Epoch: 1
License: LGPL-2.1-or-later
%global realname blivet
@ -20,6 +20,7 @@ Patch0: 0001-remove-btrfs-plugin.patch
Patch2: 0002-iSCSI-dont-crash-when-LUN-ID-256.patch
Patch3: 0003-Fix-luks-save_passphrase-for-missing-format-context.patch
Patch4: 0004-Fix-getting-iSCSI-firmware-initiator-name.patch
Patch5: 0005-Account-for-unusable-space-in-the-PV-in-LVMFactory.patch
# Versions of required components (done so we make sure the buildrequires
# match the requires versions of things).
@ -117,9 +118,13 @@ make DESTDIR=%{buildroot} install
%{python3_sitelib}/*
%changelog
* Fri Feb 06 2026 Neal Gompa <ngompa@almalinux.org> - 1:3.13.0-5.alma.1
* Fri Apr 17 2026 Neal Gompa <ngompa@almalinux.org> - 1:3.13.0-6.alma.1
- AlmaLinux changes: Enable Btrfs support
* Thu Apr 16 2026 Vojtech Trefny <vtrefny@redhat.com> - 3.13.0-6
- Account for unusable space in the PV in LVMFactory
Resolves: RHEL-45174
* Wed Feb 04 2026 Vojtech Trefny <vtrefny@redhat.com> - 3.13.0-5
- Fix getting iSCSI firmware initiator name
Resolves: RHEL-145882