search for: lvm_system_dir

Displaying 20 results from an estimated 22 matches for "lvm_system_dir".

2018 May 24
2
[PATCH v2] daemon: Move lvmetad to early in the appliance boot process.
...ing lvmetad all the time, using vgchange is incorrect. With lvmetad activated early we must use ‘pvscan --cache --activate ay’ to scan all disks for PVs and activate any VGs on them (although the documentation is complex, confusing and contradictory so I'm not completely sure about this). The ‘lvm_system_dir’ local variable in ‘daemon/lvm-filter.c’ previously contained the path of the directory above $LVM_SYSTEM_DIR (eg. $LVM_SYSTEM_DIR = "/etc/lvm", lvm_system_dir = "/etc"). As this was highly confusing, I have changed it so the local variable and the environment variable have ide...
2018 May 24
1
[PATCH] daemon: Move creating of LVM_SYSTEM_DIR into the appliance/init script.
This patch reworks how we start up LVM and lvmetad. It fixes the problem we had converting a guest which had a peculiar LVM configuration: https://bugzilla.redhat.com/show_bug.cgi?id=1581810#c14 However please note I have NOT yet tested it fully. Rich.
2013 Jan 02
3
[PATCH] daemon: copy entire lvm directory
...har cmd[64], env[64]; int r; /* If /etc/lvm directory doesn't exist (or isn't a directory) assume @@ -68,8 +68,8 @@ copy_lvm (void) exit (EXIT_FAILURE); } - /* Hopefully no dotfiles in there ... XXX */ - snprintf (cmd, sizeof cmd, "%s -a /etc/lvm/* %s", str_cp, lvm_system_dir); + /* Copy the entire directory */ + snprintf (cmd, sizeof cmd, "%s -a /etc/lvm/ %s", str_cp, lvm_system_dir); r = system (cmd); if (r == -1) { perror (cmd); @@ -85,7 +85,8 @@ copy_lvm (void) } /* Set environment variable so we use the copy. */ - setenv ("LVM_S...
2018 May 24
0
Re: [PATCH v2] daemon: Move lvmetad to early in the appliance boot process.
...g vgchange is incorrect. > With lvmetad activated early we must use ‘pvscan --cache --activate ay’ > to scan all disks for PVs and activate any VGs on them (although the > documentation is complex, confusing and contradictory so I'm not > completely sure about this). > > The ‘lvm_system_dir’ local variable in ‘daemon/lvm-filter.c’ > previously contained the path of the directory above $LVM_SYSTEM_DIR > (eg. $LVM_SYSTEM_DIR = "/etc/lvm", lvm_system_dir = "/etc"). As this > was highly confusing, I have changed it so the local variable and the > environme...
2017 Jul 26
5
[PATCH 0/2] daemon: Reimplement handling of lvm.conf and filters.
Simplify how we handle lvm.conf.
2016 Jul 26
0
[PATCH 2/5] daemon: lvm-filter: start lvmetad better
Currently lvmetad is started in init, and thus using the system (= appliance) configuration of lvm. Later on, in the daemon, a local copy of the lvm configuration is setup, and set it for use using the LVM_SYSTEM_DIR environment variable: this means only the programmes executed by the daemon will use the local lvm configuration, and not lvmetad. Thus manually start lvmetad from the daemon, right after having setup the local lvm configuration, and still without failing if it cannot be executed. Additionally, s...
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
2014 Oct 24
2
[PATCH] daemon: Remove custom Augeas lenses.
.../daemon/lvm-filter.c index 72fe6ac..d119f9e 100644 --- a/daemon/lvm-filter.c +++ b/daemon/lvm-filter.c @@ -122,7 +122,7 @@ set_filter (char *const *filters) * but do that only after having applied the transformation. */ const int flags = AUG_NO_ERR_CLOSE | AUG_NO_LOAD; - aug = aug_init (lvm_system_dir, "/usr/share/guestfs/", flags); + aug = aug_init (lvm_system_dir, NULL, flags); if (!aug) { reply_with_error ("augeas initialization failed"); return -1; @@ -133,18 +133,6 @@ set_filter (char *const *filters) return -1; } - r = aug_transform (aug, "...
2014 Aug 26
6
[PATCH 0/3] fix setting lvm filter with newer lvm2
Hi, newer lvm2 releases don't have have uncommented "filter" lines, so the current way to edit lvm.conf doesn't work anymore. Instead, switch to augeas (with a "custom" len) for a cleaner and working way to set the lvm filter. Pino Toscano (3): daemon: add add_sprintf daemon: move AUGEAS_ERROR to the common header daemon: lvm-filter: use augeas for setting the
2014 Oct 24
1
[PATCH v3] daemon: Remove custom Augeas lenses.
v3: - Don't remove the LVM transform.
2014 Oct 24
1
[PATCH v2] daemon: Remove custom Augeas lenses.
v2 of previous patch, which fixes some missing bits. For now I'm going to go with Pino's RHEL 7.1 patch, since it is at least smaller than this. So I'm sending this to the list just to have it archived for later. Rich.
2012 Aug 30
2
[PATCH v2] daemon: collect list of called external commands
...ude "actions.h" +GUESTFSD_EXT_CMD(str_lvm, lvm); +GUESTFSD_EXT_CMD(str_vgchange, vgchange); +GUESTFSD_EXT_CMD(str_cp, cp); +GUESTFSD_EXT_CMD(str_rm, rm); + /* This runs during daemon start up and creates a complete copy of * /etc/lvm so that we can modify it as we desire. We set * LVM_SYSTEM_DIR to point to the copy. @@ -65,7 +70,7 @@ copy_lvm (void) } /* Hopefully no dotfiles in there ... XXX */ - snprintf (cmd, sizeof cmd, "cp -a /etc/lvm/* %s", lvm_system_dir); + snprintf (cmd, sizeof cmd, "%s -a /etc/lvm/* %s", str_cp, lvm_system_dir); r = system (cmd);...
2012 Aug 30
1
[PATCH] collect list of called external commands
...include "actions.h" +GUESTFS_EXT_CMD(str_lvm, lvm); +GUESTFS_EXT_CMD(str_vgchange, vgchange); +GUESTFS_EXT_CMD(str_cp, cp); +GUESTFS_EXT_CMD(str_rm, rm); + /* This runs during daemon start up and creates a complete copy of * /etc/lvm so that we can modify it as we desire. We set * LVM_SYSTEM_DIR to point to the copy. @@ -65,7 +70,7 @@ copy_lvm (void) } /* Hopefully no dotfiles in there ... XXX */ - snprintf (cmd, sizeof cmd, "cp -a /etc/lvm/* %s", lvm_system_dir); + snprintf (cmd, sizeof cmd, "%s -a /etc/lvm/* %s", str_cp, lvm_system_dir); r = system (cmd);...
2016 Apr 04
0
[PATCH 2/2] Use 'error' function for fprintf followed by exit.
...on/lvm-filter.c @@ -23,6 +23,8 @@ #include <inttypes.h> #include <string.h> #include <unistd.h> +#include <errno.h> +#include <error.h> #include <sys/stat.h> #include <sys/wait.h> @@ -72,10 +74,8 @@ copy_lvm (void) return; } - if (mkdtemp (lvm_system_dir) == NULL) { - fprintf (stderr, "mkdtemp: %s: %m\n", lvm_system_dir); - exit (EXIT_FAILURE); - } + if (mkdtemp (lvm_system_dir) == NULL) + error (EXIT_FAILURE, errno, "mkdtemp: %s", lvm_system_dir); /* Copy the entire directory */ snprintf (cmd, sizeof cmd, &qu...
2016 Jul 26
5
[PATCH v2 0/4] 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. Changes in v2: - dropped patch #5, will be sent separately - move lvmetad statup in own function (patch #2) Thanks, Pino Toscano (4): daemon: lvm-filter: set also global_filter daemon: lvm-filter:
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
...clude "actions.h" -GUESTFSD_EXT_CMD(str_lvm, lvm); -GUESTFSD_EXT_CMD(str_cp, cp); -GUESTFSD_EXT_CMD(str_rm, rm); -GUESTFSD_EXT_CMD(str_lvmetad, lvmetad); - /* This runs during daemon start up and creates a complete copy of * /etc/lvm so that we can modify it as we desire. We set * LVM_SYSTEM_DIR to point to the copy. Note that the final directory @@ -79,7 +74,7 @@ copy_lvm (void) error (EXIT_FAILURE, errno, "mkdtemp: %s", lvm_system_dir); /* Copy the entire directory */ - snprintf (cmd, sizeof cmd, "%s -a /etc/lvm/ %s", str_cp, lvm_system_dir); + snprintf (...
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
...MMANDS ("lvm", "cp", "rm", "lvmetad") /* This runs during daemon start up and creates a complete copy of * /etc/lvm so that we can modify it as we desire. We set @@ -79,7 +76,7 @@ copy_lvm (void) error (EXIT_FAILURE, errno, "mkdtemp: %s", lvm_system_dir); /* Copy the entire directory */ - snprintf (cmd, sizeof cmd, "%s -a /etc/lvm/ %s", str_cp, lvm_system_dir); + snprintf (cmd, sizeof cmd, "%s -a /etc/lvm/ %s", "cp", lvm_system_dir); r = system (cmd); if (r == -1) { perror (cmd); @@ -106,13 +103,11 @...
2017 Jul 27
3
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
This is a simpler patch that removes GUESTFSD_EXT_CMD completely.
2020 Jan 08
3
回复: bug report
...dev eth0 up Cannot find device "eth0" + ip route add default via 169.254.2.2 RTNETLINK answers: Network is unreachable + echo nameserver 169.254.2.3 + mdadm -As --auto=yes --no-degraded mdadm: No arrays found in config file or automatically + mkdir -p /tmp/lvm + touch /tmp/lvm/lvm.conf + LVM_SYSTEM_DIR=/tmp/lvm + export LVM_SYSTEM_DIR + lvmetad + modprobe dm_mod [&nbsp; &nbsp; 0.984946] device-mapper: uevent: version 1.0.3 [&nbsp; &nbsp; 0.988388] device-mapper: ioctl: 4.39.0-ioctl (2018-04-03) initialised: dm-devel@redhat.com + lvm pvscan --cache --activate ay + mdadm -As --auto=...
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
Wherever we had code which did: if (something_bad) { perror (...); exit (EXIT_FAILURE); } replace this with use of the error(3) function: if (something_bad) error (EXIT_FAILURE, errno, ...); The error(3) function is supplied by glibc, or by gnulib on platforms which don't have it, and is much more flexible than perror(3). Since we already use error(3), there seems to be