Bug 1334678
| Summary: | Make it possible to query lvm2 command status report | ||
|---|---|---|---|
| Product: | [Community] LVM and device-mapper | Reporter: | Peter Rajnoha <prajnoha> |
| Component: | lvm2 | Assignee: | Peter Rajnoha <prajnoha> |
| lvm2 sub component: | Displaying and Reporting | QA Contact: | cluster-qe <cluster-qe> |
| Status: | CLOSED UPSTREAM | Docs Contact: | |
| Severity: | low | ||
| Priority: | medium | CC: | agk, heinzm, jbrassow, msnitzer, pasik, prajnoha, zkabelac |
| Version: | unspecified | Flags: | prajnoha:
lvm-technical-solution+
rule-engine: lvm-test-coverage? |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-08-24 08:40:16 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: | 1334674 | ||
| Bug Blocks: | 1334682, 1346079 | ||
|
Description
Peter Rajnoha
2016-05-10 10:22:55 UTC
LVM2 supports this feature since lvm2 2.02.158 with the "lastlog" command together with keeping data from any last report. This works while running commands in LVM shell. Then, it's possible to call lastlog as many times as needed with different possible selections (-S|--select). See also "man 7 lvmreport" for more information. Example: # lvm lvm> lvs Logical Volume ============== LV LSize Cpy%Sync lvol1 4.00m 100.00 lvol0 4.00m Command Log =========== Seq LogType Context ObjType ObjName ObjGrp Msg Errno RetCode 1 status processing lv lvol0 vg success 0 1 2 status processing lv lvol1 vg success 0 1 3 status processing vg vg success 0 1 4 status shell cmd lvs success 0 1 lvm> lastlog Command Log =========== Seq LogType Context ObjType ObjName ObjGrp Msg Errno RetCode 1 status processing lv lvol0 vg success 0 1 2 status processing lv lvol1 vg success 0 1 3 status processing vg vg success 0 1 4 status shell cmd lvs success 0 1 lvm> lastlog -S log_object_type=lv Command Log =========== Seq LogType Context ObjType ObjName ObjGrp Msg Errno RetCode 1 status processing lv lvol0 vg success 0 1 2 status processing lv lvol1 vg success 0 1 lvm> lastlog -S log_context=shell Command Log =========== Seq LogType Context ObjType ObjName ObjGrp Msg Errno RetCode 4 status shell cmd lvs success 0 1 lvm> abc Command Log =========== Seq LogType Context ObjType ObjName ObjGrp Msg Errno RetCode 1 error shell cmd abc No such command 'abc'. Try 'help'. -1 0 2 status shell cmd abc failure -1 2 |