Bug 1647549
| Summary: | raid volume phy devices - should 'lvs -o devices' not show all phy devices? | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | lejeczek <peljasz> |
| Component: | lvm2 | Assignee: | LVM and device-mapper development team <lvm-team> |
| lvm2 sub component: | Displaying and Reporting | QA Contact: | cluster-qe <cluster-qe> |
| Status: | CLOSED NOTABUG | Docs Contact: | |
| Severity: | high | ||
| Priority: | unspecified | CC: | agk, cmarthal, heinzm, jbrassow, msnitzer, prajnoha, prockai, zkabelac |
| Version: | 7.5 | ||
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-11-15 19:11:21 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: | |||
|
Description
lejeczek
2018-11-07 18:05:02 UTC
Is "+devices" the output mapping you're looking for? [root@host-073 ~]# pvscan PV /dev/sda1 VG myvg lvm2 [<12.49 GiB / 11.15 GiB free] PV /dev/sdc1 VG myvg lvm2 [<12.49 GiB / 11.15 GiB free] PV /dev/sdd1 VG myvg lvm2 [<12.49 GiB / 11.15 GiB free] [root@host-073 ~]# lvs -a -o +devices LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert Devices mylv myvg rwi-a-r--- 2.00g mylv_rimage_0(0),mylv_rimage_1(0),mylv_rimage_2(0) mylv2 myvg rwi-a-r--- 2.00g mylv2_rimage_0(0),mylv2_rimage_1(0),mylv2_rimage_2(0) [mylv2_rimage_0] myvg iwi-aor--- 684.00m /dev/sda1(171) [mylv2_rimage_1] myvg iwi-aor--- 684.00m /dev/sdc1(171) [mylv2_rimage_2] myvg iwi-aor--- 684.00m /dev/sdd1(171) [mylv_rimage_0] myvg iwi-aor--- 684.00m /dev/sda1(0) [mylv_rimage_1] myvg iwi-aor--- 684.00m /dev/sdc1(0) [mylv_rimage_2] myvg iwi-aor--- 684.00m /dev/sdd1(0) [root@host-073 ~]# lvs -a -o +devices myvg LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert Devices mylv myvg rwi-a-r--- 2.00g mylv_rimage_0(0),mylv_rimage_1(0),mylv_rimage_2(0) mylv2 myvg rwi-a-r--- 2.00g mylv2_rimage_0(0),mylv2_rimage_1(0),mylv2_rimage_2(0) [mylv2_rimage_0] myvg iwi-aor--- 684.00m /dev/sda1(171) [mylv2_rimage_1] myvg iwi-aor--- 684.00m /dev/sdc1(171) [mylv2_rimage_2] myvg iwi-aor--- 684.00m /dev/sdd1(171) [mylv_rimage_0] myvg iwi-aor--- 684.00m /dev/sda1(0) [mylv_rimage_1] myvg iwi-aor--- 684.00m /dev/sdc1(0) [mylv_rimage_2] myvg iwi-aor--- 684.00m /dev/sdd1(0) [root@host-073 ~]# vgs -a -o +devices VG #PV #LV #SN Attr VSize VFree Devices myvg 3 2 0 wz--n- 37.46g <33.46g mylv_rimage_0(0),mylv_rimage_1(0),mylv_rimage_2(0) myvg 3 2 0 wz--n- 37.46g <33.46g mylv2_rimage_0(0),mylv2_rimage_1(0),mylv2_rimage_2(0) myvg 3 2 0 wz--n- 37.46g <33.46g /dev/sda1(0) myvg 3 2 0 wz--n- 37.46g <33.46g /dev/sdc1(0) myvg 3 2 0 wz--n- 37.46g <33.46g /dev/sdd1(0) myvg 3 2 0 wz--n- 37.46g <33.46g /dev/sda1(171) myvg 3 2 0 wz--n- 37.46g <33.46g /dev/sdc1(171) myvg 3 2 0 wz--n- 37.46g <33.46g /dev/sdd1(171) Nope, it is not. You can see I was using: -o devices. One more time: $ lvs --segments -a -o +devices 5tb.Toshiba-Lot/raid5 LV VG Attr #Str Type SSize Devices raid5 5tb.Toshiba-Lot rwi-a-r--- 10 raid5 40.94t raid5_rimage_0(0),raid5_rimage_1(0),raid5_rimage_2(0),raid5_rimage_3(0),raid5_rimage_4(0),raid5_rimage_5(0),raid5_rimage_6(0),raid5_rimage_7(0),raid5_rimage_8(0),raid5_rimage_9(0) And like I said... It would be really nice, great! to have a command that would give out that info, when one needs to see one SPECIFIC(not the whole lot) LV's phy devices. I compared an output of raid0: /dev/sdar(0),/dev/sdas(0),/dev/sdat(0),/dev/sdau(0) where lvm resolves back to dm devices, so in the output of the same command for raid5(>?) we would also get the same/similar list of device mapper/block devices. logical volumes that use the dm-raid target (segment types: raid0,raid1,raid10,raid4/5/6 - not "striped" or "mirror") will have logical volumes as the sub-LVs that compose the array. You will need to drill down into those sub-LVs to get the devices they are on. Many logical volume types have this property where they are built upon lower-level logical volumes - the raid types, thin-provisioning, caching, etc. Maybe as a feature request? - LVM is already pretty neat toolset with fantastic man pages, but if there was something that could make the whole experience even better then that would be this thing in my option. So we admins/users would not have drill any further. many thanks, L. |