search for: lv_attr

Displaying 20 results from an estimated 29 matches for "lv_attr".

2017 Jul 14
0
[PATCH 14/27] daemon: Reimplement ‘lvs’ API in OCaml.
...l \ realpath.ml \ diff --git a/daemon/lvm.c b/daemon/lvm.c index 5d12b009f..072bf53b4 100644 --- a/daemon/lvm.c +++ b/daemon/lvm.c @@ -103,89 +103,6 @@ convert_lvm_output (char *out, const char *prefix) return take_stringsbuf (&ret); } -/* Filter a colon-separated output of - * lvs -o lv_attr,vg_name,lv_name - * removing thin layouts, and building the device path as we expect it. - * - * This is used only when lvm has no -S. - */ -static char ** -filter_convert_old_lvs_output (char *out) -{ - char *p, *pend; - CLEANUP_FREE_STRINGSBUF DECLARE_STRINGSBUF (ret); - - p = out; - while (p...
2016 Jan 27
4
[PATCH] lvm: support lvm2 older than 2.02.107
...t; #include <sys/stat.h> #include <dirent.h> +#include <assert.h> #include "daemon.h" #include "c-ctype.h" @@ -103,6 +104,85 @@ convert_lvm_output (char *out, const char *prefix) return ret.argv; } +/* Filter a colon-separated output of + * lvs -o lv_attr,vg_name,lv_name + * removing thin layouts, and building the device path as we expect it. + * + * This is used only when lvm has no -S. + */ +static char ** +filter_convert_old_lvs_output (char *out) +{ + char *p, *pend; + DECLARE_STRINGSBUF (ret); + + p = out; + while (p) { + size_t len; +...
2016 Feb 12
1
[PATCH] daemon: lvm: Ignore LVs with the activationskip flag set (RHBZ#1306666).
..._full' is unaffected by this change. --- daemon/lvm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/daemon/lvm.c b/daemon/lvm.c index 8bef4d5..529e20d 100644 --- a/daemon/lvm.c +++ b/daemon/lvm.c @@ -157,6 +157,10 @@ filter_convert_old_lvs_output (char *out) if (lv_attr[0] == 't') goto skip_line; + /* Ignore activationskip (RHBZ#1306666). */ + if (strlen (lv_attr) >= 10 && lv_attr[9] == 'k') + goto skip_line; + /* Ignore "unknown device" message (RHBZ#1054761). */ if (STRNEQ (p, "unknown devic...
2016 Jan 28
0
[PATCH v2] lvm: support lvm2 older than 2.02.107
...nged, 136 insertions(+), 11 deletions(-) diff --git a/daemon/lvm.c b/daemon/lvm.c index 979cf63..8bef4d5 100644 --- a/daemon/lvm.c +++ b/daemon/lvm.c @@ -103,6 +103,85 @@ convert_lvm_output (char *out, const char *prefix) return ret.argv; } +/* Filter a colon-separated output of + * lvs -o lv_attr,vg_name,lv_name + * removing thin layouts, and building the device path as we expect it. + * + * This is used only when lvm has no -S. + */ +static char ** +filter_convert_old_lvs_output (char *out) +{ + char *p, *pend; + DECLARE_STRINGSBUF (ret); + + p = out; + while (p) { + size_t len; +...
2015 Jan 28
4
[PATCH 0/3] sparsify: Ignore read-only LVs (RHBZ#1185561).
virt-sparsify shouldn't die if sparsifying a filesystem that contains read-only LVs. https://bugzilla.redhat.com/show_bug.cgi?id=1185561 I thought about trying to make the LV writable temporarily, but I suspect that if the sysadmin has made the LV read-only, then they probably did it for a reason, so we shouldn't touch it. Rich.
2015 Jan 28
0
[PATCH 3/3] sparsify: Ignore read-only LVs (RHBZ#1185561).
...ng fs = warning ~prog fs let info fs = info ~prog fs let quote = Filename.quote + +(* Return true if the filesystem is a read-only LV (RHBZ#1185561). *) +let is_read_only_lv (g : G.guestfs) = + let lvs = Array.to_list (g#lvs_full ()) in + let romap = List.map ( + fun { G.lv_uuid = lv_uuid; lv_attr = lv_attr } -> + lv_uuid, lv_attr.[1] = 'r' + ) lvs in + fun fs -> + if g#is_lv fs then ( + let uuid = g#lvuuid fs in + assoc ~cmp:compare_lvm2_uuids ~default:false uuid romap + ) + else false -- 2.1.0
2015 Jan 28
1
Re: [PATCH 3/3] sparsify: Ignore read-only LVs (RHBZ#1185561).
...info ~prog fs > > let quote = Filename.quote > + > +(* Return true if the filesystem is a read-only LV (RHBZ#1185561). *) > +let is_read_only_lv (g : G.guestfs) = > + let lvs = Array.to_list (g#lvs_full ()) in > + let romap = List.map ( > + fun { G.lv_uuid = lv_uuid; lv_attr = lv_attr } -> > + lv_uuid, lv_attr.[1] = 'r' > + ) lvs in > + fun fs -> > + if g#is_lv fs then ( > + let uuid = g#lvuuid fs in > + assoc ~cmp:compare_lvm2_uuids ~default:false uuid romap > + ) > + else false This looks to me that it...
2016 Jul 07
7
[PATCH 0/3] fix btrfs subvolume procession in tools
This patcheset fixes errors in virt-sysprep and virt-sparsify. Here we have a common functionality: is_btrfs_subvolume. Doesn't it make sense to turn it into guestfs API? Also I found an issue. In 'virt-sysprep fs-uuids', the uuids for ALL filesystems are regenerated as many times as many roots are in guest. Is it done intentionally? Maxim Perevedentsev (3): mllib: add checking
2016 Jul 07
0
[PATCH 2/3] sparsify: fix btrfs subvolume processing in is_read_only_lv
...lse' for subvolumes. --- sparsify/utils.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sparsify/utils.ml b/sparsify/utils.ml index 9a49504..8d99db1 100644 --- a/sparsify/utils.ml +++ b/sparsify/utils.ml @@ -34,7 +34,8 @@ let is_read_only_lv (g : G.guestfs) = if lv_attr.[1] = 'r' then Some lv_uuid else None ) lvs in fun fs -> - if g#is_lv fs then ( + (* Btrfs subvolumes are NOT read-only LVs *) + if not (is_btrfs_subvolume g fs) && g#is_lv fs then ( let uuid = g#lvuuid fs in List.exists (fun u -> compare_lvm2_uuid...
2016 Jul 26
0
[PATCH 4/5] daemon: lvm: list PVs/VGs/LVs with --foreign
...public && lv_skip_activation!=1", "--noheadings", @@ -277,6 +278,7 @@ do_lvs (void) } else { r = command (&out, &err, str_lvm, "lvs", + "--foreign", "-o", "lv_attr,vg_name,lv_name", "--noheadings", "--separator", ":", NULL); @@ -718,7 +720,7 @@ get_lvm_field (const char *cmd, const char *field, const char *device) char *out; CLEANUP_FREE char *err = NULL; int r = command (&out...
2017 Jun 05
19
[PATCH v3 00/19] Allow APIs to be implemented in OCaml.
v2 was here: https://www.redhat.com/archives/libguestfs/2017-June/msg00008.html This series gets as far as a working (and faster) reimplementation of ‘guestfs_list_filesystems’. I also have another patch series on top of this one which reimplements the inspection APIs inside the daemon, but that needs a bit more work still, since inspection turns out to be a very large piece of code. Rich.
2017 Oct 04
0
[PATCH 2/9] ocaml: Replace pattern matching { field = field } with { field }.
...ify/utils.ml b/sparsify/utils.ml index 27723c3a2..facf466a8 100644 --- a/sparsify/utils.ml +++ b/sparsify/utils.ml @@ -28,7 +28,7 @@ module G = Guestfs let is_read_only_lv (g : G.guestfs) = let lvs = Array.to_list (g#lvs_full ()) in let ro_uuids = filter_map ( - fun { G.lv_uuid = lv_uuid; lv_attr = lv_attr } -> + fun { G.lv_uuid; lv_attr } -> if lv_attr.[1] = 'r' then Some lv_uuid else None ) lvs in fun fs -> diff --git a/sysprep/main.ml b/sysprep/main.ml index 634254d41..75aba578b 100644 --- a/sysprep/main.ml +++ b/sysprep/main.ml @@ -177,9 +177,7 @@ read t...
2017 Jul 27
23
[PATCH v3 00/23] Reimplement many daemon APIs in OCaml.
I think this fixes everything mentioned: - Added the Optgroups module as suggested. - Remove command temporary files. - Replace command ~flags with ?fold_stdout_on_stderr. - Nest _with_mounted function. - Rebase & retest. Rich.
2017 Jul 21
27
[PATCH v2 00/23] Reimplement many daemon APIs in OCaml.
v1 was posted here: https://www.redhat.com/archives/libguestfs/2017-July/msg00098.html This series now depends on two small patches which I posted separately: https://www.redhat.com/archives/libguestfs/2017-July/msg00207.html https://www.redhat.com/archives/libguestfs/2017-July/msg00209.html v1 -> v2: - Previously changes to generator/daemon.ml were made incrementally through the patch
2017 Jul 14
45
[PATCH 00/27] Reimplement many daemon APIs in OCaml.
Previously posted as part of the mega utilities/inspection series here: https://www.redhat.com/archives/libguestfs/2017-June/msg00232.html What I've done is to extract just the parts related to rewriting daemon APIs in OCaml, rebase them on top of the current master, fix a few things, and recompile and test everything. Rich.
2017 Oct 04
11
[PATCH 0/9] build: Require OCaml >= 4.02.
Per my previous email: https://www.redhat.com/archives/libguestfs/2017-September/msg00203.html I'd like to talk about requiring a more modern version of the OCaml compiler. These commits show some of the code changes which would be possible with OCaml >= 3.12 [which it turns out we already require by accident] and also with OCaml >= 4.02. The latter is my favoured option. Rich.
2016 Jul 26
8
[PATCH 0/5] Improve LVM handling in the appliance
Hi, this series improves the way LVM is used in the appliance: in particular, now lvmetad can eventually run at all, and with the correct configuration. Also improve the listing strategies. Thanks, Pino Toscano (5): daemon: lvm-filter: set also global_filter daemon: lvm-filter: start lvmetad better daemon: lvm: improve filter for LVs with activationskip flag set daemon: lvm: list
2017 Nov 21
2
[PATCH v3 0/2] common/mlstdutils: Extend the List module.
v2 -> v3: - Renamed List.assoc_ -> List.assoc_lbl. - Rebased on top of current master branch. Rich.
2017 Oct 08
4
[PATCH 0/3] common/mlstdutils: Add Std_utils List and Option modules.
In Std_utils we already extend Char and String. These commits take it a little further by extending List and adding a new Option submodule. All basically simple refactoring. Rich.
2017 Oct 08
7
[[PATCH v2 0/4] common/mlstdutils: Add Std_utils List and Option modules.
This time including the first commit ...