-
Notifications
You must be signed in to change notification settings - Fork 59
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
fix: Fix PV grow_to_fill feature #502
fix: Fix PV grow_to_fill feature #502
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #502 +/- ##
==========================================
- Coverage 16.54% 10.73% -5.81%
==========================================
Files 2 8 +6
Lines 284 1946 +1662
Branches 79 0 -79
==========================================
+ Hits 47 209 +162
- Misses 237 1737 +1500
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
[citest] |
We need to set the `grow_to_fill` property on the LVMPV format not on the block device and the target size for the resize needs to be size of the PV, 'self._device' is the pool (VG) in this case. Related: storaged-project/blivet#1320 Resolves: RHEL-73244
We should check that LVs can be resized to 100 % of the (newly) available space in the VG after automatically growing the PVs. Related: RHEL-73244
0aeee74
to
baf6cf2
Compare
[citest] |
You'll also need to make this change:
because when the script returns rc |
that: (dev_size.bytes - actual_pv_size.stdout | int) | | ||
abs / actual_pv_size.stdout | int < 0.04 | ||
that: (dev_size.bytes - actual_pv_size.stdout | int) <= | ||
(4194304 + pv_pe_start.stdout | int) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@guazhangRH Can you try this out so we can see if this is going to cause problems with some of the devices and large disk sizes you use that typically show problems with this sort of check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test pass with tests_lvm_pool_pv_grow_nvme_generated.yml with 1T nvme test server.
ansible-playbook -i host -vv tests_lvm_pool_pv_grow_nvme_generated.yml
[root@smicro-s110p-01 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 447.1G 0 disk
├─sda1 8:1 0 600M 0 part /boot/efi
├─sda2 8:2 0 1G 0 part /boot
└─sda3 8:3 0 445.5G 0 part
├─rhel_smicro--s110p--01-root 253:0 0 70G 0 lvm /
├─rhel_smicro--s110p--01-swap 253:1 0 31.3G 0 lvm [SWAP]
└─rhel_smicro--s110p--01-home 253:2 0 344.3G 0 lvm /home
nvme4n1 259:0 0 931.5G 0 disk
nvme0n1 259:1 0 931.5G 0 disk
nvme5n1 259:5 0 931.5G 0 disk
nvme3n1 259:6 0 931.5G 0 disk
nvme1n1 259:7 0 931.5G 0 disk
nvme2n1 259:8 0 931.5G 0 disk
[root@smicro-s110p-01 ~]#
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for testing. Using the PE start value should be safe here -- that's the part of the VG metadata size which is affected by hardware specific things things like optimal IO size.
There can be some noise in the output (like python deprecation warnings).
baf6cf2
to
f085afd
Compare
Thanks, I was wondering why it was written to check the output, I should've realized that a non-zero return code will simply fail the entire execution. Unfortunately on both C9S and C10S the test is now skipped because of some noise on stdout (I was surprised that Python deperecation warnings are printed to stdout and not stderr). |
[citest] |
The issues with the PV grow feature: the code doesn't correctly set the
grow_to_fill
property for blivet and uses VG size instead of the underlying block device size for the target size for the resize action. I've fixed these and adjusted tests to actually check the PV size after resize without allowing for difference bigger than 4 MiB (one physical extent for metadata and padding) and to cover the customer issue (resizing both the PV format and LV).