RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1312387 - [RFE] pvresize option not available with ssm (system-storage-manager)
Summary: [RFE] pvresize option not available with ssm (system-storage-manager)
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: system-storage-manager
Version: 7.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Lukáš Czerner
QA Contact: Boyang Xue
URL:
Whiteboard:
: 1312386 (view as bug list)
Depends On:
Blocks: 1420851
TreeView+ depends on / blocked
 
Reported: 2016-02-26 15:32 UTC by Ranjith ML
Modified: 2020-05-07 05:13 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-07 05:13:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
with pvresize option and corrected indentation error. (7.23 KB, patch)
2018-07-02 13:28 UTC, Nitin Yewale
no flags Details | Diff
Keep PVsInfo accessible even after changes in Device/DeviceInfo structure in man.py. (1.33 KB, patch)
2019-11-11 12:05 UTC, Nitin Yewale
no flags Details | Diff
Infrastructure-to-resize-PV.patch (5.38 KB, patch)
2019-11-11 12:06 UTC, Nitin Yewale
no flags Details | Diff
Add functionality to resize PV (5.41 KB, application/mbox)
2019-11-11 12:07 UTC, Nitin Yewale
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2200081 0 None None None 2016-03-15 18:05:53 UTC

Description Ranjith ML 2016-02-26 15:32:06 UTC
1. Proposed title of this feature request  

 pvresize  option not available with ssm (system-storage-manager)

2. Who is the customer behind the request?  

Account: name and acct # Fleishman Hillard /   1478499
  
TAM customer: no  
SRM customer: no  
Strategic: no  

This features is required for all customers who want to extended underlying disk and its pv online using ssm utility.

3. What is the nature and description of the request?  

Need to resize PV size using "ssm" after resizing underlying disk.

4. Why does the customer need this?  

For re-sizing PV size online without any downtime.

5. Is there already an existing RFE upstream or in Red Hat Bugzilla?  
No

6. Does the customer have any specific timeline dependencies and which release would they like to target?
No

7. Is the sales team involved in this request and do they have any additional input? 
No.

8. List any affected packages or components.  
 system-storage-manager
      
9. Would the customer be able to assist in testing this functionality if implemented?
Yes.

Comment 4 Jan Tulak 2018-01-30 07:39:15 UTC
*** Bug 1312386 has been marked as a duplicate of this bug. ***

Comment 6 Nitin Yewale 2018-07-02 13:01:43 UTC
(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.

Comment 7 Nitin Yewale 2018-07-02 13:28:52 UTC
Created attachment 1455961 [details]
with pvresize option and corrected indentation error.

with pvresize option and corrected indentation error.

Comment 9 Alasdair Kergon 2018-07-02 13:33:30 UTC
(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.

Comment 10 Jan Tulak 2018-07-16 12:16:26 UTC
(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.

Comment 12 Eric Sandeen 2019-06-17 14:06:53 UTC
Lukas, please set the disposition on this bug as you see fit.
Thanks,
-Eric

Comment 13 Lukáš Czerner 2019-06-20 16:36:16 UTC
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

Comment 14 Nitin Yewale 2019-06-28 09:41:42 UTC
Hello Lukas,

Sorry for late response.

The patches are ready just need some cleanup. I shall sent them by Monday.

Thank you,
Nitin Yewale

Comment 15 Nitin Yewale 2019-07-01 16:02:32 UTC
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

Comment 16 Nitin Yewale 2019-07-18 10:01:15 UTC
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

Comment 17 Nitin Yewale 2019-11-11 12:05:39 UTC
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.

Comment 18 Nitin Yewale 2019-11-11 12:06:35 UTC
Created attachment 1634856 [details]
Infrastructure-to-resize-PV.patch

Infrastructure-to-resize-PV.

Comment 19 Nitin Yewale 2019-11-11 12:07:47 UTC
Created attachment 1634857 [details]
Add functionality to resize PV

Add functionality to resize PV

Comment 20 Nitin Yewale 2019-11-11 12:15:53 UTC
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

Comment 21 Lukáš Czerner 2020-05-07 05:13:18 UTC
It's too late in the rhel7 cycle, we're not going to introduce new functionality to ssm at this stage.


Note You need to log in before you can comment on or make changes to this bug.