Displaying 12 results from an estimated 12 matches for "lv_uuid".
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).
..._code fs
let warning 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).
...gt; 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
This l...
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
...fy/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_uuids uuid u = 0) ro_uuids
)
--
1....
2017 Oct 04
0
[PATCH 2/9] ocaml: Replace pattern matching { field = field } with { field }.
...diff --git a/sparsify/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...
2012 Feb 01
1
[PATCH] Clarify the error message when unavailable functions are called (RHBZ#679737).
...}
char *
do_vguuid (const char *vgname)
{
+ IF_NOT_AVAILABLE_ERROR (lvm2, NULL);
+
return get_lvm_field ("vgs", "vg_uuid", vgname);
}
char *
do_lvuuid (const char *device)
{
+ IF_NOT_AVAILABLE_ERROR (lvm2, NULL);
+
return get_lvm_field ("lvs", "lv_uuid", device);
}
@@ -652,12 +698,16 @@ get_lvm_fields (const char *cmd, const char *field, const char *device)
char **
do_vgpvuuids (const char *vgname)
{
+ IF_NOT_AVAILABLE_ERROR (lvm2, NULL);
+
return get_lvm_fields ("vgs", "pv_uuid", vgname);
}
char **
do_vglv...
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.
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.
2012 Jan 12
1
Libguestfs gobject bindings
I'm currently working on gobject bindings for libguestfs. I haven't got
as far as compiling anything yet, but I've attached the C header for
initial review.
Matt
--
Matthew Booth, RHCA, RHCSS
Red Hat Engineering, Virtualisation Team
GPG ID: D33C3490
GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490
-------------- next part --------------
An embedded and
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 ...