Bug 1312387
Summary: | [RFE] pvresize option not available with ssm (system-storage-manager) | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Ranjith ML <rmadhuso> |
Component: | system-storage-manager | Assignee: | Lukáš Czerner <lczerner> |
Status: | CLOSED WONTFIX | QA Contact: | Boyang Xue <bxue> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.2 | CC: | agk, dwysocha, nyewale, prajnoha, xzhou, zkabelac |
Target Milestone: | rc | Keywords: | FutureFeature, Patch |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Enhancement | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-05-07 05:13:18 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1420851 | ||
Attachments: |
Description
Ranjith ML
2016-02-26 15:32:06 UTC
*** Bug 1312386 has been marked as a duplicate of this bug. *** (In reply to Nitin Yewale from comment #5) > Created attachment 1455956 [details] > Patch to add pvresize option. > > Patch to add pvresize option mentioned in the BZ. Attached patch worked for me as follows [root@stest ~]# pvs PV VG Fmt Attr PSize PFree /dev/sda2 rhel_vm252-140 lvm2 a-- <80.13g 4.00m /dev/sda3 vg1 lvm2 a-- <5.00g <3.00g /dev/sdd1 testvg lvm2 a-- <6.00g 4.82g [root@stest ~]# lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert root rhel_vm252-140 -wi-ao---- 78.12g swap rhel_vm252-140 -wi-ao---- 2.00g lv1 testvg -wi-a----- 1.17g lv1 vg1 -wi-a----- 2.00g [root@stest ~]# # ssm resize -s +200M testvg/lv1 [root@stest ssmlib]# lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert root rhel_vm252-140 -wi-ao---- 78.12g swap rhel_vm252-140 -wi-ao---- 2.00g lv1 testvg -wi-a----- <1.37g lv1 vg1 -wi-a----- 2.00g # ssm resize /dev/sdd1 [root@stest ssmlib]# pvs PV VG Fmt Attr PSize PFree /dev/sda2 rhel_vm252-140 lvm2 a-- <80.13g 4.00m /dev/sda3 vg1 lvm2 a-- <5.00g <3.00g /dev/sdd1 testvg lvm2 a-- <7.00g <5.63g Not implemented (-s --setphysicalvolumesize) as in my testing the original size of the PV is equal to underlying size of the device in the current scenario. Created attachment 1455961 [details]
with pvresize option and corrected indentation error.
with pvresize option and corrected indentation error.
(In reply to Nitin Yewale from comment #6) > Not implemented (-s --setphysicalvolumesize) as in my testing the original > size of the PV is equal to underlying size of the device in the current > scenario. Indeed - it's best not to expose that option to ssm users. (In reply to Alasdair Kergon from comment #9) > (In reply to Nitin Yewale from comment #6) > > > Not implemented (-s --setphysicalvolumesize) as in my testing the original > > size of the PV is equal to underlying size of the device in the current > > scenario. > > Indeed - it's best not to expose that option to ssm users. That would prevent the user from shrinking the PV, so the option should be there. I'm working with Nitin on another iteration of the patch. Lukas, please set the disposition on this bug as you see fit. Thanks, -Eric Hi Nitin, Jan has left the company and I know you've been working with him on this feature request. Could you please send the up-to-date version of you patches to the ssm list ? Thanks! -Lukas Hello Lukas, Sorry for late response. The patches are ready just need some cleanup. I shall sent them by Monday. Thank you, Nitin Yewale Hello Lukas, I have sent two patches (could be made 3) to the ssm list today. I would soon make them 3 as suggested by Jan, however sending two was easy for me at the moment. Sorry for the inconvenience. There are some TODOs in it for which I would need some guidance. Thank you, Nitin Yewale Hello Lukas, I have submitted patches to the ssm list in the format Keep-PVsInfo-accessible-even-after-changes-in-Device Infrastructure-to-resize-PV Add-functionality-to-resize-PV Please let me know your thoughts. Sorry for the delay. Thank you, Nitin Yewale Created attachment 1634855 [details]
Keep PVsInfo accessible even after changes in Device/DeviceInfo structure in man.py.
Keep PVsInfo accessible even after changes in Device/DeviceInfo structure in man.py.
Created attachment 1634856 [details]
Infrastructure-to-resize-PV.patch
Infrastructure-to-resize-PV.
Created attachment 1634857 [details]
Add functionality to resize PV
Add functionality to resize PV
Hello, Please find the three patches which should help in using ssm for resizing PV as per the customer requirement through this BZ. Created three patches as per the functionality they provide and per the instructions from Jan Tulak. These patches help to resize the PV in following ways Let the device size be 1G and PV size is 500M. PV used is 200M or in other words, PV free is 300M. 1. ssm command would allow to resize the PV to resize the PV to 1G ssm -f resize device 2. It could reduce the size of PV as well not below the used size ssm -f resize -s"-300M" device <--- pass ssm -f resize -s"350M" device <--- fails 3. It could extend the size of PV to 800M as well ssm -f resize -s 800M device OR ssm -f resize -s +300M device 4. ssm command would not allow the size of PV greater than underlying device size or to negative value. So below commands should fail ssm -f resize -s"-2000M" device ssm -f resize -s +2000M device ssm -f resize -s 2000M device ssm -f resize -s 150M device Not all of these functionality seems could be added in the tests. For the bash tests, I have added all the possible tests known and feasible to me. The only "TO DO" I think remaining is to move the function "get_pv_size" from misc.py to lvm.py. If could take out some time, I will need help on this. Please let me know if anything is missing. I shall clone this BZ for RHEL8 ssm as well as we would need this functionality in RHEL8. Thank you, Nitin Yewale It's too late in the rhel7 cycle, we're not going to introduce new functionality to ssm at this stage. |