openebs / lvm-localpv

Dynamically provision Stateful Persistent Node-Local Volumes & Filesystems for Kubernetes that is integrated with a backend LVM2 data storage stack.
Apache License 2.0
245 stars 92 forks source link

how can list the logic Volume of pvc in host node ? #173

Closed tanguofu closed 2 years ago

tanguofu commented 2 years ago

Describe the problem/challenge you have [A description of the current limitation/problem/challenge that you are experiencing.]

[root@node1 ~]# ls /dev/datavg/ -lh total 0 lrwxrwxrwx 1 root root 7 Dec 27 17:23 pvc-0b6c8388-c194-463d-85f8-188e63697023 -> ../dm-0 lrwxrwxrwx 1 root root 7 Dec 27 17:41 pvc-e72ea418-0890-4cba-83bb-3f419b67da0d -> ../dm-1 [root@node1 ~]# vgdisplay --- Volume group --- VG Name datavg System ID
Format lvm2 Metadata Areas 1 Metadata Sequence No 1 VG Access read/write VG Status resizable MAX LV 0 Cur LV 0 Open LV 0 Max PV 0 Cur PV 1 Act PV 1 VG Size <1.40 TiB PE Size 4.00 MiB Total PE 367001 Alloc PE / Size 0 / 0
Free PE / Size 367001 / <1.40 TiB VG UUID VDNyXE-MqwB-Wt5A-DNhM-fzH4-hdOH-AEy2FZ

[root@node1 ~]# lvdisplay [root@node1 ~]# lvdisplay

Describe the solution you'd like [A clear and concise description of what you want to happen.]

Anything else you would like to add: [Miscellaneous information that will assist in solving the issue.]

Environment:

pawanpraka1 commented 2 years ago

@tanguofu can you run pvscan --cache on node to update the cache and then do the lvdisplay.

tanguofu commented 2 years ago

pvscan --cache

many thanks !

pawanpraka1 commented 2 years ago

thanks for confirming @tanguofu. Would you like to mention your use case in our adopters(openebs/openebs#2719) file.

git-yww commented 2 years ago

Please pay attention to whether this is a better solution @pawanpraka1.