Displaying 14 results from an estimated 14 matches for "rm_lvm_system_dir".
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.
2018 May 24
2
[PATCH v2] daemon: Move lvmetad to early in the appliance boot process.
...ut is:
- *
- * /tmp/lvmXXXXXX (lvm_system_dir set to this)
- * /tmp/lvmXXXXXX/lvm ($LVM_SYSTEM_DIR set to this)
- * /tmp/lvmXXXXXX/lvm/lvm.conf (configuration file - initially empty)
- */
-static char lvm_system_dir[] = "/tmp/lvmXXXXXX";
-
-static void rm_lvm_system_dir (void);
static void debug_lvm_config (void);
-void
-clean_lvm_config (void)
-{
- char env[64], conf[64];
- FILE *fp;
-
- if (mkdtemp (lvm_system_dir) == NULL)
- error (EXIT_FAILURE, errno, "mkdtemp: %s", lvm_system_dir);
-
- snprintf (env, sizeof env, "%s/lvm", lvm_sys...
2017 Jul 26
5
[PATCH 0/2] daemon: Reimplement handling of lvm.conf and filters.
Simplify how we handle lvm.conf.
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:
2016 Jul 26
0
[PATCH 2/5] daemon: lvm-filter: start lvmetad better
...t;%s\n", cmd);
+ r = system (cmd);
+ if (r == -1)
+ perror ("system/lvmetad");
+ else if (!WIFEXITED (r) || WEXITSTATUS (r) != 0)
+ fprintf (stderr, "warning: lvmetad command failed\n");
+
/* Set a handler to remove the temporary directory at exit. */
atexit (rm_lvm_system_dir);
}
@@ -247,7 +258,7 @@ rescan (void)
unlink (lvm_cache);
CLEANUP_FREE char *err = NULL;
- int r = command (NULL, &err, str_lvm, "vgscan", NULL);
+ int r = command (NULL, &err, str_lvm, "vgscan", "--cache", NULL);
if (r == -1) {
reply_with_er...
2013 Jan 02
3
[PATCH] daemon: copy entire lvm directory
...et environment variable so we use the copy. */
- setenv ("LVM_SYSTEM_DIR", lvm_system_dir, 1);
+ snprintf(env, sizeof(env), "%s/lvm", lvm_system_dir);
+ setenv ("LVM_SYSTEM_DIR", env, 1);
/* Set a handler to remove the temporary directory at exit. */
atexit (rm_lvm_system_dir);
--
1.8.0.1
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 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
2012 Aug 30
2
[PATCH v2] daemon: collect list of called external commands
...}
/* 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);
if (r == -1) {
perror (cmd);
@@ -92,7 +97,7 @@ rm_lvm_system_dir (void)
{
char cmd[64];
- snprintf (cmd, sizeof cmd, "rm -rf %s", lvm_system_dir);
+ snprintf (cmd, sizeof cmd, "%s -rf %s", str_rm, lvm_system_dir);
ignore_value (system (cmd));
}
@@ -189,7 +194,7 @@ static int
vgchange (const char *vgchange_flag)
{
char *err;...
2012 Aug 30
1
[PATCH] collect list of called external commands
...}
/* 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);
if (r == -1) {
perror (cmd);
@@ -92,7 +97,7 @@ rm_lvm_system_dir (void)
{
char cmd[64];
- snprintf (cmd, sizeof cmd, "rm -rf %s", lvm_system_dir);
+ snprintf (cmd, sizeof cmd, "%s -rf %s", str_rm, lvm_system_dir);
ignore_value (system (cmd));
}
@@ -189,7 +194,7 @@ static int
vgchange (const char *vgchange_flag)
{
char *err;...
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
...tad);
if (verbose)
- printf ("%s\n", cmd);
- r = system (cmd);
+ printf ("%s\n", "lvmetad");
+ r = system ("lvmetad");
if (r == -1)
perror ("system/lvmetad");
else if (!WIFEXITED (r) || WEXITSTATUS (r) != 0)
@@ -124,7 +117,7 @@ rm_lvm_system_dir (void)
{
char cmd[64];
- snprintf (cmd, sizeof cmd, "%s -rf %s", str_rm, lvm_system_dir);
+ snprintf (cmd, sizeof cmd, "rm -rf %s", lvm_system_dir);
ignore_value (system (cmd));
}
@@ -232,7 +225,7 @@ static int
vgchange (const char *vgchange_flag)
{
CLEANUP_FR...
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
...tad);
if (verbose)
- printf ("%s\n", cmd);
- r = system (cmd);
+ printf ("%s\n", "lvmetad");
+ r = system ("lvmetad");
if (r == -1)
perror ("system/lvmetad");
else if (!WIFEXITED (r) || WEXITSTATUS (r) != 0)
@@ -124,7 +119,7 @@ rm_lvm_system_dir (void)
{
char cmd[64];
- snprintf (cmd, sizeof cmd, "%s -rf %s", str_rm, lvm_system_dir);
+ snprintf (cmd, sizeof cmd, "rm -rf %s", lvm_system_dir);
ignore_value (system (cmd));
}
@@ -232,7 +227,7 @@ static int
vgchange (const char *vgchange_flag)
{
CLEANUP_FR...
2017 Jul 27
3
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
This is a simpler patch that removes GUESTFSD_EXT_CMD completely.
2017 Jul 24
6
[PATCH 0/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
Replace GUESTFSD_EXT_CMD with a command line option
‘./guestfsd --print-external-commands’