mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
daemon: lvm: Only return public LVs from guestfs_lvs API (RHBZ#1278878).
When a disk image uses LVM thinp (thin provisioning), the guestfs_lvs API would return the thinp pools. This confused other APIs because thinp pools don't have corresponding /dev/VG/LV device nodes. Filter the LVs that are returned using "lv_role=public". Thanks: Fabian Deutsch
This commit is contained in:
@@ -148,7 +148,9 @@ do_lvs (void)
|
||||
|
||||
r = command (&out, &err,
|
||||
str_lvm, "lvs",
|
||||
"-o", "vg_name,lv_name", "--noheadings",
|
||||
"-o", "vg_name,lv_name",
|
||||
"-S", "lv_role=public",
|
||||
"--noheadings",
|
||||
"--separator", "/", NULL);
|
||||
if (r == -1) {
|
||||
reply_with_error ("%s", err);
|
||||
|
||||
Reference in New Issue
Block a user