Bug 1853682
| Summary: | [RFE] Enable discard support for pvmove command when "issue_discards = 1" set in /etc/lvm/lvm.conf | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Rupesh Girase <rgirase> |
| Component: | lvm2 | Assignee: | Zdenek Kabelac <zkabelac> |
| lvm2 sub component: | Command-line tools | QA Contact: | cluster-qe <cluster-qe> |
| Status: | NEW --- | Docs Contact: | |
| Severity: | unspecified | ||
| Priority: | medium | CC: | agk, heinzm, jbrassow, msnitzer, pasik, prajnoha, thornber, zkabelac |
| Version: | 8.2 | Keywords: | FutureFeature, Triaged |
| Target Milestone: | rc | ||
| Target Release: | 8.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 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: | |||
|
Description
Rupesh Girase
2020-07-03 14:38:16 UTC
Clearly the discard can be send only to 'UNUSED' devices - so if you want to discard while PV - such device should be already removed from VG (aka vgreduce vg /dev/sdaX ; blkdiscard /dev/sdaX) If the user want to 'dicard' all teh free space in VG left after pvmove - he can try to allocate temporary LV and discard such LV - aka 'vgcreate -l100%free -n tmplv vg ; blkdiscard /dev/vg/tmplv; lvremove vg/tmplv' Note: lvm2 team discourage to use issue_discard=1 as it makes any 'vgcfgrestore' operation mostly useless - so the explicit workaround above makes the action way more 'explicit' and usually admin is aware about consequences in this case. I'm looking into this issue for a while - it has several problems - if we want to provide support for all modes of pvmove - it's not so easy since do in 1 commit dropping mirror and replaing it with error target. I'm still in process of thinking how to introduce discard without breaking compatibility. Side step around could be to collect regions and after commit submit discard - this has one drawback - if the thing fail during these steps - the operation is not repeatable since mapping are already gone. But it has clearly the lowest complexity. |