master - pvcreate: Avoid spurious 'not found' messages.
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=2e82a070f3c922...
Commit: 2e82a070f3c9224da5c9f383d47e75a1715586cf
Parent: 84394c0219e4fcee719663c710121f1bb731a538
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Fri Nov 29 21:45:37 2013 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Fri Nov 29 21:45:37 2013 +0000
pvcreate: Avoid spurious 'not found' messages.
Replacement of pv_read by find_pv_by_name in commit
651d5093edde3e0ebee9d75be1c9834efc152d91 caused spurious
error messages when running pvcreate or vgextend against an
unformatted device.
Physical volume /dev/loop4 not found
Physical volume "/dev/loop4" successfully created
Physical volume /dev/loop4 not found
Physical volume /dev/loop4 not found
Physical volume "/dev/loop4" successfully created
Volume group "vg1" successfully extended
---
lib/metadata/metadata-exported.h | 2 +-
lib/metadata/metadata.c | 8 ++++----
lib/metadata/mirror.c | 2 +-
tools/pvmove.c | 4 ++--
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/lib/metadata/metadata-exported.h b/lib/metadata/metadata-exported.h
index ece5f53..f205a14 100644
--- a/lib/metadata/metadata-exported.h
+++ b/lib/metadata/metadata-exported.h
@@ -847,7 +847,7 @@ struct logical_volume *find_lv(const struct volume_group *vg,
const char *lv_name);
struct physical_volume *find_pv_by_name(struct cmd_context *cmd,
const char *pv_name,
- int allow_orphan);
+ int allow_orphan, int allow_unformatted);
const char *find_vgname_from_pvname(struct cmd_context *cmd,
const char *pvname);
diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
index f075c21..61816e2 100644
--- a/lib/metadata/metadata.c
+++ b/lib/metadata/metadata.c
@@ -633,7 +633,7 @@ static int vg_extend_single_pv(struct volume_group *vg, char *pv_name,
{
struct physical_volume *pv;
- if (!(pv = find_pv_by_name(vg->cmd, pv_name, 1)))
+ if (!(pv = find_pv_by_name(vg->cmd, pv_name, 1, 1)))
stack;
if (!pv && !pp) {
log_error("%s not identified as an existing "
@@ -1278,7 +1278,7 @@ static int pvcreate_check(struct cmd_context *cmd, const char *name,
/* FIXME Check partition type is LVM unless --force is given */
/* Is there a pv here already? */
- if (!(pv = find_pv_by_name(cmd, name, 1)))
+ if (!(pv = find_pv_by_name(cmd, name, 1, 1)))
stack;
/* Allow partial & exported VGs to be destroyed. */
@@ -1781,7 +1781,7 @@ struct physical_volume *find_pv(struct volume_group *vg, struct device *dev)
/* FIXME: liblvm todo - make into function that returns handle */
struct physical_volume *find_pv_by_name(struct cmd_context *cmd,
const char *pv_name,
- int allow_orphan)
+ int allow_orphan, int allow_unformatted)
{
struct device *dev;
struct pv_list *pvl;
@@ -1804,7 +1804,7 @@ struct physical_volume *find_pv_by_name(struct cmd_context *cmd,
else
free_pv_fid(pvl->pv);
- if (!pv)
+ if (!pv && !allow_unformatted)
log_error("Physical volume %s not found", pv_name);
if (pv && !allow_orphan && is_orphan_vg(pv->vg_name)) {
diff --git a/lib/metadata/mirror.c b/lib/metadata/mirror.c
index 6fc7674..18917d3 100644
--- a/lib/metadata/mirror.c
+++ b/lib/metadata/mirror.c
@@ -1577,7 +1577,7 @@ struct logical_volume *find_pvmove_lv_from_pvname(struct cmd_context *cmd,
struct physical_volume *pv;
struct logical_volume *lv;
- if (!(pv = find_pv_by_name(cmd, name, 0)))
+ if (!(pv = find_pv_by_name(cmd, name, 0, 0)))
return_NULL;
lv = find_pvmove_lv(vg, pv->dev, lv_type);
diff --git a/tools/pvmove.c b/tools/pvmove.c
index ab2e03b..19e1482 100644
--- a/tools/pvmove.c
+++ b/tools/pvmove.c
@@ -628,7 +628,7 @@ static int _set_up_pvmove(struct cmd_context *cmd, const char *pv_name,
argv++;
/* Find PV (in VG) */
- if (!(pv = find_pv_by_name(cmd, pv_name, 0))) {
+ if (!(pv = find_pv_by_name(cmd, pv_name, 0, 0))) {
stack;
return EINVALID_CMD_LINE;
}
@@ -809,7 +809,7 @@ static struct volume_group *_get_move_vg(struct cmd_context *cmd,
struct volume_group *vg;
/* Reread all metadata in case it got changed */
- if (!(pv = find_pv_by_name(cmd, name, 0))) {
+ if (!(pv = find_pv_by_name(cmd, name, 0, 0))) {
log_error("ABORTING: Can't reread PV %s", name);
/* What more could we do here? */
return NULL;
10 years
master - lvmetad: extend socket/pid file handling
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=84394c0219e4fc...
Commit: 84394c0219e4fcee719663c710121f1bb731a538
Parent: d2d5c24a68285a2f056977f877ab1a19e61b992f
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Fri Nov 29 20:56:29 2013 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Fri Nov 29 20:56:29 2013 +0000
lvmetad: extend socket/pid file handling
Make it easier to run a live lvmetad in debugging mode and
to avoid conflicts if multiple test instances need to be run
alongside a live one.
No longer require -s when -f is used: use built-in default.
Add -p to lvmetad to specify the pid file.
No longer disable pidfile if -f used to run in foreground.
If specified socket file appears to be genuine but stale, remove it
before use.
On error, only remove lvmetad socket file if created by the same
process. (Previous code removes socket even while a running instance
is using it!)
---
WHATS_NEW | 3 ++
daemons/lvmetad/lvmetad-core.c | 25 +++++++++++---------
libdaemon/server/daemon-server.c | 46 +++++++++++++++++++++++++++++++++++--
man/lvmetad.8.in | 36 +++++++++++++++++++++--------
test/lib/test.sh | 1 +
5 files changed, 87 insertions(+), 24 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 0101b49..043b7ef 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,8 @@
Version 2.02.105 -
=====================================
+ Add -p and LVM_LVMETAD_PID env var to lvmetad to change pid file.
+ Allow lvmetad to reuse stale socket.
+ Only unlink lvmetad socket on error if created by the same process.
Append missing newline to lvmetad missing socket path error message.
Check for non-zero aligment in _text_pv_add_metadata_area() to not div by 0.
Add allocation/use_blkid_wiping to lvm.conf to enable blkid wiping.
diff --git a/daemons/lvmetad/lvmetad-core.c b/daemons/lvmetad/lvmetad-core.c
index 71254f4..2810faf 100644
--- a/daemons/lvmetad/lvmetad-core.c
+++ b/daemons/lvmetad/lvmetad-core.c
@@ -1189,6 +1189,7 @@ static void usage(char *prog, FILE *file)
" -h Show this help information\n"
" -f Don't fork, run in the foreground\n"
" -l Logging message level (-l {all|wire|debug})\n"
+ " -p Set path to the pidfile\n"
" -s Set path to the socket to listen on\n\n", prog);
}
@@ -1196,27 +1197,34 @@ int main(int argc, char *argv[])
{
signed char opt;
lvmetad_state ls;
+ int _pidfile_override = 1;
int _socket_override = 1;
daemon_state s = {
.daemon_fini = fini,
.daemon_init = init,
.handler = handler,
.name = "lvmetad",
- .pidfile = LVMETAD_PIDFILE,
+ .pidfile = getenv("LVM_LVMETAD_PIDFILE"),
.private = &ls,
.protocol = "lvmetad",
.protocol_version = 1,
.socket_path = getenv("LVM_LVMETAD_SOCKET"),
};
+ if (!s.pidfile) {
+ _pidfile_override = 0;
+ s.pidfile = LVMETAD_PIDFILE;
+ }
+
if (!s.socket_path) {
_socket_override = 0;
s.socket_path = LVMETAD_SOCKET;
}
+
ls.log_config = "";
// use getopt_long
- while ((opt = getopt(argc, argv, "?fhVl:s:")) != EOF) {
+ while ((opt = getopt(argc, argv, "?fhVl:p:s:")) != EOF) {
switch (opt) {
case 'h':
usage(argv[0], stdout);
@@ -1230,6 +1238,10 @@ int main(int argc, char *argv[])
case 'l':
ls.log_config = optarg;
break;
+ case 'p':
+ s.pidfile = optarg;
+ _pidfile_override = 1;
+ break;
case 's': // --socket
s.socket_path = optarg;
_socket_override = 1;
@@ -1240,15 +1252,6 @@ int main(int argc, char *argv[])
}
}
- if (s.foreground) {
- if (!_socket_override) {
- fprintf(stderr, "A socket path (-s) is required in foreground mode.\n");
- exit(2);
- }
-
- s.pidfile = NULL;
- }
-
daemon_start(s);
return 0;
}
diff --git a/libdaemon/server/daemon-server.c b/libdaemon/server/daemon-server.c
index 156925a..914b803 100644
--- a/libdaemon/server/daemon-server.c
+++ b/libdaemon/server/daemon-server.c
@@ -207,7 +207,9 @@ out:
static int _open_socket(daemon_state s)
{
int fd = -1;
+ int file_created = 0;
struct sockaddr_un sockaddr = { .sun_family = AF_UNIX };
+ struct stat buf;
mode_t old_mask;
(void) dm_prepare_selinux_context(s.socket_path, S_IFSOCK);
@@ -233,9 +235,47 @@ static int _open_socket(daemon_state s)
}
if (bind(fd, (struct sockaddr *) &sockaddr, sizeof(sockaddr))) {
- perror("can't bind local socket.");
- goto error;
+ if (errno != EADDRINUSE) {
+ perror("can't bind local socket");
+ goto error;
+ }
+
+ /* Socket already exists. If it's stale, remove it. */
+ if (stat(sockaddr.sun_path, &buf)) {
+ perror("stat failed");
+ goto error;
+ }
+
+ if (S_ISSOCK(buf.st_mode)) {
+ fprintf(stderr, "%s: not a socket\n", sockaddr.sun_path);
+ goto error;
+ }
+
+ if (buf.st_uid || (buf.st_mode & (S_IRWXG | S_IRWXO))) {
+ fprintf(stderr, "%s: unrecognised permissions\n", sockaddr.sun_path);
+ goto error;
+ }
+
+ if (!connect(fd, (struct sockaddr *) &sockaddr, sizeof(sockaddr))) {
+ fprintf(stderr, "Socket %s already in use\n", sockaddr.sun_path);
+ goto error;
+ }
+
+ fprintf(stderr, "removing stale socket %s\n", sockaddr.sun_path);
+
+ if (unlink(sockaddr.sun_path) && (errno != ENOENT)) {
+ perror("unlink failed");
+ goto error;
+ }
+
+ if (bind(fd, (struct sockaddr *) &sockaddr, sizeof(sockaddr))) {
+ perror("local socket bind failed after unlink");
+ goto error;
+ }
}
+
+ file_created = 1;
+
if (listen(fd, 1) != 0) {
perror("listen local");
goto error;
@@ -250,7 +290,7 @@ error:
if (fd >= 0) {
if (close(fd))
perror("close failed");
- if (unlink(s.socket_path))
+ if (file_created && unlink(s.socket_path))
perror("unlink failed");
fd = -1;
}
diff --git a/man/lvmetad.8.in b/man/lvmetad.8.in
index 7110877..4956a3f 100644
--- a/man/lvmetad.8.in
+++ b/man/lvmetad.8.in
@@ -6,8 +6,11 @@ lvmetad \- LVM metadata cache daemon
.RB [ \-l
.RI {all|wire|debug}
.RB ]
+.RB [ \-p
+.RI pidfile_path
+.RB ]
.RB [ \-s
-.RI path
+.RI socket_path
.RB ]
.RB [ \-f ]
.RB [ \-h ]
@@ -21,6 +24,15 @@ consistent image of the volume groups available in the system.
By default, lvmetad, even if running, is not used by LVM. See \fBlvm.conf\fP(5).
.SH OPTIONS
+
+To run the daemon in a test environment both the pidfile_path and the
+socket_path should be changed from the defaults.
+.TP
+.B \-f
+Don't fork, but run in the foreground.
+.TP
+.BR \-h ", " \-?
+Show help information.
.TP
.BR \-l " {" \fIall | \fIwire | \fIdebug }
Select the type of log messages to generate.
@@ -32,23 +44,27 @@ Selecting 'all' supplies both and is equivalent to a comma-separated list
Prior to release 2.02.98, repeating -d from 1 to 3 times, viz. -d, -dd, -ddd,
increased the detail of messages.
.TP
-.B \-f
-Don't fork, run in the foreground.
-.TP
-.BR \-h ", " \-?
-Show help information.
+.B \-p \fIpidfile_path
+Path to the pidfile. This overrides both the built-in default
+(#DEFAULT_PID_DIR#/lvmetad.pid) and the environment variable
+\fBLVM_LVMETAD_PIDFILE\fP. This file is used to prevent more
+than one instance of the daemon running simultaneously.
.TP
-.B \-s \fIpath
-Path to the socket file to use. The option overrides both the built-in default
+.B \-s \fIsocket_path
+Path to the socket file. This overrides both the built-in default
(#DEFAULT_RUN_DIR#/lvmetad.socket) and the environment variable
-\fBLVM_LVMETAD_SOCKET\fP.
+\fBLVM_LVMETAD_SOCKET\fP. To communicate successfully with lvmetad,
+all LVM2 processes should use the same socket path.
.TP
.B \-V
Display the version of lvmetad daemon.
.SH ENVIRONMENT VARIABLES
.TP
+.B LVM_LVMETAD_PIDFILE
+Path for the pid file.
+.TP
.B LVM_LVMETAD_SOCKET
-override path for socket file to use.
+Path for the socket file.
.SH SEE ALSO
.BR lvm (8),
diff --git a/test/lib/test.sh b/test/lib/test.sh
index 563ef59..265d61d 100644
--- a/test/lib/test.sh
+++ b/test/lib/test.sh
@@ -83,6 +83,7 @@ aux prepare_clvmd
test -n "$LVM_TEST_LVMETAD" && {
aux prepare_lvmetad
export LVM_LVMETAD_SOCKET="$TESTDIR/lvmetad.socket"
+ export LVM_LVMETAD_PIDFILE="$TESTDIR/lvmetad.pid"
}
echo "@TESTDIR=$TESTDIR"
echo "@PREFIX=$PREFIX"
10 years
master - configure: require libblkid >= 2.24 for blkid wiping
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d2d5c24a68285a...
Commit: d2d5c24a68285a2f056977f877ab1a19e61b992f
Parent: 75628f341ad38b68aae33eae0b5700be2a6e5769
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Fri Nov 29 16:37:09 2013 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Fri Nov 29 16:38:53 2013 +0100
configure: require libblkid >= 2.24 for blkid wiping
Some symbols/identifiers were defined even later than 2.22, like BLKID_SUBLKS_BADCSUM.
---
configure | 20 ++++++++++----------
configure.in | 4 ++--
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/configure b/configure
index 5d81dac..564d322 100755
--- a/configure
+++ b/configure
@@ -9211,12 +9211,12 @@ if test -n "$BLKID_CFLAGS"; then
pkg_cv_BLKID_CFLAGS="$BLKID_CFLAGS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"blkid >= 2.22\""; } >&5
- ($PKG_CONFIG --exists --print-errors "blkid >= 2.22") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"blkid >= 2.24\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "blkid >= 2.24") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_BLKID_CFLAGS=`$PKG_CONFIG --cflags "blkid >= 2.22" 2>/dev/null`
+ pkg_cv_BLKID_CFLAGS=`$PKG_CONFIG --cflags "blkid >= 2.24" 2>/dev/null`
else
pkg_failed=yes
fi
@@ -9227,12 +9227,12 @@ if test -n "$BLKID_LIBS"; then
pkg_cv_BLKID_LIBS="$BLKID_LIBS"
elif test -n "$PKG_CONFIG"; then
if test -n "$PKG_CONFIG" && \
- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"blkid >= 2.22\""; } >&5
- ($PKG_CONFIG --exists --print-errors "blkid >= 2.22") 2>&5
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"blkid >= 2.24\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "blkid >= 2.24") 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- pkg_cv_BLKID_LIBS=`$PKG_CONFIG --libs "blkid >= 2.22" 2>/dev/null`
+ pkg_cv_BLKID_LIBS=`$PKG_CONFIG --libs "blkid >= 2.24" 2>/dev/null`
else
pkg_failed=yes
fi
@@ -9252,9 +9252,9 @@ else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- BLKID_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "blkid >= 2.22" 2>&1`
+ BLKID_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "blkid >= 2.24" 2>&1`
else
- BLKID_PKG_ERRORS=`$PKG_CONFIG --print-errors "blkid >= 2.22" 2>&1`
+ BLKID_PKG_ERRORS=`$PKG_CONFIG --print-errors "blkid >= 2.24" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$BLKID_PKG_ERRORS" >&5
@@ -9262,7 +9262,7 @@ fi
if test x$BLKID_WIPING = xmaybe; then
BLKID_WIPING=no
else
- as_fn_error $? "bailing out... blkid library >= 2.22 is required" "$LINENO" 5
+ as_fn_error $? "bailing out... blkid library >= 2.24 is required" "$LINENO" 5
fi
elif test $pkg_failed = untried; then
@@ -9271,7 +9271,7 @@ $as_echo "no" >&6; }
if test x$BLKID_WIPING = xmaybe; then
BLKID_WIPING=no
else
- as_fn_error $? "bailing out... blkid library >= 2.22 is required" "$LINENO" 5
+ as_fn_error $? "bailing out... blkid library >= 2.24 is required" "$LINENO" 5
fi
else
diff --git a/configure.in b/configure.in
index b4a407a..e4d0014 100644
--- a/configure.in
+++ b/configure.in
@@ -959,14 +959,14 @@ if test x$BLKID_WIPING != xno; then
if test x$PKGCONFIG_INIT != x1; then
pkg_config_init
fi
- PKG_CHECK_MODULES(BLKID, blkid >= 2.22,
+ PKG_CHECK_MODULES(BLKID, blkid >= 2.24,
[if test x$BLKID_WIPING = xmaybe; then
BLKID_WIPING=yes
fi],
[if test x$BLKID_WIPING = xmaybe; then
BLKID_WIPING=no
else
- AC_MSG_ERROR([bailing out... blkid library >= 2.22 is required])
+ AC_MSG_ERROR([bailing out... blkid library >= 2.24 is required])
fi
])
if test x$BLKID_WIPING = xyes; then
10 years
master - configure: enable blkid_wiping by default if the blkid library is present
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=75628f341ad38b...
Commit: 75628f341ad38b68aae33eae0b5700be2a6e5769
Parent: b3074560eb36d0b1c8ec61f50e71b0b27dbda982
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Fri Nov 29 15:27:56 2013 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Fri Nov 29 15:27:56 2013 +0100
configure: enable blkid_wiping by default if the blkid library is present
---
WHATS_NEW | 3 +-
configure | 53 ++++++++++++++++++++--------------------------
configure.in | 29 +++++++++++++++++--------
lib/misc/configure.h.in | 2 +-
4 files changed, 46 insertions(+), 41 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 6aac94a..0101b49 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -3,7 +3,8 @@ Version 2.02.105 -
Append missing newline to lvmetad missing socket path error message.
Check for non-zero aligment in _text_pv_add_metadata_area() to not div by 0.
Add allocation/use_blkid_wiping to lvm.conf to enable blkid wiping.
- Add configure --enable-blkid_wiping to use libblkid to detect signatures.
+ Enable blkid_wiping by default if the blkid library is present.
+ Add configure --disable-blkid_wiping to disable libblkid signature detection.
Add -W/--wipesignatures lvcreate option to support wiping on new LVs.
Add allocation/wipe_signatures_on_new_logical_volumes_when_zeroing to lvm.conf.
Do not fail the whole autoactivation if the VG refresh done before fails.
diff --git a/configure b/configure
index 8247ddd..5d81dac 100755
--- a/configure
+++ b/configure
@@ -1563,7 +1563,8 @@ Optional Features:
--enable-valgrind-pool enable valgrind awareness of pools
--disable-devmapper disable LVM2 device-mapper interaction
--enable-lvmetad enable the LVM Metadata Daemon
- --enable-blkid_wiping use wiping functionality provided by libblkid
+ --disable-blkid_wiping disable libblkid detection of signatures when wiping
+ and use native code instead
--enable-udev-systemd-background-jobs
enable udev-systemd protocol to instantiate a
service for background job
@@ -9185,20 +9186,19 @@ _ACEOF
fi
################################################################################
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use blkid wiping functionality" >&5
-$as_echo_n "checking whether to use blkid wiping functionality... " >&6; }
-# Check whether --enable-blkid-wiping was given.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable libblkid detection of signatures when wiping" >&5
+$as_echo_n "checking whether to enable libblkid detection of signatures when wiping... " >&6; }
+# Check whether --enable-blkid_wiping was given.
if test "${enable_blkid_wiping+set}" = set; then :
enableval=$enable_blkid_wiping; BLKID_WIPING=$enableval
else
- BLKID_WIPING=no
+ BLKID_WIPING=maybe
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $BLKID_WIPING" >&5
$as_echo "$BLKID_WIPING" >&6; }
-
-if test x$BLKID_WIPING = xyes; then
+if test x$BLKID_WIPING != xno; then
if test x$PKGCONFIG_INIT != x1; then
pkg_config_init
fi
@@ -9259,43 +9259,36 @@ fi
# Put the nasty error message in config.log where it belongs
echo "$BLKID_PKG_ERRORS" >&5
- as_fn_error $? "Package requirements (blkid >= 2.22) were not met:
-
-$BLKID_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables BLKID_CFLAGS
-and BLKID_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details." "$LINENO" 5
+ if test x$BLKID_WIPING = xmaybe; then
+ BLKID_WIPING=no
+ else
+ as_fn_error $? "bailing out... blkid library >= 2.22 is required" "$LINENO" 5
+ fi
elif test $pkg_failed = untried; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables BLKID_CFLAGS
-and BLKID_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details" "$LINENO" 5; }
+ if test x$BLKID_WIPING = xmaybe; then
+ BLKID_WIPING=no
+ else
+ as_fn_error $? "bailing out... blkid library >= 2.22 is required" "$LINENO" 5
+ fi
else
BLKID_CFLAGS=$pkg_cv_BLKID_CFLAGS
BLKID_LIBS=$pkg_cv_BLKID_LIBS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- BLKID_PC="blkid"
+ if test x$BLKID_WIPING = xmaybe; then
+ BLKID_WIPING=yes
+ fi
fi
+ if test x$BLKID_WIPING = xyes; then
+ BLKID_PC="blkid"
$as_echo "#define BLKID_WIPING_SUPPORT 1" >>confdefs.h
+ fi
fi
################################################################################
diff --git a/configure.in b/configure.in
index ff9bf81..b4a407a 100644
--- a/configure.in
+++ b/configure.in
@@ -947,21 +947,32 @@ fi
################################################################################
dnl -- Enable blkid wiping functionality
-AC_MSG_CHECKING(whether to use blkid wiping functionality)
-AC_ARG_ENABLE(blkid-wiping,
- AC_HELP_STRING([--enable-blkid_wiping],
- [use wiping functionality provided by libblkid]),
- BLKID_WIPING=$enableval, BLKID_WIPING=no)
+AC_MSG_CHECKING(whether to enable libblkid detection of signatures when wiping)
+AC_ARG_ENABLE(blkid_wiping,
+ AC_HELP_STRING([--disable-blkid_wiping],
+ [disable libblkid detection of signatures when wiping and use native code instead]),
+ BLKID_WIPING=$enableval, BLKID_WIPING=maybe)
AC_MSG_RESULT($BLKID_WIPING)
-
-if test x$BLKID_WIPING = xyes; then
+if test x$BLKID_WIPING != xno; then
dnl -- init pkgconfig if required
if test x$PKGCONFIG_INIT != x1; then
pkg_config_init
fi
- PKG_CHECK_MODULES(BLKID, blkid >= 2.22, [BLKID_PC="blkid"])
- AC_DEFINE([BLKID_WIPING_SUPPORT], 1, [Define to 1 to use wiping functionality provided by libblkid.])
+ PKG_CHECK_MODULES(BLKID, blkid >= 2.22,
+ [if test x$BLKID_WIPING = xmaybe; then
+ BLKID_WIPING=yes
+ fi],
+ [if test x$BLKID_WIPING = xmaybe; then
+ BLKID_WIPING=no
+ else
+ AC_MSG_ERROR([bailing out... blkid library >= 2.22 is required])
+ fi
+ ])
+ if test x$BLKID_WIPING = xyes; then
+ BLKID_PC="blkid"
+ AC_DEFINE([BLKID_WIPING_SUPPORT], 1, [Define to 1 to use libblkid detection of signatures when wiping.])
+ fi
fi
################################################################################
diff --git a/lib/misc/configure.h.in b/lib/misc/configure.h.in
index 51db42e..4e9ffd1 100644
--- a/lib/misc/configure.h.in
+++ b/lib/misc/configure.h.in
@@ -1,6 +1,6 @@
/* lib/misc/configure.h.in. Generated from configure.in by autoheader. */
-/* Define to 1 to use wiping functionality provided by libblkid. */
+/* Define to 1 to use libblkid detection of signatures when wiping. */
#undef BLKID_WIPING_SUPPORT
/* Define to 1 if the `closedir' function returns void instead of `int'. */
10 years
master - lvmetad: Add newline to missing socket error mesg
by Alasdair Kergon
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=b3074560eb36d0...
Commit: b3074560eb36d0b1c8ec61f50e71b0b27dbda982
Parent: 3f8083107ea901f9c58ef38ad9bb8084825a2f88
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Thu Nov 28 19:16:25 2013 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Thu Nov 28 19:16:25 2013 +0000
lvmetad: Add newline to missing socket error mesg
---
WHATS_NEW | 1 +
daemons/lvmetad/lvmetad-core.c | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index cd63144..6aac94a 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.105 -
=====================================
+ Append missing newline to lvmetad missing socket path error message.
Check for non-zero aligment in _text_pv_add_metadata_area() to not div by 0.
Add allocation/use_blkid_wiping to lvm.conf to enable blkid wiping.
Add configure --enable-blkid_wiping to use libblkid to detect signatures.
diff --git a/daemons/lvmetad/lvmetad-core.c b/daemons/lvmetad/lvmetad-core.c
index 7e64d9d..71254f4 100644
--- a/daemons/lvmetad/lvmetad-core.c
+++ b/daemons/lvmetad/lvmetad-core.c
@@ -1242,7 +1242,7 @@ int main(int argc, char *argv[])
if (s.foreground) {
if (!_socket_override) {
- fprintf(stderr, "A socket path (-s) is required in foreground mode.");
+ fprintf(stderr, "A socket path (-s) is required in foreground mode.\n");
exit(2);
}
10 years
master - tests: add test for lvcreate signature wiping
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3f8083107ea901...
Commit: 3f8083107ea901f9c58ef38ad9bb8084825a2f88
Parent: 08bab406b5bcae92df340209c1a0902e68aa1a28
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Thu Nov 28 15:47:20 2013 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Thu Nov 28 15:47:20 2013 +0100
tests: add test for lvcreate signature wiping
---
test/shell/lvcreate-signature-wiping.sh | 97 +++++++++++++++++++++++++++++++
1 files changed, 97 insertions(+), 0 deletions(-)
diff --git a/test/shell/lvcreate-signature-wiping.sh b/test/shell/lvcreate-signature-wiping.sh
new file mode 100644
index 0000000..617fed1
--- /dev/null
+++ b/test/shell/lvcreate-signature-wiping.sh
@@ -0,0 +1,97 @@
+#!/bin/sh
+# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions
+# of the GNU General Public License v.2.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+# 'Exercise signature wiping during lvcreate'
+
+. lib/test
+
+aux prepare_devs 1
+aux pvcreate -f $dev1
+aux vgcreate $vg $dev1
+
+# lvcreate wipes signatures when found on newly created LV - test this on "swap".
+# Test all combinatios with -Z{y|n} and -W{y|n} and related lvm.conf settings.
+
+lvcreate -l1 -n $lv1 $vg
+mkswap "$DM_DEV_DIR/$vg/$lv1"
+blkid -c /dev/null "$DM_DEV_DIR/$vg/$lv1" | grep "swap"
+lvremove -f $vg/$lv1
+
+wiping_msg="Wiping swap signature"
+
+aux lvmconf "allocation/wipe_signatures_on_new_logical_volumes_when_zeroing = 0"
+
+lvcreate -y -Zn -l1 -n $lv1 $vg | not grep "$wiping_msg"
+blkid -c /dev/null "$DM_DEV_DIR/$vg/$lv1" | grep "swap"
+lvremove -f $vg/$lv1
+
+lvcreate -y -Zn -Wn -l1 -n $lv1 $vg | not grep "$wiping_msg"
+blkid -c /dev/null "$DM_DEV_DIR/$vg/$lv1" | grep "swap"
+lvremove -f $vg/$lv1
+
+lvcreate -y -Zn -Wy -l1 -n $lv1 $vg | grep "$wiping_msg"
+(blkid -c /dev/null "$DM_DEV_DIR/$vg/$lv1" || true) | not grep "swap"
+mkswap "$DM_DEV_DIR/$vg/$lv1"
+blkid -c /dev/null "$DM_DEV_DIR/$vg/$lv1" | grep "swap"
+lvremove -f $vg/$lv1
+
+lvcreate -y -Zy -l1 -n $lv1 $vg | not grep "$wiping_msg"
+mkswap "$DM_DEV_DIR/$vg/$lv1"
+blkid -c /dev/null "$DM_DEV_DIR/$vg/$lv1" | grep "swap"
+lvremove -f $vg/$lv1
+
+lvcreate -y -Zy -Wn -l1 -n $lv1 $vg | not grep "$wiping_msg"
+mkswap "$DM_DEV_DIR/$vg/$lv1"
+blkid -c /dev/null "$DM_DEV_DIR/$vg/$lv1" | grep "swap"
+lvremove -f $vg/$lv1
+
+lvcreate -y -Zy -Wy -l1 -n $lv1 $vg | grep "$wiping_msg"
+mkswap "$DM_DEV_DIR/$vg/$lv1"
+blkid -c /dev/null "$DM_DEV_DIR/$vg/$lv1" | grep "swap"
+lvremove -f $vg/$lv1
+
+
+aux lvmconf "allocation/wipe_signatures_on_new_logical_volumes_when_zeroing = 1"
+
+lvcreate -y -Zn -l1 -n $lv1 $vg | not grep "$wiping_msg"
+blkid -c /dev/null "$DM_DEV_DIR/$vg/$lv1" | grep "swap"
+lvremove -f $vg/$lv1
+
+lvcreate -y -Zn -Wn -l1 -n $lv1 $vg | not grep "$wiping_msg"
+blkid -c /dev/null "$DM_DEV_DIR/$vg/$lv1" | grep "swap"
+lvremove -f $vg/$lv1
+
+lvcreate -y -Zn -Wy -l1 -n $lv1 $vg | grep "$wiping_msg"
+(blkid -c /dev/null "$DM_DEV_DIR/$vg/$lv1" || true) | not grep "swap"
+mkswap "$DM_DEV_DIR/$vg/$lv1"
+blkid -c /dev/null "$DM_DEV_DIR/$vg/$lv1" | grep "swap"
+lvremove -f $vg/$lv1
+
+lvcreate -y -Zy -l1 -n $lv1 $vg | grep "$wiping_msg"
+(blkid -c /dev/null "$DM_DEV_DIR/$vg/$lv1" || true) | not grep "swap"
+mkswap "$DM_DEV_DIR/$vg/$lv1"
+blkid -c /dev/null "$DM_DEV_DIR/$vg/$lv1" | grep "swap"
+lvremove -f $vg/$lv1
+
+lvcreate -y -Zy -Wn -l1 -n $lv1 $vg | not grep "$wiping_msg"
+mkswap "$DM_DEV_DIR/$vg/$lv1"
+blkid -c /dev/null "$DM_DEV_DIR/$vg/$lv1" | grep "swap"
+lvremove -f $vg/$lv1
+
+lvcreate -y -Zy -Wy -l1 -n $lv1 $vg | grep "$wiping_msg"
+(blkid -c /dev/null "$DM_DEV_DIR/$vg/$lv1" || true) | not grep "swap"
+mkswap "$DM_DEV_DIR/$vg/$lv1"
+blkid -c /dev/null "$DM_DEV_DIR/$vg/$lv1" | grep "swap"
+lvremove -f $vg/$lv1
+
+
+vgremove $vg
+pvremove $dev1
10 years
master - tests: wipe fs signature manually in pvcreate-operation test
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=08bab406b5bcae...
Commit: 08bab406b5bcae92df340209c1a0902e68aa1a28
Parent: c24b558c8c3e8f877e7cf216369e3415be8dbc6f
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Thu Nov 28 14:10:55 2013 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Thu Nov 28 14:10:55 2013 +0100
tests: wipe fs signature manually in pvcreate-operation test
So that the next pvcreate that is called does not issue any
warnings/prompts about existing signature (when blkid wiping is used).
---
test/shell/pvcreate-operation.sh | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/test/shell/pvcreate-operation.sh b/test/shell/pvcreate-operation.sh
index ddcf94c..b885ed2 100644
--- a/test/shell/pvcreate-operation.sh
+++ b/test/shell/pvcreate-operation.sh
@@ -23,6 +23,9 @@ do
not pvcreate -M$mdatype "$dev1" 2>err
grep "Can't open "$dev1" exclusively. Mounted filesystem?" err
umount "$dev1"
+ # wipe the filesystem signature for next
+ # pvcreate to not issue any prompts
+ dd if=/dev/zero of=$dev1 bs=1K count=2
fi
# pvcreate (lvm$mdatype) succeeds when run repeatedly (pv not in a vg) (bz178216)
10 years
master - tests: initialize signature wiping
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=c24b558c8c3e8f...
Commit: c24b558c8c3e8f877e7cf216369e3415be8dbc6f
Parent: 6a1957badcb95a5f2815436e64798b48ed85ca0c
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Thu Nov 28 13:23:45 2013 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Thu Nov 28 13:27:52 2013 +0100
tests: initialize signature wiping
Do not use signature wiping for newly created LVs in tests - we're
reusing the devs in tests and such detection could just interfere
inappropriately. We'd need to modify all tests to anwer the prompt
whether any signature found should be removed or not or we'd need
to use "-y" option for all lvcreates in tests. It's better to disable
this feature then and let's do a separate test to test this signature
wiping functionality.
---
test/lib/aux.sh | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 4ef1132..d1ae524 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -563,6 +563,7 @@ activation/polling_interval = 0
activation/snapshot_autoextend_percent = 50
activation/snapshot_autoextend_threshold = 50
activation/monitoring = 0
+allocation/wipe_signatures_on_new_logical_volumes_when_zeroing = 0
EOF
}
10 years
master - pvcreate: do not issue warning about any existing PV
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=6a1957badcb95a...
Commit: 6a1957badcb95a5f2815436e64798b48ed85ca0c
Parent: ce8ebda3fc0e8275d15f8cdc7f6f21162c7c1636
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Thu Nov 28 13:14:46 2013 +0100
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Thu Nov 28 13:14:46 2013 +0100
pvcreate: do not issue warning about any existing PV
If we're calling pvcreate on a device that already has a PV label,
the blkid detects the existing PV and then we consider it for wiping
before we continue creating the new PV label and we issue a warning
with a prompt whether such old PV label should be removed. We don't
do this with native signature detection code. Let's make it consistent
with old behaviour.
But still keep this "PV" (identified as "LVM1_member" or "LVM2_member"
by blkid) detection when creating new LVs to avoid unexpected PV label
appeareance inside LV.
---
lib/device/dev-type.c | 20 ++++++++++++++------
lib/device/dev-type.h | 3 ++-
lib/metadata/lv_manip.c | 2 +-
lib/metadata/metadata.c | 2 +-
4 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/lib/device/dev-type.c b/lib/device/dev-type.c
index 04b555b..78b093c 100644
--- a/lib/device/dev-type.c
+++ b/lib/device/dev-type.c
@@ -449,8 +449,8 @@ out:
#ifdef BLKID_WIPING_SUPPORT
-static int _blkid_wipe(blkid_probe probe, struct device *dev,
- const char *name, int yes, force_t force)
+static int _blkid_wipe(blkid_probe probe, struct device *dev, const char *name,
+ int exclude_lvm_member, int yes, force_t force)
{
const char *offset = NULL, *type = NULL, *magic = NULL,
*usage = NULL, *label = NULL, *uuid = NULL;
@@ -458,6 +458,9 @@ static int _blkid_wipe(blkid_probe probe, struct device *dev,
size_t len;
if (!blkid_probe_lookup_value(probe, "TYPE", &type, NULL)) {
+ if (exclude_lvm_member &&
+ (!strcmp(type, "LVM1_member") || !strcmp(type, "LVM2_member")))
+ return 1;
if (!blkid_probe_lookup_value(probe, "SBMAGIC_OFFSET", &offset, NULL) &&
blkid_probe_lookup_value(probe, "SBMAGIC", &magic, &len))
return_0;
@@ -495,6 +498,7 @@ static int _blkid_wipe(blkid_probe probe, struct device *dev,
}
static int _wipe_known_signatures_with_blkid(struct device *dev, const char *name,
+ int exclude_lvm_member,
int yes, force_t force)
{
blkid_probe probe = NULL;
@@ -522,7 +526,7 @@ static int _wipe_known_signatures_with_blkid(struct device *dev, const char *nam
while (!blkid_do_probe(probe)) {
found++;
- if (_blkid_wipe(probe, dev, name, yes, force))
+ if (_blkid_wipe(probe, dev, name, exclude_lvm_member, yes, force))
wiped++;
}
@@ -576,6 +580,7 @@ static int _wipe_signature(struct device *dev, const char *type, const char *nam
}
static int _wipe_known_signatures_with_lvm(struct device *dev, const char *name,
+ int exclude_lvm_member,
int yes, force_t force)
{
if (!_wipe_signature(dev, "software RAID md superblock", name, 4, yes, force, dev_is_md) ||
@@ -587,13 +592,16 @@ static int _wipe_known_signatures_with_lvm(struct device *dev, const char *name,
}
int wipe_known_signatures(struct cmd_context *cmd, struct device *dev,
- const char *name, int yes, force_t force)
+ const char *name, int exclude_lvm_member,
+ int yes, force_t force)
{
#ifdef BLKID_WIPING_SUPPORT
if (find_config_tree_bool(cmd, allocation_use_blkid_wiping_CFG, NULL))
- return _wipe_known_signatures_with_blkid(dev, name, yes, force);
+ return _wipe_known_signatures_with_blkid(dev, name,
+ exclude_lvm_member, yes, force);
#endif
- return _wipe_known_signatures_with_lvm(dev, name, yes, force);
+ return _wipe_known_signatures_with_lvm(dev, name,
+ exclude_lvm_member, yes, force);
}
#ifdef __linux__
diff --git a/lib/device/dev-type.h b/lib/device/dev-type.h
index 39d947b..284280e 100644
--- a/lib/device/dev-type.h
+++ b/lib/device/dev-type.h
@@ -60,7 +60,8 @@ int dev_is_swap(struct device *dev, uint64_t *signature);
int dev_is_luks(struct device *dev, uint64_t *signature);
/* Signature wiping. */
-int wipe_known_signatures(struct cmd_context *cmd, struct device *dev, const char *name, int yes, force_t force);
+int wipe_known_signatures(struct cmd_context *cmd, struct device *dev, const char *name,
+ int exclude_lvm_member, int yes, force_t force);
/* Type-specific device properties */
unsigned long dev_md_stripe_width(struct dev_types *dt, struct device *dev);
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index fe9e656..c67dd38 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -5415,7 +5415,7 @@ int wipe_lv(struct logical_volume *lv, struct wipe_params wp)
if (wp.do_wipe_signatures) {
log_verbose("Wiping known signatures on logical volume \"%s/%s\"",
lv->vg->name, lv->name);
- if (!wipe_known_signatures(lv->vg->cmd, dev, name, wp.yes, wp.force))
+ if (!wipe_known_signatures(lv->vg->cmd, dev, name, 0, wp.yes, wp.force))
stack;
}
diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
index d55dba1..f075c21 100644
--- a/lib/metadata/metadata.c
+++ b/lib/metadata/metadata.c
@@ -1328,7 +1328,7 @@ static int pvcreate_check(struct cmd_context *cmd, const char *name,
goto bad;
}
- if (!wipe_known_signatures(cmd, dev, name, pp->yes, pp->force)) {
+ if (!wipe_known_signatures(cmd, dev, name, 1, pp->yes, pp->force)) {
log_error("Aborting pvcreate on %s.", name);
goto bad;
}
10 years
master - cleanup: tab indent
by Zdenek Kabelac
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=ce8ebda3fc0e82...
Commit: ce8ebda3fc0e8275d15f8cdc7f6f21162c7c1636
Parent: 6bf6430ae94e2a0e8239b198e35b53abbaa3f041
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Nov 28 11:35:53 2013 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Nov 28 12:48:01 2013 +0100
cleanup: tab indent
---
lib/metadata/lv_manip.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index 1fec9a5..fe9e656 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -4725,7 +4725,7 @@ int lv_remove_with_dependencies(struct cmd_context *cmd, struct logical_volume *
yes_no_prompt("Removing origin %s will also remove %u "
"snapshots(s). Proceed? [y/n]: ",
lv->name, lv->origin_count) == 'n')
- goto no_remove;
+ goto no_remove;
dm_list_iterate_safe(snh, snht, &lv->snapshot_segs)
if (!lv_remove_with_dependencies(cmd, dm_list_struct_base(snh, struct lv_segment,
@@ -4762,7 +4762,7 @@ int lv_remove_with_dependencies(struct cmd_context *cmd, struct logical_volume *
(yes_no_prompt("Removal of pool metadata spare logical volume \"%s\" "
"disables automatic recovery attempts after damage "
"to a thin pool. Proceed? [y/n]: ", lv->name) == 'n'))
- goto no_remove;
+ goto no_remove;
return lv_remove_single(cmd, lv, force);
10 years