1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-10-05 07:33:15 +03:00

Compare commits

..

3 Commits

Author SHA1 Message Date
David Teigland
03c2c67875 new udev and systemd autoactivation
new udev rule: 69-dm-lvm.rules

. calls pvscan directly on the added device
. pvscan output indicates if a complete VG can be
  activated
. the complete VG name to activate is set in env var
  LVM_VG_NAME_COMPLETE

new unit file: lvm-vgchange@.service

. udev rule above starts this using systemctl start
  if LVM_VG_NAME_COMPLETE is set
. the service runs vgchange -aay on the vg
2021-03-31 16:31:26 -05:00
David Teigland
e719522e29 logging: to the systemd journal
Configure via lvm.conf log/journal or command line --journal.

Possible values:
"command" records command information.
"output" records default command output.
"debug" records full command debugging.

Multiple values can be set in lvm.conf as an array.
One value can be set in --journal which is added to
values set in lvm.conf
2021-03-31 14:06:19 -05:00
David Teigland
27a19e46f4 pvscan: add options listlvs listvg checkcomplete
pvscan --cache <dev>
    . read only dev
    . create online file for dev

pvscan --listvg <dev>
    . read only dev
    . list VG using dev

pvscan --listlvs <dev>
    . read only dev
    . list VG using dev
    . list LVs using dev

pvscan --cache --listvg [--checkcomplete] <dev>
    . read only dev
    . create online file for dev
    . list VG using dev
    . [check online files and report if VG is complete]

pvscan --cache --listlvs [--checkcomplete] <dev>
    . read only dev
    . create online file for dev
    . list VG using dev
    . list LVs using dev
    . [check online files and report if VG is complete]
    . [check online files and report if LVs are complete]

[--vgonline]
can be used with --checkcomplete, to enable use of a vg online
file.  This results in only the first pvscan command to see
the complete VG to report 'VG complete', and others will report
'VG finished'.  This allows the caller to easily run a single
activation of the VG.

[--udevoutput]
can be used with --cache --listvg --checkcomplete, to enable
an output mode that prints LVM_VG_NAME_COMPLETE='vgname' that
a udev rule can import, and prevents other output from the
command (other output causes udev to ignore the command.)

The list of complete LVs is meant to be passed to lvchange -aay,
or the complete VG used with vgchange -aay.

When --checkcomplete is used, lvm assumes that that the output
will be used to trigger event-based autoactivation, so the pvscan
does nothing if event_activation=0 and --checkcomplete is used.

Example of listlvs
------------------

$ lvs -a vg -olvname,devices
  LV     Devices
  lv_a   /dev/loop0(0)
  lv_ab  /dev/loop0(1),/dev/loop1(1)
  lv_abc /dev/loop0(3),/dev/loop1(3),/dev/loop2(1)
  lv_b   /dev/loop1(0)
  lv_c   /dev/loop2(0)

$ pvscan --cache --listlvs --checkcomplete /dev/loop0
  pvscan[35680] PV /dev/loop0 online, VG vg incomplete (need 2).
  VG vg incomplete
  LV vg/lv_a complete
  LV vg/lv_ab incomplete
  LV vg/lv_abc incomplete

$ pvscan --cache --listlvs --checkcomplete /dev/loop1
  pvscan[35681] PV /dev/loop1 online, VG vg incomplete (need 1).
  VG vg incomplete
  LV vg/lv_b complete
  LV vg/lv_ab complete
  LV vg/lv_abc incomplete

$ pvscan --cache --listlvs --checkcomplete /dev/loop2
  pvscan[35682] PV /dev/loop2 online, VG vg is complete.
  VG vg complete
  LV vg/lv_c complete
  LV vg/lv_abc complete

Example of listvg
-----------------

$ pvscan --cache --listvg --checkcomplete /dev/loop0
  pvscan[35684] PV /dev/loop0 online, VG vg incomplete (need 2).
  VG vg incomplete

$ pvscan --cache --listvg --checkcomplete /dev/loop1
  pvscan[35685] PV /dev/loop1 online, VG vg incomplete (need 1).
  VG vg incomplete

$ pvscan --cache --listvg --checkcomplete /dev/loop2
  pvscan[35686] PV /dev/loop2 online, VG vg is complete.
  VG vg complete
2021-03-31 14:06:14 -05:00
207 changed files with 17407 additions and 10500 deletions

View File

@@ -18,7 +18,7 @@ top_builddir = @top_builddir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
SUBDIRS = libdm conf daemons include lib libdaemon man scripts tools
SUBDIRS = conf daemons include lib libdaemon libdm man scripts tools
ifeq ("@UDEV_RULES@", "yes")
SUBDIRS += udev
@@ -47,6 +47,8 @@ include $(top_srcdir)/base/Makefile
include $(top_srcdir)/device_mapper/Makefile
include $(top_srcdir)/test/unit/Makefile
libdm: include
libdaemon: include
lib: libdaemon $(BASE_TARGET) $(DEVICE_MAPPER_TARGET)
daemons: lib libdaemon tools
scripts: lib
@@ -54,11 +56,15 @@ tools: lib libdaemon
po: tools daemons
man: tools
all_man: tools
scripts: libdm
test: tools daemons
unit-test run-unit-test: test
lib.device-mapper: include.device-mapper
libdm.device-mapper: include.device-mapper
daemons.device-mapper: libdm.device-mapper
tools.device-mapper: libdm.device-mapper
scripts.device-mapper: include.device-mapper
device-mapper: tools.device-mapper daemons.device-mapper man.device-mapper
device_mapper: device-mapper
@@ -76,10 +82,9 @@ daemons.cflow: tools.cflow
cflow: include.cflow
endif
CSCOPE_DIRS = base daemons device_mapper include lib libdaemon scripts tools libdm test
ifneq ("@CSCOPE_CMD@", "")
cscope.out:
@CSCOPE_CMD@ -b -R $(patsubst %,-s%,$(addprefix $(srcdir)/,$(CSCOPE_DIRS)))
@CSCOPE_CMD@ -b -R -s$(top_srcdir)
all: cscope.out
endif
DISTCLEAN_TARGETS += cscope.out
@@ -204,8 +209,8 @@ endif
ifneq ($(shell which ctags 2>/dev/null),)
.PHONY: tags
tags:
test -z "$(shell find $(addprefix $(top_srcdir)/,$(CSCOPE_DIRS)) -type f -name '*.[ch]' -newer tags 2>/dev/null | head -1)" || $(RM) tags
test -f tags || find $(addprefix $(top_srcdir)/,$(CSCOPE_DIRS)) -maxdepth 5 -type f -name '*.[ch]' -exec ctags -a '{}' +
test -z "$(shell find $(top_srcdir) -type f -name '*.[ch]' -newer tags 2>/dev/null | head -1)" || $(RM) tags
test -f tags || find $(top_srcdir) -maxdepth 5 -type f -name '*.[ch]' -exec ctags -a '{}' +
CLEAN_TARGETS += tags
endif

View File

@@ -1,16 +1,10 @@
Version 2.03.12 -
===================================
Better hyphenation usage in man pages.
Replace use of deprecated security_context_t with char*.
Configure supports AIO_LIBS and AIO_CFLAGS.
Improve build process for static builds.
Improve signal handling with lvmpolld.
Signal handler can interrupt command also for SIGTERM.
Lvreduce --yes support.
Add configure option --with/out-symvers for non-glibc builds.
Report error when the filesystem is missing on fsadm resized volume.
Handle better blockdev with --getsize64 support for fsadm.
Do not include editline/history.h when using editline library.
Support lvconvert -Zn with thin-pool conversion.
Support error and zero segtype for thin-pool data for testing.
Support mixed extension for striped, error and zero segtypes.
Support resize also for stacked virtual volumes.

View File

@@ -1,7 +1,5 @@
Version 1.02.177 -
====================================
Configure proceeds without libaio to allow build of device-mapper only.
Fix symbol versioning build with -O2 -flto.
Add dm_tree_node_add_thin_pool_target_v1 with crop_metadata support.
Version 1.02.175 - 08th January 2021

View File

@@ -1086,12 +1086,10 @@ global {
# Activate LVs based on system-generated device events.
# When a device appears on the system, a system-generated event runs
# the pvscan command to activate LVs if the new PV completes the VG.
# Use auto_activation_volume_list to select which LVs should be
# activated from these events (the default is all.)
# When event_activation is disabled, the system will generally run
# a direct activation command to activate LVs in complete VGs.
# Activation commands that are run by the system, either from events
# or at fixed points during startup, use autoactivation (-aay). See
# the --setautoactivation option or the auto_activation_volume_list
# setting to configure autoactivation for specific VGs or LVs.
# This configuration option has an automatic default value.
# event_activation = 1
@@ -1432,22 +1430,22 @@ activation {
# This configuration option does not have a default value defined.
# Configuration option activation/auto_activation_volume_list.
# A list of VGs or LVs that should be autoactivated.
# Autoactivation is an activation command run with -aay,
# i.e. vgchange -aay, lvchange -aay, or pvscan --cache -aay.
# When this list is defined, an autoactivation command will only
# activate LVs included in the list. If this list is undefined,
# it has no effect. If this list is defined but empty, then no
# LVs will be autoactivated. LVs can be included in the list by
# LV name, VG name (applies to all LVs in the VG), or tag name.
# VGs and LVs can also have an autoactivation property set in
# metadata, see --setautoactivation. LVs included in this list
# will not be autoactivated if the VG or LV autoactivation
# property is disabled (see vgs or lvs "-o autoactivation").
# The volume_list setting and the "activation skip" property
# also apply to autoactivation.
# The -aay option is meant to be used by activation commands that
# are run automatically by the system, e.g. from systemd services.
# Only LVs selected by this list are auto-activated.
# This list works like volume_list, but it is used only by
# auto-activation commands. It does not apply to direct activation
# commands. If this list is defined, an LV is only auto-activated
# if it matches an entry in this list. If this list is undefined, it
# imposes no limits on LV auto-activation (all are allowed.) If this
# list is defined and empty, i.e. "[]", then no LVs are selected for
# auto-activation. An LV that is selected by this list for
# auto-activation, must also be selected by volume_list (if defined)
# before it is activated. Auto-activation is an activation command that
# includes the 'a' argument: --activate ay or -a ay. The 'a' (auto)
# argument for auto-activation is meant to be used by activation
# commands that are run automatically by the system, as opposed to LVM
# commands run directly by a user. A user may also use the 'a' flag
# directly to perform auto-activation. Also see pvscan(8) for more
# information about auto-activation.
#
# Accepted values:
# vgname

71
configure vendored
View File

@@ -640,7 +640,6 @@ LVMLOCKD_PIDFILE
LVMPOLLD_PIDFILE
DMEVENTD_PIDFILE
WRITE_INSTALL
WRITECACHE
VDO_LIB
VDO_INCLUDE
VDO
@@ -703,7 +702,6 @@ LIB_SUFFIX
LDDEPS
JOBS
INTL
INTEGRITY
HAVE_VALGRIND
HAVE_REALTIME
HAVE_LIBDL
@@ -797,8 +795,6 @@ PKGCONFIGINIT_CFLAGS
PKG_CONFIG_LIBDIR
PKG_CONFIG_PATH
PKG_CONFIG
AIO_LIBS
AIO_CFLAGS
VDO_FORMAT_CMD
CACHE_RESTORE_CMD
CACHE_REPAIR_CMD
@@ -1002,8 +998,6 @@ CXX
CXXFLAGS
CCC
CPP
AIO_CFLAGS
AIO_LIBS
PKG_CONFIG
PKG_CONFIG_PATH
PKG_CONFIG_LIBDIR
@@ -1719,21 +1713,22 @@ Optional Packages:
create nodes on resume or create [ON=resume]
--with-default-name-mangling=MANGLING
default name mangling: auto/none/hex [auto]
--with-snapshots=TYPE snapshot support: internal/none [internal]
--with-mirrors=TYPE mirror support: internal/none [internal]
--with-snapshots=TYPE snapshot support: internal/shared/none [internal]
--with-mirrors=TYPE mirror support: internal/shared/none [internal]
--with-default-mirror-segtype=TYPE
default mirror segtype: raid1/mirror [raid1]
--with-default-raid10-segtype=TYPE
default mirror segtype: raid10/mirror [raid10]
--with-default-sparse-segtype=TYPE
default sparse segtype: thin/snapshot [thin]
--with-thin=TYPE thin provisioning support: internal/none [internal]
--with-thin=TYPE thin provisioning support: internal/shared/none
[internal]
--with-thin-check=PATH thin_check tool: [autodetect]
--with-thin-dump=PATH thin_dump tool: [autodetect]
--with-thin-repair=PATH thin_repair tool: [autodetect]
--with-thin-restore=PATH
thin_restore tool: [autodetect]
--with-cache=TYPE cache support: internal/none [internal]
--with-cache=TYPE cache support: internal/shared/none [internal]
--with-cache-check=PATH cache_check tool: [autodetect]
--with-cache-dump=PATH cache_dump tool: [autodetect]
--with-cache-repair=PATH
@@ -1803,8 +1798,6 @@ Some influential environment variables:
CXX C++ compiler command
CXXFLAGS C++ compiler flags
CPP C preprocessor
AIO_CFLAGS C compiler flags for AIO
AIO_LIBS linker flags for AIO
PKG_CONFIG path to pkg-config utility
PKG_CONFIG_PATH
directories to add to pkg-config's search path
@@ -6096,7 +6089,7 @@ fi
for ac_header in assert.h ctype.h dirent.h errno.h fcntl.h float.h \
getopt.h inttypes.h langinfo.h libgen.h limits.h locale.h paths.h \
getopt.h inttypes.h langinfo.h libaio.h libgen.h limits.h locale.h paths.h \
signal.h stdarg.h stddef.h stdio.h stdlib.h string.h sys/file.h \
sys/ioctl.h syslog.h sys/mman.h sys/param.h sys/resource.h sys/stat.h \
sys/time.h sys/types.h sys/utsname.h sys/wait.h time.h \
@@ -6129,19 +6122,6 @@ fi
done
for ac_header in libaio.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "libaio.h" "ac_cv_header_libaio_h" "$ac_includes_default"
if test "x$ac_cv_header_libaio_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBAIO_H 1
_ACEOF
LVM_NEEDS_LIBAIO_WARN=
else
LVM_NEEDS_LIBAIO_WARN=y
fi
done
case "$host_os" in
linux*)
@@ -8405,7 +8385,7 @@ fi
case "$MANGLING" in
auto) mangling=DM_STRING_MANGLING_AUTO;;
no|none|disabled) mangling=DM_STRING_MANGLING_NONE;;
none|disabled) mangling=DM_STRING_MANGLING_NONE;;
hex) mangling=DM_STRING_MANGLING_HEX;;
*) as_fn_error $? "--with-default-name-mangling parameter invalid" "$LINENO" 5;;
esac
@@ -8432,7 +8412,7 @@ fi
$as_echo "$SNAPSHOTS" >&6; }
case "$SNAPSHOTS" in
no|none|shared) ;;
none|shared) ;;
internal)
$as_echo "#define SNAPSHOT_INTERNAL 1" >>confdefs.h
;;
@@ -8454,7 +8434,7 @@ fi
$as_echo "$MIRRORS" >&6; }
case "$MIRRORS" in
no|none|shared) ;;
none|shared) ;;
internal)
$as_echo "#define MIRRORED_INTERNAL 1" >>confdefs.h
;;
@@ -8499,10 +8479,7 @@ _ACEOF
# Check whether --with-default-sparse-segtype was given.
if test "${with_default_sparse_segtype+set}" = set; then :
withval=$with_default_sparse_segtype; case "$withval" in
thin|snapshot) DEFAULT_SPARSE_SEGTYPE=$withval ;;
*) as_fn_error $? "--with-default-sparse-segtype parameter invalid" "$LINENO" 5 ;;
esac
withval=$with_default_sparse_segtype; DEFAULT_SPARSE_SEGTYPE=$withval
else
DEFAULT_SPARSE_SEGTYPE="thin"
fi
@@ -8556,7 +8533,7 @@ fi
$as_echo "$THIN" >&6; }
case "$THIN" in
no|none) test "$DEFAULT_SPARSE_SEGTYPE" = "thin" && DEFAULT_SPARSE_SEGTYPE="snapshot" ;;
none) test "$DEFAULT_SPARSE_SEGTYPE" = "thin" && DEFAULT_SPARSE_SEGTYPE="snapshot" ;;
shared) ;;
internal)
$as_echo "#define THIN_INTERNAL 1" >>confdefs.h
@@ -9037,6 +9014,7 @@ $as_echo "$THIN_CHECK_NEEDS_CHECK" >&6; }
$as_echo "#define THIN_CHECK_NEEDS_CHECK 1" >>confdefs.h
fi
;;
esac
@@ -9111,7 +9089,7 @@ fi
$as_echo "$CACHE" >&6; }
case "$CACHE" in
no|none|shared) ;;
none|shared) ;;
internal)
$as_echo "#define CACHE_INTERNAL 1" >>confdefs.h
;;
@@ -9648,7 +9626,7 @@ else
fi
case "$VDO" in
no|none) ;;
none) ;;
internal)
$as_echo "#define VDO_INTERNAL 1" >>confdefs.h
@@ -9800,7 +9778,7 @@ fi
$as_echo "$WRITECACHE" >&6; }
case "$WRITECACHE" in
no|none) ;;
none) ;;
internal)
$as_echo "#define WRITECACHE_INTERNAL 1" >>confdefs.h
@@ -9825,7 +9803,7 @@ fi
$as_echo "$INTEGRITY" >&6; }
case "$INTEGRITY" in
no|none) ;;
none) ;;
internal)
$as_echo "#define INTEGRITY_INTERNAL 1" >>confdefs.h
@@ -9834,14 +9812,6 @@ $as_echo "#define INTEGRITY_INTERNAL 1" >>confdefs.h
*) as_fn_error $? "--with-integrity parameter invalid" "$LINENO" 5 ;;
esac
################################################################################
# Allow users to override default location for libaio
# there seems to be no pkg-config support available
AIO_CFLAGS=
AIO_LIBS=${AIO_LIBS:--laio}
################################################################################
# Check whether --enable-readline was given.
if test "${enable_readline+set}" = set; then :
@@ -10431,7 +10401,7 @@ $as_echo_n "checking whether to use symbol versioning... " >&6; }
if test "${with_symvers+set}" = set; then :
withval=$with_symvers; case "$withval" in
gnu|no) symvers=$withval ;;
*) as_fn_error $? "--with-symvers parameter invalid" "$LINENO" 5 ;;
*) as_fn_error $? "Unknown argument to with-symvers" "$LINENO" 5 ;;
esac
else
symvers=gnu
@@ -10788,6 +10758,7 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
################################################################################
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable valgrind awareness of pools" >&5
$as_echo_n "checking whether to enable valgrind awareness of pools... " >&6; }
@@ -14175,8 +14146,6 @@ _ACEOF
@@ -15554,10 +15523,6 @@ if test -n "$VDO_CONFIGURE_WARN"; then :
$as_echo "$as_me: WARNING: Unrecognized 'vdoformat' tool is REQUIRED for VDO logical volume creation!" >&2;}
fi
if test -n "$LVM_NEEDS_LIBAIO_WARN"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Only libdm part can be build without libaio: make [install_]device-mapper" >&5
$as_echo "$as_me: WARNING: Only libdm part can be build without libaio: make [install_]device-mapper" >&2;}
fi
if test "$ODIRECT" != yes; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: O_DIRECT disabled: low-memory pvmove may lock up" >&5

View File

@@ -101,14 +101,14 @@ AC_HEADER_SYS_WAIT
AC_HEADER_TIME
AC_CHECK_HEADERS([assert.h ctype.h dirent.h errno.h fcntl.h float.h \
getopt.h inttypes.h langinfo.h libgen.h limits.h locale.h paths.h \
getopt.h inttypes.h langinfo.h libaio.h libgen.h limits.h locale.h paths.h \
signal.h stdarg.h stddef.h stdio.h stdlib.h string.h sys/file.h \
sys/ioctl.h syslog.h sys/mman.h sys/param.h sys/resource.h sys/stat.h \
sys/time.h sys/types.h sys/utsname.h sys/wait.h time.h \
unistd.h], , [AC_MSG_ERROR(bailing out)])
AC_CHECK_HEADERS(termios.h sys/statvfs.h sys/timerfd.h sys/vfs.h linux/magic.h linux/fiemap.h)
AC_CHECK_HEADERS(libaio.h,LVM_NEEDS_LIBAIO_WARN=,LVM_NEEDS_LIBAIO_WARN=y)
case "$host_os" in
linux*)
AC_CHECK_HEADERS(asm/byteorder.h linux/fs.h malloc.h,,AC_MSG_ERROR(bailing out)) ;;
@@ -289,7 +289,7 @@ AC_ARG_WITH(default-name-mangling,
MANGLING=$withval, MANGLING=auto)
case "$MANGLING" in
auto) mangling=DM_STRING_MANGLING_AUTO;;
no|none|disabled) mangling=DM_STRING_MANGLING_NONE;;
none|disabled) mangling=DM_STRING_MANGLING_NONE;;
hex) mangling=DM_STRING_MANGLING_HEX;;
*) AC_MSG_ERROR([--with-default-name-mangling parameter invalid]);;
esac
@@ -301,12 +301,12 @@ dnl -- snapshots inclusion type
AC_MSG_CHECKING(whether to include snapshots)
AC_ARG_WITH(snapshots,
AC_HELP_STRING([--with-snapshots=TYPE],
[snapshot support: internal/none [internal]]),
[snapshot support: internal/shared/none [internal]]),
SNAPSHOTS=$withval, SNAPSHOTS=internal)
AC_MSG_RESULT($SNAPSHOTS)
case "$SNAPSHOTS" in
no|none|shared) ;;
none|shared) ;;
internal) AC_DEFINE([SNAPSHOT_INTERNAL], 1,
[Define to 1 to include built-in support for snapshots.]) ;;
*) AC_MSG_ERROR([--with-snapshots parameter invalid]) ;;
@@ -317,12 +317,12 @@ dnl -- mirrors inclusion type
AC_MSG_CHECKING(whether to include mirrors)
AC_ARG_WITH(mirrors,
AC_HELP_STRING([--with-mirrors=TYPE],
[mirror support: internal/none [internal]]),
[mirror support: internal/shared/none [internal]]),
MIRRORS=$withval, MIRRORS=internal)
AC_MSG_RESULT($MIRRORS)
case "$MIRRORS" in
no|none|shared) ;;
none|shared) ;;
internal) AC_DEFINE([MIRRORED_INTERNAL], 1,
[Define to 1 to include built-in support for mirrors.]) ;;
*) AC_MSG_ERROR([--with-mirrors parameter invalid]) ;;
@@ -352,17 +352,14 @@ AC_DEFINE_UNQUOTED([DEFAULT_RAID10_SEGTYPE], ["$DEFAULT_RAID10_SEGTYPE"],
AC_ARG_WITH(default-sparse-segtype,
AC_HELP_STRING([--with-default-sparse-segtype=TYPE],
[default sparse segtype: thin/snapshot [thin]]),
[ case "$withval" in
thin|snapshot) DEFAULT_SPARSE_SEGTYPE=$withval ;;
*) AC_MSG_ERROR(--with-default-sparse-segtype parameter invalid) ;;
esac], DEFAULT_SPARSE_SEGTYPE="thin")
DEFAULT_SPARSE_SEGTYPE=$withval, DEFAULT_SPARSE_SEGTYPE="thin")
################################################################################
dnl -- thin provisioning
AC_MSG_CHECKING(whether to include thin provisioning)
AC_ARG_WITH(thin,
AC_HELP_STRING([--with-thin=TYPE],
[thin provisioning support: internal/none [internal]]),
[thin provisioning support: internal/shared/none [internal]]),
THIN=$withval, THIN=internal)
AC_ARG_WITH(thin-check,
AC_HELP_STRING([--with-thin-check=PATH],
@@ -384,7 +381,7 @@ AC_ARG_WITH(thin-restore,
AC_MSG_RESULT($THIN)
case "$THIN" in
no|none) test "$DEFAULT_SPARSE_SEGTYPE" = "thin" && DEFAULT_SPARSE_SEGTYPE="snapshot" ;;
none) test "$DEFAULT_SPARSE_SEGTYPE" = "thin" && DEFAULT_SPARSE_SEGTYPE="snapshot" ;;
shared) ;;
internal) AC_DEFINE([THIN_INTERNAL], 1,
[Define to 1 to include built-in support for thin provisioning.]) ;;
@@ -461,6 +458,7 @@ case "$THIN" in
if test "$THIN_CHECK_NEEDS_CHECK" = yes; then
AC_DEFINE([THIN_CHECK_NEEDS_CHECK], 1, [Define to 1 if the external 'thin_check' tool requires the --clear-needs-check-flag option])
fi
;;
esac
@@ -481,7 +479,7 @@ dnl -- cache inclusion type
AC_MSG_CHECKING(whether to include cache)
AC_ARG_WITH(cache,
AC_HELP_STRING([--with-cache=TYPE],
[cache support: internal/none [internal]]),
[cache support: internal/shared/none [internal]]),
CACHE=$withval, CACHE="internal")
AC_ARG_WITH(cache-check,
AC_HELP_STRING([--with-cache-check=PATH],
@@ -502,7 +500,7 @@ AC_ARG_WITH(cache-restore,
AC_MSG_RESULT($CACHE)
case "$CACHE" in
no|none|shared) ;;
none|shared) ;;
internal) AC_DEFINE([CACHE_INTERNAL], 1, [Define to 1 to include built-in support for cache.]) ;;
*) AC_MSG_ERROR([--with-cache parameter invalid]) ;;
esac
@@ -615,8 +613,8 @@ AC_ARG_WITH(vdo-format,
[vdoformat tool: [autodetect]]),
VDO_FORMAT_CMD=$withval, VDO_FORMAT_CMD="autodetect")
case "$VDO" in
no|none) ;;
internal)
none) ;;
internal)
AC_DEFINE([VDO_INTERNAL], 1, [Define to 1 to include built-in support for vdo.])
if test "$VDO_FORMAT_CMD" = "autodetect"; then
AC_PATH_TOOL(VDO_FORMAT_CMD, vdoformat, [], [$PATH])
@@ -645,7 +643,7 @@ AC_DEFINE_UNQUOTED([VDO_FORMAT_CMD], ["$VDO_FORMAT_CMD"],
#AC_ARG_WITH(vdo-lib,
# AC_HELP_STRING([--with-vdo-lib=PATH],
# [vdo support: Path to utils lib: [/usr/lib]]),
# VDO_LIB=$withval, VDO_LIB="/usr/lib")
# VDO_LIB=$withval, VDO_LIB="/usr/lib")
#AC_MSG_RESULT($VDO_LIB)
################################################################################
@@ -659,8 +657,8 @@ AC_ARG_WITH(writecache,
AC_MSG_RESULT($WRITECACHE)
case "$WRITECACHE" in
no|none) ;;
internal)
none) ;;
internal)
AC_DEFINE([WRITECACHE_INTERNAL], 1, [Define to 1 to include built-in support for writecache.])
;;
*) AC_MSG_ERROR([--with-writecache parameter invalid]) ;;
@@ -677,21 +675,13 @@ AC_ARG_WITH(integrity,
AC_MSG_RESULT($INTEGRITY)
case "$INTEGRITY" in
no|none) ;;
none) ;;
internal)
AC_DEFINE([INTEGRITY_INTERNAL], 1, [Define to 1 to include built-in support for integrity.])
;;
*) AC_MSG_ERROR([--with-integrity parameter invalid]) ;;
esac
################################################################################
# Allow users to override default location for libaio
# there seems to be no pkg-config support available
AIO_CFLAGS=
AIO_LIBS=${AIO_LIBS:--laio}
AC_ARG_VAR([AIO_CFLAGS], [C compiler flags for AIO])
AC_ARG_VAR([AIO_LIBS], [linker flags for AIO])
################################################################################
dnl -- Disable readline
AC_ARG_ENABLE([readline],
@@ -840,7 +830,7 @@ AC_ARG_WITH(symvers,
[use symbol versioning of the shared library [default=gnu]]),
[ case "$withval" in
gnu|no) symvers=$withval ;;
*) AC_MSG_ERROR(--with-symvers parameter invalid) ;;
*) AC_MSG_ERROR(Unknown argument to with-symvers) ;;
esac], symvers=gnu)
AC_MSG_RESULT($symvers)
@@ -889,6 +879,7 @@ TESTSUITE_DATA='${datarootdir}/lvm2-testsuite'
# double eval needed ${datarootdir} -> ${prefix}/share -> real path
AC_DEFINE_UNQUOTED(TESTSUITE_DATA, ["$(eval echo $(eval echo $TESTSUITE_DATA))"], [Path to testsuite data])
################################################################################
dnl -- Enable valgrind awareness of memory pools
AC_MSG_CHECKING(whether to enable valgrind awareness of pools)
@@ -1808,7 +1799,6 @@ AC_SUBST(BLKDEACTIVATE)
AC_SUBST(HAVE_LIBDL)
AC_SUBST(HAVE_REALTIME)
AC_SUBST(HAVE_VALGRIND)
AC_SUBST(INTEGRITY)
AC_SUBST(INTL)
AC_SUBST(JOBS)
AC_SUBST(LDDEPS)
@@ -1885,7 +1875,6 @@ AC_SUBST(VDO)
AC_SUBST(VDO_FORMAT_CMD)
AC_SUBST(VDO_INCLUDE)
AC_SUBST(VDO_LIB)
AC_SUBST(WRITECACHE)
AC_SUBST(WRITE_INSTALL)
AC_SUBST(DMEVENTD_PIDFILE)
AC_SUBST(LVMPOLLD_PIDFILE)
@@ -1946,6 +1935,7 @@ libdm/libdevmapper.pc
man/Makefile
po/Makefile
scripts/lvm2-pvscan.service
scripts/lvm-vgchange.service
scripts/blkdeactivate.sh
scripts/blk_availability_init_red_hat
scripts/blk_availability_systemd_red_hat.service
@@ -1986,8 +1976,6 @@ AS_IF([test -n "$CACHE_CHECK_VERSION_WARN"],
AS_IF([test -n "$VDO_CONFIGURE_WARN"],
[AC_MSG_WARN([Unrecognized 'vdoformat' tool is REQUIRED for VDO logical volume creation!])])
AS_IF([test -n "$LVM_NEEDS_LIBAIO_WARN"],
[AC_MSG_WARN([Only libdm part can be build without libaio: make [[install_]]device-mapper])])
AS_IF([test "$ODIRECT" != yes],
[AC_MSG_WARN([O_DIRECT disabled: low-memory pvmove may lock up])])

View File

@@ -1548,7 +1548,7 @@ static void cpg_config_callback(cpg_handle_t handle, const struct cpg_name *gnam
member_list, member_list_entries);
}
static cpg_callbacks_t cpg_callbacks = {
cpg_callbacks_t cpg_callbacks = {
.cpg_deliver_fn = cpg_message_callback,
.cpg_confchg_fn = cpg_config_callback,
};

View File

@@ -39,7 +39,7 @@ struct clog_request {
* machine. If the two are equal, there is no need
* to do endian conversions.
*/
union version_u {
union {
uint64_t version[2]; /* LE version and native version */
struct dm_list list;
} u;

View File

@@ -47,7 +47,6 @@ endif
LIB_VERSION = $(LIB_VERSION_DM)
LIB_SHARED = $(LIB_NAME).$(LIB_SUFFIX)
LIBS = $(PTHREAD_LIBS) -L$(interfacebuilddir) -ldevmapper
CLEAN_TARGETS = dmeventd.static $(LIB_NAME).a
@@ -65,18 +64,18 @@ include $(top_builddir)/make.tmpl
all: device-mapper
device-mapper: $(TARGETS)
plugins.device-mapper: $(LIB_SHARED)
CFLAGS_dmeventd.o += $(EXTRA_EXEC_CFLAGS)
LIBS += $(PTHREAD_LIBS) -L$(top_builddir)/libdm -ldevmapper
dmeventd: $(LIB_SHARED) dmeventd.o
@echo " [CC] $@"
$(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) dmeventd.o \
-o $@ $(DL_LIBS) $(DMEVENT_LIBS) $(LIBS)
$(Q) $(CC) $(CFLAGS) -L. $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) dmeventd.o \
-o $@ $(DL_LIBS) $(DMEVENT_LIBS) $(LIBS) -lm
dmeventd.static: $(LIB_STATIC) dmeventd.o
@echo " [CC] $@"
$(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static dmeventd.o \
$(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static -L. -L$(interfacebuilddir) dmeventd.o \
-o $@ $(DL_LIBS) $(DMEVENT_LIBS) $(LIBS) $(STATIC_LIBS)
ifeq ("@PKGCONFIG@", "yes")

View File

@@ -37,27 +37,29 @@ TARGETS = lvmlockd lvmlockctl
CFLOW_SOURCES = $(addprefix $(srcdir)/, $(SOURCES))
CFLOW_TARGET = lvmlockd
.PHONY: install_lvmlockd install_lvmlockctl
.PHONY: install_lvmlockd
include $(top_builddir)/make.tmpl
CFLAGS += $(EXTRA_EXEC_CFLAGS)
INCLUDES += -I$(top_srcdir)/libdaemon/server
LDFLAGS += -L$(top_builddir)/libdaemon/server $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS)
LIBS += $(DAEMON_LIBS) $(PTHREAD_LIBS)
LIBS += $(RT_LIBS) $(DAEMON_LIBS) $(PTHREAD_LIBS)
ifeq ($(USE_SD_NOTIFY),yes)
CFLAGS += $(shell pkg-config --cflags libsystemd) -DUSE_SD_NOTIFY
LIBS += $(shell pkg-config --libs libsystemd)
endif
lvmlockd: $(OBJECTS) $(top_builddir)/libdaemon/server/libdaemonserver.a $(INTERNAL_LIBS)
lvmlockd: $(OBJECTS) $(top_builddir)/libdaemon/client/libdaemonclient.a \
$(top_builddir)/libdaemon/server/libdaemonserver.a
@echo " [CC] $@"
$(Q) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+ $(LOCK_LIBS) $(LIBS)
$(Q) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LOCK_LIBS) -ldaemonserver $(INTERNAL_LIBS) $(LIBS)
lvmlockctl: lvmlockctl.o $(INTERNAL_LIBS)
lvmlockctl: lvmlockctl.o $(top_builddir)/libdaemon/client/libdaemonclient.a
@echo " [CC] $@"
$(Q) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+ $(LIBS)
$(Q) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(INTERNAL_LIBS) $(LIBS)
install_lvmlockd: lvmlockd
@echo " [INSTALL] $<"

View File

@@ -149,7 +149,7 @@ static void _lvmpolld_global_unlock(struct lvmpolld_state *ls)
static int _fini(struct daemon_state *s)
{
int done;
const struct timespec t = { .tv_nsec = 10000000 }; /* .01 sec */
const struct timespec t = { .tv_nsec = 250000000 }; /* .25 sec */
struct lvmpolld_state *ls = s->private;
DEBUGLOG(s, "fini");
@@ -236,7 +236,9 @@ static int poll_for_output(struct lvmpolld_lv *pdlv, struct lvmpolld_thread_data
}
while (1) {
r = poll(fds, 2, pdlv_get_timeout(pdlv) * 1000);
do {
r = poll(fds, 2, pdlv_get_timeout(pdlv) * 1000);
} while (r < 0 && errno == EINTR);
DEBUGLOG(pdlv->ls, "%s: %s %d", PD_LOG_PREFIX, "poll() returned", r);
if (r < 0) {

View File

@@ -931,7 +931,7 @@ int dm_task_add_target(struct dm_task *dmt, uint64_t start, uint64_t size,
#ifdef HAVE_SELINUX
static int _selabel_lookup(const char *path, mode_t mode,
char **scontext)
security_context_t *scontext)
{
#ifdef HAVE_SELINUX_LABEL_H
if (!_selabel_handle &&
@@ -974,7 +974,7 @@ static int _is_selinux_enabled(void)
int dm_prepare_selinux_context(const char *path, mode_t mode)
{
#ifdef HAVE_SELINUX
char *scontext = NULL;
security_context_t scontext = NULL;
if (_is_selinux_enabled() <= 0)
return 1;
@@ -1002,7 +1002,7 @@ int dm_prepare_selinux_context(const char *path, mode_t mode)
int dm_set_selinux_context(const char *path, mode_t mode)
{
#ifdef HAVE_SELINUX
char *scontext = NULL;
security_context_t scontext = NULL;
if (_is_selinux_enabled() <= 0)
return 1;

View File

@@ -26,7 +26,6 @@
#include "lib/activate/activate.h"
#include "lib/misc/lvm-exec.h"
#include "lib/datastruct/str_list.h"
#include "lib/misc/lvm-signal.h"
#include <limits.h>
#include <dirent.h>
@@ -1124,8 +1123,7 @@ static int _percent_run(struct dev_manager *dm, const char *name,
const char *dlid,
const char *target_type, int wait,
const struct logical_volume *lv, dm_percent_t *overall_percent,
uint32_t *event_nr, int fail_if_percent_unsupported,
int *interrupted)
uint32_t *event_nr, int fail_if_percent_unsupported)
{
int r = 0;
struct dm_task *dmt;
@@ -1146,12 +1144,9 @@ static int _percent_run(struct dev_manager *dm, const char *name,
if (!(segtype = get_segtype_from_string(dm->cmd, target_type)))
return_0;
if (wait)
sigint_allow();
if (!(dmt = _setup_task_run(wait ? DM_DEVICE_WAITEVENT : DM_DEVICE_STATUS, &info,
name, dlid, event_nr, 0, 0, 0, 0, 0)))
goto_bad;
return_0;
if (!info.exists)
goto_out;
@@ -1219,19 +1214,8 @@ static int _percent_run(struct dev_manager *dm, const char *name,
display_percent(dm->cmd, *overall_percent));
r = 1;
out:
out:
dm_task_destroy(dmt);
bad:
if (wait) {
sigint_restore();
if (sigint_caught()) {
*interrupted = 1;
return_0;
}
}
return r;
}
@@ -1240,24 +1224,20 @@ static int _percent(struct dev_manager *dm, const char *name, const char *dlid,
const struct logical_volume *lv, dm_percent_t *percent,
uint32_t *event_nr, int fail_if_percent_unsupported)
{
int interrupted = 0;
if (dlid && *dlid) {
if (_percent_run(dm, NULL, dlid, target_type, wait, lv, percent,
event_nr, fail_if_percent_unsupported, &interrupted))
event_nr, fail_if_percent_unsupported))
return 1;
if (!interrupted &&
_original_uuid_format_check_required(dm->cmd) &&
if (_original_uuid_format_check_required(dm->cmd) &&
_percent_run(dm, NULL, dlid + sizeof(UUID_PREFIX) - 1,
target_type, wait, lv, percent,
event_nr, fail_if_percent_unsupported, &interrupted))
event_nr, fail_if_percent_unsupported))
return 1;
}
if (!interrupted && name &&
_percent_run(dm, name, NULL, target_type, wait, lv, percent,
event_nr, fail_if_percent_unsupported, &interrupted))
if (name && _percent_run(dm, name, NULL, target_type, wait, lv, percent,
event_nr, fail_if_percent_unsupported))
return 1;
return_0;

View File

@@ -320,6 +320,33 @@ static int _parse_debug_classes(struct cmd_context *cmd)
return debug_classes;
}
static uint32_t _parse_log_journal(struct cmd_context *cmd, int cfg, const char *cfgname)
{
const struct dm_config_node *cn;
const struct dm_config_value *cv;
uint32_t fields = 0;
uint32_t val;
if (!(cn = find_config_tree_array(cmd, cfg, NULL))) {
log_debug("Unable to find configuration for log/%s.", cfgname);
return 0;
}
for (cv = cn->v; cv; cv = cv->next) {
if (cv->type != DM_CFG_STRING) {
log_verbose("log/%s contains a value which is not a string. Ignoring.", cfgname);
continue;
}
if ((val = log_journal_str_to_val(cv->v.str)))
fields |= val;
else
log_verbose("Unrecognised value for log/%s: %s", cfgname, cv->v.str);
}
return fields;
}
static void _init_logging(struct cmd_context *cmd)
{
int append = 1;
@@ -388,6 +415,9 @@ static void _init_logging(struct cmd_context *cmd)
init_debug_file_fields(_parse_debug_fields(cmd, log_debug_file_fields_CFG, "debug_file_fields"));
init_debug_output_fields(_parse_debug_fields(cmd, log_debug_output_fields_CFG, "debug_output_fields"));
cmd->default_settings.journal = _parse_log_journal(cmd, log_journal_CFG, "journal");
init_log_journal(cmd->default_settings.journal);
t = time(NULL);
ctime_r(&t, &timebuf[0]);
timebuf[24] = '\0';

View File

@@ -29,6 +29,7 @@ struct config_info {
int debug_classes;
int verbose;
int silent;
int suppress;
int test;
int syslog;
int activation;
@@ -40,6 +41,7 @@ struct config_info {
int udev_sync;
int udev_fallback;
int issue_discards;
uint32_t journal;
const char *msg_prefix;
const char *fmt_name;
const char *dmeventd_executable;

View File

@@ -876,6 +876,12 @@ cfg(log_syslog_CFG, "syslog", log_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_SYSLOG,
cfg(log_file_CFG, "file", log_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 0), NULL, 0, NULL,
"Write error and debug log messages to a file specified here.\n")
cfg_array(log_journal_CFG, "journal", log_CFG_SECTION, CFG_ALLOW_EMPTY | CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, NULL, vsn(2, 3, 12), NULL, 0, NULL,
"Record lvm information in the systemd journal.\n"
"command: record commands that are run.\n"
"output: record default output from commands.\n"
"debug: record debug messages from commands.\n")
cfg(log_overwrite_CFG, "overwrite", log_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_OVERWRITE, vsn(1, 0, 0), NULL, 0, NULL,
"Overwrite the log file each time the program is run.\n")
@@ -1117,15 +1123,12 @@ cfg(global_lvdisplay_shows_full_device_path_CFG, "lvdisplay_shows_full_device_pa
cfg(global_event_activation_CFG, "event_activation", global_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_BOOL, 1, vsn(2, 3, 1), 0, 0, NULL,
"Activate LVs based on system-generated device events.\n"
"When a PV appears on the system, a system-generated uevent triggers\n"
"the lvm2-pvscan service which runs the pvscan --cache -aay command.\n"
"If the new PV completes a VG, pvscan autoactivates LVs in the VG.\n"
"When event_activation is disabled, the lvm2-activation services are\n"
"generated and run at fixed points during system startup. These\n"
"services run vgchange -aay to autoactivate LVs in VGs that happen\n"
"to be present at that point in time.\n"
"See the --setautoactivation option or the auto_activation_volume_list\n"
"setting to configure autoactivation for specific VGs or LVs.\n")
"When a device appears on the system, a system-generated event runs\n"
"the pvscan command to activate LVs if the new PV completes the VG.\n"
"Use auto_activation_volume_list to select which LVs should be\n"
"activated from these events (the default is all.)\n"
"When event_activation is disabled, the system will generally run\n"
"a direct activation command to activate LVs in complete VGs.\n")
cfg(global_use_lvmetad_CFG, "use_lvmetad", global_CFG_SECTION, 0, CFG_TYPE_BOOL, 0, vsn(2, 2, 93), 0, vsn(2, 3, 0), NULL,
NULL)
@@ -1405,22 +1408,22 @@ cfg_array(activation_volume_list_CFG, "volume_list", activation_CFG_SECTION, CFG
"#\n")
cfg_array(activation_auto_activation_volume_list_CFG, "auto_activation_volume_list", activation_CFG_SECTION, CFG_ALLOW_EMPTY | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(2, 2, 97), NULL, 0, NULL,
"A list of VGs or LVs that should be autoactivated.\n"
"Autoactivation is an activation command run with -aay,\n"
"i.e. vgchange -aay, lvchange -aay, or pvscan --cache -aay.\n"
"When this list is defined, an autoactivation command will only\n"
"activate LVs included in the list. If this list is undefined,\n"
"it has no effect. If this list is defined but empty, then no\n"
"LVs will be autoactivated. LVs can be included in the list by\n"
"LV name, VG name (applies to all LVs in the VG), or tag name.\n"
"VGs and LVs can also have an autoactivation property set in\n"
"metadata, see --setautoactivation. LVs included in this list\n"
"will not be autoactivated if the VG or LV autoactivation\n"
"property is disabled (see vgs or lvs \"-o autoactivation\").\n"
"The volume_list setting and the \"activation skip\" property\n"
"also apply to autoactivation.\n"
"The -aay option is meant to be used by activation commands that\n"
"are run automatically by the system, e.g. from systemd services.\n"
"Only LVs selected by this list are auto-activated.\n"
"This list works like volume_list, but it is used only by\n"
"auto-activation commands. It does not apply to direct activation\n"
"commands. If this list is defined, an LV is only auto-activated\n"
"if it matches an entry in this list. If this list is undefined, it\n"
"imposes no limits on LV auto-activation (all are allowed.) If this\n"
"list is defined and empty, i.e. \"[]\", then no LVs are selected for\n"
"auto-activation. An LV that is selected by this list for\n"
"auto-activation, must also be selected by volume_list (if defined)\n"
"before it is activated. Auto-activation is an activation command that\n"
"includes the 'a' argument: --activate ay or -a ay. The 'a' (auto)\n"
"argument for auto-activation is meant to be used by activation\n"
"commands that are run automatically by the system, as opposed to LVM\n"
"commands run directly by a user. A user may also use the 'a' flag\n"
"directly to perform auto-activation. Also see pvscan(8) for more\n"
"information about auto-activation.\n"
"#\n"
"Accepted values:\n"
" vgname\n"

View File

@@ -166,14 +166,17 @@ static int _udev_dev_is_md_component(struct device *dev)
if (!(ext = dev_ext_get(dev)))
return_0;
if (!(value = udev_device_get_property_value((struct udev_device *)ext->handle, DEV_EXT_UDEV_BLKID_TYPE)))
if (!(value = udev_device_get_property_value((struct udev_device *)ext->handle, DEV_EXT_UDEV_BLKID_TYPE))) {
dev->flags |= DEV_UDEV_INFO_MISSING;
return 0;
}
return !strcmp(value, DEV_EXT_UDEV_BLKID_TYPE_SW_RAID);
}
#else
static int _udev_dev_is_md_component(struct device *dev)
{
dev->flags |= DEV_UDEV_INFO_MISSING;
return 0;
}
#endif

View File

@@ -1261,8 +1261,10 @@ int udev_dev_is_md_component(struct device *dev)
const char *value;
int ret = 0;
if (!obtain_device_list_from_udev())
if (!obtain_device_list_from_udev()) {
dev->flags |= DEV_UDEV_INFO_MISSING;
return 0;
}
if (!(udev_device = _udev_get_dev(dev)))
return 0;
@@ -1289,6 +1291,7 @@ int udev_dev_is_mpath_component(struct device *dev)
int udev_dev_is_md_component(struct device *dev)
{
dev->flags |= DEV_UDEV_INFO_MISSING;
return 0;
}

View File

@@ -37,8 +37,9 @@
#define DEV_BCACHE_WRITE 0x00008000 /* bcache_fd is open with RDWR */
#define DEV_SCAN_FOUND_LABEL 0x00010000 /* label scan read dev and found label */
#define DEV_IS_MD_COMPONENT 0x00020000 /* device is an md component */
#define DEV_IS_NVME 0x00040000 /* set if dev is nvme */
#define DEV_MATCHED_USE_ID 0x00080000 /* matched an entry from cmd->use_devices */
#define DEV_UDEV_INFO_MISSING 0x00040000 /* we have no udev info for this device */
#define DEV_IS_NVME 0x00080000 /* set if dev is nvme */
#define DEV_MATCHED_USE_ID 0x00100000 /* matched an entry from cmd->use_devices */
/*
* Support for external device info.

View File

@@ -35,7 +35,6 @@ static const struct flag _vg_flags[] = {
{LVM_READ, "READ", STATUS_FLAG},
{LVM_WRITE, "WRITE", STATUS_FLAG},
{LVM_WRITE_LOCKED, "WRITE_LOCKED", COMPATIBLE_FLAG},
{NOAUTOACTIVATE, "NOAUTOACTIVATE", COMPATIBLE_FLAG},
{CLUSTERED, "CLUSTERED", STATUS_FLAG},
{SHARED, "SHARED", STATUS_FLAG},
{PARTIAL_VG, NULL, 0},
@@ -71,7 +70,6 @@ static const struct flag _lv_flags[] = {
{LV_REMOVE_AFTER_RESHAPE, "REMOVE_AFTER_RESHAPE", SEGTYPE_FLAG},
{LV_WRITEMOSTLY, "WRITEMOSTLY", STATUS_FLAG},
{LV_ACTIVATION_SKIP, "ACTIVATION_SKIP", COMPATIBLE_FLAG},
{LV_NOAUTOACTIVATE, "NOAUTOACTIVATE", COMPATIBLE_FLAG},
{LV_ERROR_WHEN_FULL, "ERROR_WHEN_FULL", COMPATIBLE_FLAG},
{LV_METADATA_FORMAT, "METADATA_FORMAT", SEGTYPE_FLAG},
{LV_CROP_METADATA, "CROP_METADATA", SEGTYPE_FLAG},

View File

@@ -25,6 +25,7 @@
#include <syslog.h>
#include <ctype.h>
#include <time.h>
#include <systemd/sd-journal.h>
static FILE *_log_file;
static char _log_file_path[PATH_MAX];
@@ -40,6 +41,7 @@ static char _msg_prefix[30] = " ";
static int _abort_on_internal_errors_config = 0;
static uint32_t _debug_file_fields;
static uint32_t _debug_output_fields;
static uint32_t _log_journal = 0;
static lvm2_log_fn_t _lvm2_log_fn = NULL;
@@ -455,6 +457,11 @@ void init_debug_output_fields(uint32_t debug_fields)
_debug_output_fields = debug_fields;
}
void init_log_journal(uint32_t fields)
{
_log_journal = fields;
}
static void _set_time_prefix(char *prefix, int buflen)
{
@@ -609,6 +616,33 @@ static void _vprint_log(int level, const char *file, int line, int dm_errno_or_c
}
log_it:
if (_log_journal) {
int to_journal = 0;
/* By default the visible command output is _LOG_WARN or less. */
if (_log_journal & LOG_JOURNAL_DEBUG)
to_journal = 1;
if ((_log_journal & LOG_JOURNAL_OUTPUT) && (log_level(level) <= _LOG_WARN))
to_journal = 1;
if (to_journal) {
int prio;
switch (log_level(level)) {
case _LOG_ERR: prio = LOG_ERR; break;
case _LOG_WARN: prio = LOG_WARNING; break;
case _LOG_INFO: prio = LOG_INFO; break;
case _LOG_NOTICE: prio = LOG_NOTICE; break;
case _LOG_DEBUG: prio = LOG_DEBUG; break;
default: prio = LOG_INFO;
}
va_copy(ap, orig_ap);
sd_journal_printv(prio, trformat, ap);
va_end(ap);
}
}
if (!logged_via_report && ((verbose_level() >= level) && !_log_suppress)) {
if (verbose_level() > _LOG_DEBUG) {
memset(buf, 0, sizeof(buf));
@@ -792,3 +826,60 @@ void log_set_report_object_name_and_id(const char *name, const char *id)
_log_report.object_name = name;
_log_report.object_id = id;
}
/*
* TODO: log/journal=["daemon_command"]
* daemon_command: record commands that are run by an lvm daemon.
* (i.e. not commands run directly by a user.)
* For this we need to be able to clearly identify when a command is
* being run by dmeventd/lvmpolld/lvmdbusd.
*
* TODO: log/journal_commmand_names=["lvcreate","lvconvert"]
* This would restrict log/journal=["command"] to the listed command names.
* Also allow "!command" to exclude a command, e.g. ["!pvs"]
*
* TODO: log/journal_daemon_command_names=["lvcreate","lvconvert"]
* This would restrict log/journal=["dameon_command"] to the listed command names.
*
* TODO: log/journal_daemon_names=["dmeventd"]
* This would restrict log/journal=["daemon_command"] to commands run by
* the named daemon.
*
* TODO: log/command_to_file=<path> would write this info to the file.
*
* TODO: log/debug_to_file=<path> would write full debugging to the file.
* (the same effect as log/file=<path> log/level=7)
*/
void log_command(const char *cmd_line, const char *cmd_name, const char *cmd_id)
{
if (_log_journal & LOG_JOURNAL_COMMAND) {
/*
* TODO: DAEMON=dmeventd|lvmpolld|lvmdbusd,
* Could we include caller info such as libblkid, udev rule, etc?
* Does systemd already record the caller for us?
*/
/* The command line, pid, and other things are automatically included. */
sd_journal_send("MESSAGE=lvm command %s", cmd_name,
"MESSAGE_ID=3ca432788c374e4ba684b834188eca36",
"LVM_CMD_NAME=%s", cmd_name,
"LVM_CMD_ID=%s", cmd_id,
"PRIORITY=%i", LOG_INFO,
NULL);
}
}
uint32_t log_journal_str_to_val(const char *str)
{
if (!strcasecmp(str, "command"))
return LOG_JOURNAL_COMMAND;
if (!strcasecmp(str, "output"))
return LOG_JOURNAL_OUTPUT;
if (!strcasecmp(str, "debug"))
return LOG_JOURNAL_DEBUG;
return 0;
}

View File

@@ -63,6 +63,10 @@
#define LOG_DEBUG_FIELD_FILELINE 0x0004
#define LOG_DEBUG_FIELD_MESSAGE 0x0008
#define LOG_JOURNAL_COMMAND 0x0001
#define LOG_JOURNAL_OUTPUT 0x0002
#define LOG_JOURNAL_DEBUG 0x0004
/*
* Classes available for debug log messages.

View File

@@ -62,6 +62,12 @@ void reset_log_duplicated(void);
void init_syslog(int facility);
void fin_syslog(void);
void init_log_journal(uint32_t fields);
uint32_t log_journal_str_to_val(const char *str);
void log_command(const char *cmd_line, const char *cmd_name, const char *cmd_id);
int error_message_produced(void);
void reset_lvm_errno(int store_errmsg);
int stored_errno(void);

View File

@@ -4970,7 +4970,7 @@ static int _request_confirmation(const struct logical_volume *lv,
log_warn("THIS MAY DESTROY YOUR DATA (filesystem etc.)");
if (!lp->force && !lp->yes) {
if (!lp->force) {
if (yes_no_prompt("Do you really want to reduce %s? [y/n]: ",
display_lvname(lv)) == 'n') {
log_error("Logical volume %s NOT reduced.",
@@ -8569,10 +8569,6 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg,
lv_set_activation_skip(lv, lp->activation_skip & ACTIVATION_SKIP_SET,
lp->activation_skip & ACTIVATION_SKIP_SET_ENABLED);
if (lp->noautoactivate)
lv->status |= LV_NOAUTOACTIVATE;
/*
* Check for autoactivation.
* If the LV passes the auto activation filter, activate

View File

@@ -57,9 +57,7 @@
#define ALLOCATABLE_PV UINT64_C(0x0000000000000008) /* PV */
#define ARCHIVED_VG ALLOCATABLE_PV /* VG, reuse same bit */
#define LV_NOAUTOACTIVATE UINT64_C(0x0000000000000010) /* LV - also a PV flag */
#define NOAUTOACTIVATE UINT64_C(0x0000000000000010) /* VG - also a PV flag */
//#define SPINDOWN_LV UINT64_C(0x0000000000000010) /* LV */
//#define BADBLOCK_ON UINT64_C(0x0000000000000020) /* LV */
#define VISIBLE_LV UINT64_C(0x0000000000000040) /* LV */
#define FIXED_MINOR UINT64_C(0x0000000000000080) /* LV */
@@ -161,7 +159,6 @@
#define LV_CACHE_USES_CACHEVOL UINT64_C(0x4000000000000000) /* LV - also a PV flag */
/* Format features flags */
#define FMT_SEGMENTS 0x00000001U /* Arbitrary segment params? */
// #define FMT_MDAS 0x00000002U /* Proper metadata areas? */
@@ -975,7 +972,6 @@ struct lvcreate_params {
#define ACTIVATION_SKIP_SET_ENABLED 0x02 /* set the LV activation skip flag state to 'enabled' */
#define ACTIVATION_SKIP_IGNORE 0x04 /* request to ignore LV activation skip flag (if any) */
int activation_skip; /* activation skip flags */
int noautoactivate; /* 1 if --setautoactivation n */
activation_change_t activate; /* non-snapshot, non-mirror */
thin_discards_t discards; /* thin */
thin_zero_t zero_new_blocks;

View File

@@ -5264,3 +5264,36 @@ struct volume_group *vg_read_for_update(struct cmd_context *cmd, const char *vg_
return vg;
}
int get_visible_lvs_using_pv(struct cmd_context *cmd, struct volume_group *vg, struct device *dev,
struct dm_list *lvs_list)
{
struct pv_list *pvl;
struct lv_list *lvl, *lvl2;
struct physical_volume *pv = NULL;
dm_list_iterate_items(pvl, &vg->pvs) {
if (pvl->pv->dev == dev) {
pv = pvl->pv;
break;
}
}
if (!pv)
return_0;
dm_list_iterate_items(lvl, &vg->lvs) {
if (!lv_is_visible(lvl->lv))
continue;
if (!lv_is_on_pv(lvl->lv, pv))
continue;
if (!(lvl2 = dm_pool_zalloc(cmd->mem, sizeof(*lvl2))))
return_0;
lvl2->lv = lvl->lv;
dm_list_add(lvs_list, &lvl2->list);
}
return 1;
}

View File

@@ -55,6 +55,7 @@
/* May any free extents on this PV be used or must they be left free? */
#define SPINDOWN_LV UINT64_C(0x00000010) /* LV */
#define BADBLOCK_ON UINT64_C(0x00000020) /* LV */
//#define VIRTUAL UINT64_C(0x00010000) /* LV - internal use only */
#define PRECOMMITTED UINT64_C(0x00200000) /* VG - internal use only */
@@ -538,4 +539,8 @@ char *tags_format_and_copy(struct dm_pool *mem, const struct dm_list *tagsl);
void set_pv_devices(struct format_instance *fid, struct volume_group *vg);
int get_visible_lvs_using_pv(struct cmd_context *cmd, struct volume_group *vg, struct device *dev,
struct dm_list *lvs_list);
#endif

View File

@@ -19,6 +19,60 @@
#ifndef _LVM_LIB_H
#define _LVM_LIB_H
/*
* Symbol export control macros
*
* DM_EXPORT_SYMBOL(func,ver)
* DM_EXPORT_SYMBOL_BASE(func,ver)
*
* For functions that have multiple implementations these macros control
* symbol export and versioning.
*
* Function definitions that exist in only one version never need to use
* these macros.
*
* Backwards compatible implementations must include a version tag of
* the form "_v1_02_104" as a suffix to the function name and use the
* macro DM_EXPORT_SYMBOL to export the function and bind it to the
* specified version string.
*
* Since versioning is only available when compiling with GCC the entire
* compatibility version should be enclosed in '#if defined(GNU_SYMVER)',
* for example:
*
* int dm_foo(int bar)
* {
* return bar;
* }
*
* #if defined(__GNUC__)
* // Backward compatible dm_foo() version 1.02.104
* int dm_foo_v1_02_104(void);
* int dm_foo_v1_02_104(void)
* {
* return 0;
* }
* DM_EXPORT_SYMBOL(dm_foo,1_02_104)
* #endif
*
* A prototype for the compatibility version is required as these
* functions must not be declared static.
*
* The DM_EXPORT_SYMBOL_BASE macro is only used to export the base
* versions of library symbols prior to the introduction of symbol
* versioning: it must never be used for new symbols.
*/
#if defined(GNU_SYMVER)
#define DM_EXPORT_SYMBOL(func, ver) \
__asm__(".symver " #func "_v" #ver ", " #func "@DM_" #ver )
#define DM_EXPORT_SYMBOL_BASE(func) \
__asm__(".symver " #func "_base, " #func "@Base" )
#else
#define DM_EXPORT_SYMBOL(func, ver)
#define DM_EXPORT_SYMBOL_BASE(func)
#endif
#include "device_mapper/all.h"
#include "base/memory/zalloc.h"
#include "lib/misc/intl.h"

View File

@@ -26,19 +26,8 @@ static volatile sig_atomic_t _handler_installed = 0;
/* Support 3 level nesting, increase if needed more */
#define MAX_SIGINTS 3
struct ar_sigs {
int sig;
const char *name;
int oldmasked[MAX_SIGINTS];
struct sigaction oldhandler[MAX_SIGINTS];
};
/* List of signals we want to allow/restore */
static struct ar_sigs _ar_sigs[] = {
{ SIGINT, "SIGINT" },
{ SIGTERM, "SIGTERM" },
};
static struct sigaction _oldhandler[MAX_SIGINTS];
static int _oldmasked[MAX_SIGINTS];
static void _catch_sigint(int unused __attribute__((unused)))
{
@@ -69,7 +58,6 @@ void sigint_clear(void)
void sigint_allow(void)
{
int i, mask = 0;
struct sigaction handler;
sigset_t sigs;
@@ -82,37 +70,30 @@ void sigint_allow(void)
if (++_handler_installed > MAX_SIGINTS)
return;
/* Unmask signals. Remember to mask it again on restore. */
/* Grab old sigaction for SIGINT: shall not fail. */
if (sigaction(SIGINT, NULL, &handler))
log_sys_debug("sigaction", "SIGINT");
handler.sa_flags &= ~SA_RESTART; /* Clear restart flag */
handler.sa_handler = _catch_sigint;
/* Override the signal handler: shall not fail. */
if (sigaction(SIGINT, &handler, &_oldhandler[_handler_installed - 1]))
log_sys_debug("sigaction", "SIGINT");
/* Unmask SIGINT. Remember to mask it again on restore. */
if (sigprocmask(0, NULL, &sigs))
log_sys_debug("sigprocmask", "");
for (i = 0; i < DM_ARRAY_SIZE(_ar_sigs); ++i) {
/* Grab old sigaction for SIGNAL: shall not fail. */
if (sigaction(_ar_sigs[i].sig, NULL, &handler))
log_sys_debug("sigaction", _ar_sigs[i].name);
handler.sa_flags &= ~SA_RESTART; /* Clear restart flag */
handler.sa_handler = _catch_sigint;
/* Override the signal handler: shall not fail. */
if (sigaction(_ar_sigs[i].sig, &handler, &_ar_sigs[i].oldhandler[_handler_installed - 1]))
log_sys_debug("sigaction", _ar_sigs[i].name);
if ((_ar_sigs[i].oldmasked[_handler_installed - 1] = sigismember(&sigs, _ar_sigs[i].sig))) {
sigdelset(&sigs, _ar_sigs[i].sig);
mask = 1;
}
if ((_oldmasked[_handler_installed - 1] = sigismember(&sigs, SIGINT))) {
sigdelset(&sigs, SIGINT);
if (sigprocmask(SIG_SETMASK, &sigs, NULL))
log_sys_debug("sigprocmask", "SIG_SETMASK");
}
if (mask && sigprocmask(SIG_SETMASK, &sigs, NULL))
log_sys_debug("sigprocmask", "SIG_SETMASK");
}
void sigint_restore(void)
{
int i, mask = 0;
sigset_t sigs;
if (memlock_count_daemon())
return;
@@ -121,19 +102,16 @@ void sigint_restore(void)
return;
/* Nesting count went below MAX_SIGINTS. */
sigprocmask(0, NULL, &sigs);
for (i = 0; i < DM_ARRAY_SIZE(_ar_sigs); ++i)
if (_ar_sigs[i].oldmasked[_handler_installed]) {
sigaddset(&sigs, _ar_sigs[i].sig);
mask = 1;
}
if (_oldmasked[_handler_installed]) {
sigset_t sigs;
sigprocmask(0, NULL, &sigs);
sigaddset(&sigs, SIGINT);
if (sigprocmask(SIG_SETMASK, &sigs, NULL))
log_sys_debug("sigprocmask", "SIG_SETMASK");
}
if (mask && sigprocmask(SIG_SETMASK, &sigs, NULL))
log_sys_debug("sigprocmask", "SIG_SETMASK");
for (i = 0; i < DM_ARRAY_SIZE(_ar_sigs); ++i)
if (sigaction(_ar_sigs[i].sig, &_ar_sigs[i].oldhandler[_handler_installed], NULL))
log_sys_debug("sigaction", _ar_sigs[i].name);
if (sigaction(SIGINT, &_oldhandler[_handler_installed], NULL))
log_sys_debug("sigaction", "SIGINT restore");
}
void block_signals(uint32_t flags __attribute__((unused)))

View File

@@ -61,7 +61,6 @@ FIELD(LVS, lv, STR, "AllocPol", lvid, 10, lvallocationpolicy, lv_allocation_poli
FIELD(LVS, lv, BIN, "AllocLock", lvid, 10, lvallocationlocked, lv_allocation_locked, "Set if LV is locked against allocation changes.", 0)
FIELD(LVS, lv, BIN, "FixMin", lvid, 10, lvfixedminor, lv_fixed_minor, "Set if LV has fixed minor number assigned.", 0)
FIELD(LVS, lv, BIN, "SkipAct", lvid, 15, lvskipactivation, lv_skip_activation, "Set if LV is skipped on activation.", 0)
FIELD(LVS, lv, BIN, "AutoAct", lvid, 0, lvautoactivation, lv_autoactivation, "Set if LV autoactivation is enabled.", 0)
FIELD(LVS, lv, STR, "WhenFull", lvid, 15, lvwhenfull, lv_when_full, "For thin pools, behavior when full.", 0)
FIELD(LVS, lv, STR, "Active", lvid, 0, lvactive, lv_active, "Active state of the LV.", 0)
FIELD(LVS, lv, BIN, "ActLocal", lvid, 10, lvactivelocally, lv_active_locally, "Set if the LV is active locally.", 0)
@@ -223,7 +222,6 @@ FIELD(VGS, vg, STR, "Attr", cmd, 5, vgstatus, vg_attr, "Various attributes - see
FIELD(VGS, vg, STR, "VPerms", cmd, 10, vgpermissions, vg_permissions, "VG permissions.", 0)
FIELD(VGS, vg, BIN, "Extendable", cmd, 0, vgextendable, vg_extendable, "Set if VG is extendable.", 0)
FIELD(VGS, vg, BIN, "Exported", cmd, 10, vgexported, vg_exported, "Set if VG is exported.", 0)
FIELD(VGS, vg, BIN, "AutoAct", cmd, 0, vgautoactivation, vg_autoactivation, "Set if VG autoactivation is enabled.", 0)
FIELD(VGS, vg, BIN, "Partial", cmd, 10, vgpartial, vg_partial, "Set if VG is partial.", 0)
FIELD(VGS, vg, STR, "AllocPol", cmd, 10, vgallocationpolicy, vg_allocation_policy, "VG allocation policy.", 0)
FIELD(VGS, vg, BIN, "Clustered", cmd, 10, vgclustered, vg_clustered, "Set if VG is clustered.", 0)

View File

@@ -269,8 +269,6 @@ GET_PV_STR_PROPERTY_FN(pv_device_id_type, pv->device_id_type)
#define _vg_extendable_get prop_not_implemented_get
#define _vg_exported_set prop_not_implemented_set
#define _vg_exported_get prop_not_implemented_get
#define _vg_autoactivation_set prop_not_implemented_set
#define _vg_autoactivation_get prop_not_implemented_get
#define _vg_partial_set prop_not_implemented_set
#define _vg_partial_get prop_not_implemented_get
#define _vg_allocation_policy_set prop_not_implemented_set
@@ -325,8 +323,6 @@ GET_PV_STR_PROPERTY_FN(pv_device_id_type, pv->device_id_type)
#define _lv_skip_activation_get prop_not_implemented_get
#define _lv_check_needed_set prop_not_implemented_set
#define _lv_check_needed_get prop_not_implemented_get
#define _lv_autoactivation_set prop_not_implemented_set
#define _lv_autoactivation_get prop_not_implemented_get
#define _lv_historical_set prop_not_implemented_set
#define _lv_historical_get prop_not_implemented_get

View File

@@ -3573,15 +3573,6 @@ static int _vgexported_disp(struct dm_report *rh, struct dm_pool *mem,
return _binary_disp(rh, mem, field, exported, GET_FIRST_RESERVED_NAME(vg_exported_y), private);
}
static int _vgautoactivation_disp(struct dm_report *rh, struct dm_pool *mem,
struct dm_report_field *field,
const void *data, void *private)
{
const struct volume_group *vg = (const struct volume_group *)data;
int aa_yes = (vg->status & NOAUTOACTIVATE) ? 0 : 1;
return _binary_disp(rh, mem, field, aa_yes, "enabled", private);
}
static int _vgpartial_disp(struct dm_report *rh, struct dm_pool *mem,
struct dm_report_field *field,
const void *data, void *private)
@@ -3978,14 +3969,6 @@ static int _lvskipactivation_disp(struct dm_report *rh, struct dm_pool *mem,
return _binary_disp(rh, mem, field, skip_activation, "skip activation", private);
}
static int _lvautoactivation_disp(struct dm_report *rh, struct dm_pool *mem,
struct dm_report_field *field,
const void *data, void *private)
{
int aa_yes = (((const struct logical_volume *) data)->status & LV_NOAUTOACTIVATE) ? 0 : 1;
return _binary_disp(rh, mem, field, aa_yes, "enabled", private);
}
static int _lvhistorical_disp(struct dm_report *rh, struct dm_pool *mem,
struct dm_report_field *field,
const void *data, void *private)

View File

@@ -551,14 +551,9 @@ static void _reap(daemon_state s, int waiting)
while (ts) {
if (waiting || !ts->active) {
if (ts->client.thread_id) {
if ((errno = pthread_kill(ts->client.thread_id, SIGTERM)) &&
(errno != ESRCH))
ERROR(&s, "pthread_kill failed for pid %ld",
(long)ts->client.thread_id);
if ((errno = pthread_join(ts->client.thread_id, &rv)))
ERROR(&s, "pthread_join failed: %s", strerror(errno));
}
if (ts->client.thread_id &&
(errno = pthread_join(ts->client.thread_id, &rv)))
ERROR(&s, "pthread_join failed: %s", strerror(errno));
last->next = ts->next;
free(ts);
} else
@@ -664,13 +659,19 @@ void daemon_start(daemon_state s)
if (sigprocmask(SIG_SETMASK, NULL, &old_set))
perror("sigprocmask error");
while (!failed && !_shutdown_requested) {
while (!failed) {
_reset_timeout(s);
FD_ZERO(&in);
FD_SET(s.socket_fd, &in);
if (sigprocmask(SIG_SETMASK, &new_set, NULL))
perror("sigprocmask error");
if (_shutdown_requested && !s.threads->next) {
if (sigprocmask(SIG_SETMASK, &old_set, NULL))
perror("sigprocmask error");
INFO(&s, "%s shutdown requested", s.name);
break;
}
ret = pselect(s.socket_fd + 1, &in, NULL, NULL, _get_timeout(s), &old_set);
if (sigprocmask(SIG_SETMASK, &old_set, NULL))
perror("sigprocmask error");
@@ -678,7 +679,6 @@ void daemon_start(daemon_state s)
if (ret < 0) {
if ((errno != EINTR) && (errno != EAGAIN))
perror("select error");
_reap(s, 0);
continue;
}
@@ -698,9 +698,6 @@ void daemon_start(daemon_state s)
}
}
if (_shutdown_requested)
INFO(&s, "%s shutdown requested", s.name);
INFO(&s, "%s waiting for client threads to finish", s.name);
_reap(s, 1);
out:

View File

@@ -183,7 +183,6 @@ dm_task_destroy
dm_task_enable_checks
dm_task_get_deps
dm_task_get_driver_version
dm_task_get_info
dm_task_get_info_with_deferred_remove
dm_task_get_message_response
dm_task_get_name
@@ -235,7 +234,6 @@ dm_tree_free
dm_tree_get_cookie
dm_tree_children_use_uuid
dm_tree_next_child
dm_tree_node_add_cache_target
dm_tree_node_add_crypt_target
dm_tree_node_add_error_target
dm_tree_node_add_linear_target

View File

@@ -1,2 +1,2 @@
dm_config_value_get_format_flags
dm_config_value_set_format_flags
dm_config_value_get_format_flags

View File

@@ -1,2 +1,2 @@
dm_report_value_cache_get
dm_report_value_cache_set
dm_report_value_cache_get

View File

@@ -6,7 +6,6 @@ dm_stats_bind_uuid
dm_stats_buffer_destroy
dm_stats_clear_region
dm_stats_create
dm_stats_create_region
dm_stats_delete_region
dm_stats_destroy
dm_stats_get_area_start
@@ -30,12 +29,12 @@ dm_stats_get_io_nsecs
dm_stats_get_nr_areas
dm_stats_get_nr_regions
dm_stats_get_rd_merges_per_sec
dm_stats_get_reads
dm_stats_get_reads_merged
dm_stats_get_reads_per_sec
dm_stats_get_read_nsecs
dm_stats_get_reads
dm_stats_get_read_sectors
dm_stats_get_read_sectors_per_sec
dm_stats_get_reads_merged
dm_stats_get_reads_per_sec
dm_stats_get_region_area_len
dm_stats_get_region_aux_data
dm_stats_get_region_len
@@ -50,12 +49,12 @@ dm_stats_get_total_read_nsecs
dm_stats_get_total_write_nsecs
dm_stats_get_utilization
dm_stats_get_weighted_io_nsecs
dm_stats_get_writes
dm_stats_get_writes_merged
dm_stats_get_writes_per_sec
dm_stats_get_write_nsecs
dm_stats_get_writes
dm_stats_get_write_sectors
dm_stats_get_write_sectors_per_sec
dm_stats_get_writes_merged
dm_stats_get_writes_per_sec
dm_stats_get_wr_merges_per_sec
dm_stats_list
dm_stats_populate

View File

@@ -1,5 +1,5 @@
dm_message_supports_precise_timestamps
dm_stats_create_region
#dm_stats_create_region
dm_stats_driver_supports_precise
dm_stats_get_current_region_precise_timestamps
dm_stats_get_region_precise_timestamps

View File

@@ -1,3 +1,3 @@
dm_hold_control_dev
dm_report_compact_given_fields
dm_hold_control_dev
dm_tree_node_size_changed

View File

@@ -1,5 +1,5 @@
dm_report_group_create
dm_report_group_destroy
dm_report_group_pop
dm_report_group_push
dm_report_group_pop
dm_report_group_destroy
dm_report_set_selection

View File

@@ -1,4 +1,4 @@
dm_bitset_parse_list
#dm_bitset_parse_list
dm_stats_create_group
dm_stats_current_object_type
dm_stats_delete_group

View File

@@ -1,9 +1,9 @@
dm_bitset_parse_list
dm_bit_get_last
dm_bit_get_prev
dm_filemapd_mode_from_string
dm_stats_update_regions_from_fd
dm_bitset_parse_list
dm_stats_bind_from_fd
dm_stats_start_filemapd
dm_stats_update_regions_from_fd
dm_tree_node_add_cache_target
dm_tree_node_add_raid_target_with_params_v2
dm_tree_node_add_cache_target

View File

@@ -47,7 +47,7 @@ endif
LIB_SHARED = $(interface)/libdevmapper.$(LIB_SUFFIX)
LIB_VERSION = $(LIB_VERSION_DM)
TARGETS = libdevmapper.$(LIB_SUFFIX) libdevmapper.$(LIB_SUFFIX).$(LIB_VERSION) .symver_check
TARGETS = libdevmapper.$(LIB_SUFFIX) libdevmapper.$(LIB_SUFFIX).$(LIB_VERSION)
CFLOW_LIST = $(SOURCES)
CFLOW_LIST_TARGET = libdevmapper.cflow
@@ -59,24 +59,16 @@ include $(top_builddir)/libdm/make.tmpl
PROGS_CFLAGS = $(UDEV_CFLAGS)
device-mapper: $(TARGETS)
LIBS += $(SELINUX_LIBS) $(UDEV_LIBS) $(PTHREAD_LIBS) $(RT_LIBS) $(M_LIBS)
dm-tools.device-mapper: device-mapper
device-mapper: all
dm-tools.device-mapper: $(TARGETS)
libdevmapper.$(LIB_SUFFIX) libdevmapper.$(LIB_SUFFIX).$(LIB_VERSION): $(LIB_SHARED)
@echo " [LN] $<"
$(Q) $(LN_S) -f $< $@
# Check versioned build when default versioned symbol is present @@
# also the older symbol is built-in
.symver_check: $(LIB_SHARED)
@echo " [CHECK] $<"
$(Q) if readelf -Ws $< | grep -q dm_stats_create_region@@; then \
SYM=$$(readelf -Ws $< | grep dm_stats_create_region@DM_1_02_106); \
if test -n "$$SYM"; then touch $@; \
else echo >&2 "Missing versioned symbols in $<"; false; fi; \
else touch $@; fi
.PHONY: install_dynamic install_static install_include \
install_ioctl install_ioctl_static \
install_pkgconfig

View File

@@ -247,11 +247,11 @@ bad:
* Maintain backward compatibility with older versions that did not
* accept a 'min_num_bits' argument to dm_bitset_parse_list().
*/
DM_EXPORT_SYMBOL(dm_bitset_parse_list, 1_02_129)
dm_bitset_t dm_bitset_parse_list_v1_02_129(const char *str, struct dm_pool *mem);
dm_bitset_t dm_bitset_parse_list_v1_02_129(const char *str, struct dm_pool *mem)
{
return dm_bitset_parse_list(str, mem, 0);
}
DM_EXPORT_SYMBOL(dm_bitset_parse_list, 1_02_129);
#endif

View File

@@ -52,19 +52,18 @@ include $(top_builddir)/libdm/make.tmpl
CFLAGS_dmsetup.o += $(UDEV_CFLAGS) $(EXTRA_EXEC_CFLAGS)
CFLAGS_dmfilemapd.o += $(EXTRA_EXEC_CFLAGS)
LIBDM_LIBS = -L$(interfacebuilddir) -ldevmapper
LIBDM_SHARED = $(interfacebuilddir)/libdevmapper.so
LIBDM_STATIC = $(interfacebuilddir)/libdevmapper.a
LDFLAGS += -L$(interfacebuilddir)
DMLIBS = -ldevmapper
dmsetup: dmsetup.o $(LIBDM_SHARED)
dmsetup: dmsetup.o
@echo " [CC] $@"
$(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) \
-o $@ $< $(LIBDM_LIBS) $(LIBS)
-o $@ $+ $(DMLIBS)
dmsetup.static: dmsetup.o $(LIBDM_STATIC)
dmsetup.static: dmsetup.o
@echo " [CC] $@"
$(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static \
-o $@ $< $(LIBDM_LIBS) $(LIBS) $(STATIC_LIBS)
-o $@ $+ $(DMLIBS) $(STATIC_LIBS)
install_dmsetup_dynamic: dmsetup
@echo " [INSTALL] $<"
@@ -74,18 +73,18 @@ install_dmsetup_dynamic: dmsetup
install_dmsetup_static: dmsetup.static
@echo " [INSTALL] $<"
$(Q) $(INSTALL_PROGRAM) -D $< $(staticdir)/$(<F)
$(Q) $(LN_S) -f $(<F) $(staticdir)/dmstats.static
$(Q) $(LN_S) -f $(<F) $(staticdir)/dmstats
dmfilemapd: dmfilemapd.o $(LIBDM_SHARED)
dmfilemapd: dmfilemapd.o $(LIB_SHARED)
@echo " [CC] $@"
$(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(EXTRA_EXEC_LDFLAGS) $(ELDFLAGS) \
-o $@ $< $(LIBDM_LIBS) $(LIBS)
-o $@ $+ $(DMLIBS)
dmfilemapd.static: dmfilemapd.o $(LIBDM_STATIC)
dmfilemapd.static: dmfilemapd.o $(LIB_STATIC)
@echo " [CC] $@"
$(Q) $(CC) $(CFLAGS) $(LDFLAGS) -static \
-o $@ $< $(LIBDM_LIBS) $(LIBS) $(STATIC_LIBS)
$(Q) $(CC) $(CFLAGS) $(LDFLAGS) $(ELDFLAGS) -static \
-o $@ $+ $(DMLIBS) $(STATIC_LIBS)
install_dmfilemapd_dynamic: dmfilemapd
@echo " [INSTALL] $<"

View File

@@ -709,8 +709,7 @@ int dm_format_dev(char *buf, int bufsize, uint32_t dev_major,
return 1;
}
DM_EXPORT_NEW_SYMBOL(int, dm_task_get_info, 1_02_97)
(struct dm_task *dmt, struct dm_info *info)
int dm_task_get_info(struct dm_task *dmt, struct dm_info *info)
{
if (!dmt->dmi.v4)
return 0;
@@ -2211,8 +2210,8 @@ void dm_lib_exit(void)
* no code in this file accidentally calls it.
*/
DM_EXPORT_SYMBOL_BASE(dm_task_get_info)
int dm_task_get_info_base(struct dm_task *dmt, struct dm_info *info);
DM_EXPORT_SYMBOL_BASE(dm_task_get_info);
int dm_task_get_info_base(struct dm_task *dmt, struct dm_info *info)
{
struct dm_info new_info;
@@ -2225,8 +2224,6 @@ int dm_task_get_info_base(struct dm_task *dmt, struct dm_info *info)
return 1;
}
#endif
int dm_task_get_info_with_deferred_remove(struct dm_task *dmt, struct dm_info *info);
int dm_task_get_info_with_deferred_remove(struct dm_task *dmt, struct dm_info *info)
{
@@ -2239,3 +2236,4 @@ int dm_task_get_info_with_deferred_remove(struct dm_task *dmt, struct dm_info *i
return 1;
}
#endif

View File

@@ -47,7 +47,7 @@ struct dm_task {
mode_t mode;
uint32_t read_ahead;
uint32_t read_ahead_flags;
union dmi_u {
union {
struct dm_ioctl *v4;
} dmi;
char *newname;

View File

@@ -247,7 +247,7 @@ struct dm_timestamp *dm_task_get_ioctl_timestamp(struct dm_task *dmt);
*/
int dm_task_enable_checks(struct dm_task *dmt);
typedef enum dm_add_node_e {
typedef enum {
DM_ADD_NODE_ON_RESUME, /* add /dev/mapper node with dmsetup resume */
DM_ADD_NODE_ON_CREATE /* add /dev/mapper node with dmsetup create */
} dm_add_node_t;
@@ -294,7 +294,7 @@ void *dm_get_next_target(struct dm_task *dmt,
*/
/* Parse params from STATUS call for mirror target */
typedef enum dm_status_mirror_health_e {
typedef enum {
DM_STATUS_MIRROR_ALIVE = 'A',/* No failures */
DM_STATUS_MIRROR_FLUSH_FAILED = 'F',/* Mirror out-of-sync */
DM_STATUS_MIRROR_WRITE_FAILED = 'D',/* Mirror out-of-sync */
@@ -307,14 +307,14 @@ struct dm_status_mirror {
uint64_t total_regions;
uint64_t insync_regions;
uint32_t dev_count; /* # of devs[] elements (<= 8) */
struct dm_dev_leg_health_s {
struct {
dm_status_mirror_health_t health;
uint32_t major;
uint32_t minor;
} *devs; /* array with individual legs */
const char *log_type; /* core, disk,.... */
uint32_t log_count; /* # of logs[] elements */
struct dm_dev_log_health_s {
struct {
dm_status_mirror_health_t health;
uint32_t major;
uint32_t minor;
@@ -404,7 +404,7 @@ int dm_get_status_snapshot(struct dm_pool *mem, const char *params,
struct dm_status_snapshot **status);
/* Parse params from STATUS call for thin_pool target */
typedef enum dm_thin_discards_e {
typedef enum {
DM_THIN_DISCARDS_IGNORE,
DM_THIN_DISCARDS_NO_PASSDOWN,
DM_THIN_DISCARDS_PASSDOWN
@@ -992,7 +992,7 @@ const char *dm_stats_get_region_program_id(const struct dm_stats *dms,
const char *dm_stats_get_region_aux_data(const struct dm_stats *dms,
uint64_t region_id);
typedef enum dm_stats_obj_type_e {
typedef enum {
DM_STATS_OBJECT_TYPE_NONE,
DM_STATS_OBJECT_TYPE_AREA,
DM_STATS_OBJECT_TYPE_REGION,
@@ -1405,7 +1405,7 @@ uint64_t *dm_stats_update_regions_from_fd(struct dm_stats *dms, int fd,
* and placing a new file at the same path.
*/
typedef enum dm_filemapd_mode_e {
typedef enum {
DM_FILEMAPD_FOLLOW_INODE,
DM_FILEMAPD_FOLLOW_PATH,
DM_FILEMAPD_FOLLOW_NONE
@@ -1464,7 +1464,7 @@ void dm_task_update_nodes(void);
* HEX mangling format: \xNN, NN being the hex value of the character.
* (whitelist and format supported by udev)
*/
typedef enum dm_string_mangling_e {
typedef enum {
DM_STRING_MANGLING_NONE, /* do not mangle at all */
DM_STRING_MANGLING_AUTO, /* mangle only if not already mangled with hex, error when mixed */
DM_STRING_MANGLING_HEX /* always mangle with hex encoding, no matter what the input is */
@@ -1930,7 +1930,7 @@ int dm_tree_node_add_cache_target(struct dm_tree_node *node,
* Replicator operation mode
* Note: API for Replicator is not yet stable
*/
typedef enum dm_replicator_mode_e {
typedef enum {
DM_REPLICATOR_SYNC, /* Synchronous replication */
DM_REPLICATOR_ASYNC_WARN, /* Warn if async replicator is slow */
DM_REPLICATOR_ASYNC_STALL, /* Stall replicator if not fast enough */
@@ -1995,7 +1995,7 @@ int dm_tree_node_add_thin_pool_target_v1(struct dm_tree_node *node,
unsigned crop_metadata);
/* Supported messages for thin provision target */
typedef enum dm_thin_message_e {
typedef enum {
DM_THIN_MESSAGE_CREATE_SNAP, /* device_id, origin_id */
DM_THIN_MESSAGE_CREATE_THIN, /* device_id */
DM_THIN_MESSAGE_DELETE, /* device_id */
@@ -2066,7 +2066,7 @@ void dm_tree_node_set_read_ahead(struct dm_tree_node *dnode,
* Callback is called before 'activation' of node for activation tree,
* or 'deactivation' of node for deactivation tree.
*/
typedef enum dm_node_callback_e {
typedef enum {
DM_NODE_CALLBACK_PRELOADED, /* Node has preload deps */
DM_NODE_CALLBACK_DEACTIVATED, /* Node is deactivated */
} dm_node_callback_t;
@@ -2728,7 +2728,7 @@ uint64_t dm_units_to_factor(const char *units, char *unit_type,
/*
* Type of unit specifier used by dm_size_to_string().
*/
typedef enum dm_size_suffix_e {
typedef enum {
DM_SIZE_LONG = 0, /* Megabyte */
DM_SIZE_SHORT = 1, /* MB or MiB */
DM_SIZE_UNIT = 2 /* M or m */
@@ -2844,7 +2844,7 @@ uint32_t dm_regex_fingerprint(struct dm_regex *regex);
*/
#define DM_PERCENT_CHAR '%'
typedef enum dm_percent_range_e {
typedef enum {
DM_PERCENT_0 = 0,
DM_PERCENT_1 = 1000000,
DM_PERCENT_100 = 100 * DM_PERCENT_1,
@@ -3007,7 +3007,7 @@ struct dm_report_reserved_value {
/*
* Available actions for dm_report_reserved_value_handler.
*/
typedef enum dm_report_reserved_action_e {
typedef enum {
DM_REPORT_RESERVED_PARSE_FUZZY_NAME,
DM_REPORT_RESERVED_GET_DYNAMIC_VALUE,
} dm_report_reserved_action_t;
@@ -3166,7 +3166,7 @@ void dm_report_field_set_value(struct dm_report_field *field, const void *value,
*/
struct dm_report_group;
typedef enum dm_report_group_type_e {
typedef enum {
DM_REPORT_GROUP_SINGLE,
DM_REPORT_GROUP_BASIC,
DM_REPORT_GROUP_JSON
@@ -3218,7 +3218,7 @@ int dm_report_group_destroy(struct dm_report_group *group);
#define DM_STATS_REGION_CURRENT UINT64_MAX
#define DM_STATS_AREA_CURRENT UINT64_MAX
typedef enum dm_stats_counter_e {
typedef enum {
DM_STATS_READS_COUNT,
DM_STATS_READS_MERGED_COUNT,
DM_STATS_READ_SECTORS_COUNT,
@@ -3305,7 +3305,7 @@ uint64_t dm_stats_get_total_write_nsecs(const struct dm_stats *dms,
* average_wr_wait_time: the average write wait time
*/
typedef enum dm_stats_metric_e {
typedef enum {
DM_STATS_RD_MERGES_PER_SEC,
DM_STATS_WR_MERGES_PER_SEC,
DM_STATS_READS_PER_SEC,
@@ -3495,7 +3495,7 @@ const char *dm_histogram_to_string(const struct dm_histogram *dmh, int bin,
/*************************
* config file parse/print
*************************/
typedef enum dm_config_value_type_e {
typedef enum {
DM_CFG_INT,
DM_CFG_FLOAT,
DM_CFG_STRING,
@@ -3505,7 +3505,7 @@ typedef enum dm_config_value_type_e {
struct dm_config_value {
dm_config_value_type_t type;
union dm_config_value_u {
union {
int64_t i;
float f;
double d; /* Unused. */

View File

@@ -929,7 +929,7 @@ int dm_task_add_target(struct dm_task *dmt, uint64_t start, uint64_t size,
#ifdef HAVE_SELINUX
static int _selabel_lookup(const char *path, mode_t mode,
char **scontext)
security_context_t *scontext)
{
#ifdef HAVE_SELINUX_LABEL_H
if (!_selabel_handle &&
@@ -972,7 +972,7 @@ static int _is_selinux_enabled(void)
int dm_prepare_selinux_context(const char *path, mode_t mode)
{
#ifdef HAVE_SELINUX
char *scontext = NULL;
security_context_t scontext = NULL;
if (_is_selinux_enabled() <= 0)
return 1;
@@ -1000,7 +1000,7 @@ int dm_prepare_selinux_context(const char *path, mode_t mode)
int dm_set_selinux_context(const char *path, mode_t mode)
{
#ifdef HAVE_SELINUX
char *scontext = NULL;
security_context_t scontext = NULL;
if (_is_selinux_enabled() <= 0)
return 1;

View File

@@ -3311,16 +3311,15 @@ int dm_tree_node_add_raid_target_with_params_v2(struct dm_tree_node *node,
return 1;
}
DM_EXPORT_NEW_SYMBOL(int, dm_tree_node_add_cache_target, 1_02_138)
(struct dm_tree_node *node,
uint64_t size,
uint64_t feature_flags, /* DM_CACHE_FEATURE_* */
const char *metadata_uuid,
const char *data_uuid,
const char *origin_uuid,
const char *policy_name,
const struct dm_config_node *policy_settings,
uint32_t data_block_size)
int dm_tree_node_add_cache_target(struct dm_tree_node *node,
uint64_t size,
uint64_t feature_flags, /* DM_CACHE_FEATURE_* */
const char *metadata_uuid,
const char *data_uuid,
const char *origin_uuid,
const char *policy_name,
const struct dm_config_node *policy_settings,
uint32_t data_block_size)
{
struct dm_config_node *cn;
struct load_segment *seg;
@@ -3859,8 +3858,8 @@ void dm_tree_node_set_callback(struct dm_tree_node *dnode,
*/
/* Backward compatible dm_tree_node_size_changed() implementations. */
DM_EXPORT_SYMBOL_BASE(dm_tree_node_size_changed)
int dm_tree_node_size_changed_base(const struct dm_tree_node *dnode);
DM_EXPORT_SYMBOL_BASE(dm_tree_node_size_changed);
int dm_tree_node_size_changed_base(const struct dm_tree_node *dnode)
{
/* Base does not make difference between smaller and bigger */
@@ -3875,7 +3874,6 @@ int dm_tree_node_size_changed_base(const struct dm_tree_node *dnode)
* the new function dm_tree_node_add_cache_target which detects unknown
* feature flags and returns error for them.
*/
DM_EXPORT_SYMBOL_BASE(dm_tree_node_add_cache_target)
int dm_tree_node_add_cache_target_base(struct dm_tree_node *node,
uint64_t size,
uint64_t feature_flags, /* DM_CACHE_FEATURE_* */
@@ -3885,6 +3883,7 @@ int dm_tree_node_add_cache_target_base(struct dm_tree_node *node,
const char *policy_name,
const struct dm_config_node *policy_settings,
uint32_t data_block_size);
DM_EXPORT_SYMBOL_BASE(dm_tree_node_add_cache_target);
int dm_tree_node_add_cache_target_base(struct dm_tree_node *node,
uint64_t size,
uint64_t feature_flags,

View File

@@ -90,7 +90,7 @@ struct report_group_item {
struct dm_list list;
struct dm_report_group *group;
struct dm_report *report;
union store_u {
union {
uint32_t orig_report_flags;
uint32_t finished_count;
} store;
@@ -207,7 +207,7 @@ struct selection_str_list {
};
struct field_selection_value {
union value_u {
union {
const char *s;
uint64_t i;
time_t t;
@@ -227,7 +227,7 @@ struct field_selection {
struct selection_node {
struct dm_list list;
uint32_t type;
union selection_u {
union {
struct field_selection *item;
struct dm_list set;
} selection;

View File

@@ -2011,11 +2011,10 @@ out:
return r;
}
DM_EXPORT_NEW_SYMBOL(int, dm_stats_create_region, 1_02_107)
(struct dm_stats *dms, uint64_t *region_id,
uint64_t start, uint64_t len, int64_t step,
int precise, struct dm_histogram *bounds,
const char *program_id, const char *user_data)
int dm_stats_create_region(struct dm_stats *dms, uint64_t *region_id,
uint64_t start, uint64_t len, int64_t step,
int precise, struct dm_histogram *bounds,
const char *program_id, const char *user_data)
{
char *hist_arg = NULL;
int r = 0;
@@ -2038,7 +2037,6 @@ out:
return r;
}
static void _stats_clear_group_regions(struct dm_stats *dms, uint64_t group_id)
{
struct dm_stats_group *group;
@@ -5072,8 +5070,6 @@ int dm_stats_start_filemapd(int fd, uint64_t group_id, const char *path,
*/
#if defined(GNU_SYMVER)
DM_EXPORT_SYMBOL(dm_stats_create_region, 1_02_106)
int dm_stats_create_region_v1_02_106(struct dm_stats *dms, uint64_t *region_id,
uint64_t start, uint64_t len, int64_t step,
int precise, const char *program_id,
@@ -5087,8 +5083,8 @@ int dm_stats_create_region_v1_02_106(struct dm_stats *dms, uint64_t *region_id,
return _stats_create_region(dms, region_id, start, len, step, precise,
NULL, program_id, aux_data);
}
DM_EXPORT_SYMBOL(dm_stats_create_region, 1_02_106);
DM_EXPORT_SYMBOL(dm_stats_create_region, 1_02_104)
int dm_stats_create_region_v1_02_104(struct dm_stats *dms, uint64_t *region_id,
uint64_t start, uint64_t len, int64_t step,
const char *program_id, const char *aux_data);
@@ -5100,4 +5096,5 @@ int dm_stats_create_region_v1_02_104(struct dm_stats *dms, uint64_t *region_id,
return _stats_create_region(dms, region_id, start, len, step, 0, NULL,
program_id, aux_data);
}
DM_EXPORT_SYMBOL(dm_stats_create_region, 1_02_104);
#endif

View File

@@ -53,9 +53,11 @@ WC = @WC@
AR = @AR@
RM = rm -f
LIBS += @LIBS@ $(PTHREAD_LIBS) $(SELINUX_LIBS) $(UDEV_LIBS) $(RT_LIBS) $(M_LIBS)
LIBS = @LIBS@
LIBS += $(SELINUX_LIBS) $(UDEV_LIBS) $(BLKID_LIBS) $(RT_LIBS) -lm
# Extra libraries always linked with static binaries
STATIC_LIBS = $(PTHREAD_LIBS)
STATIC_LIBS = $(SELINUX_LIBS) $(UDEV_LIBS) $(BLKID_LIBS)
DEFS += @DEFS@
# FIXME set this only where it's needed, not globally?
CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@
@@ -248,6 +250,9 @@ endif
# end of fPIC protection
endif
LDFLAGS += -L$(top_builddir)/libdm
CLDFLAGS += -L$(top_builddir)/libdm
# Combination of DEBUG_POOL and DEBUG_ENFORCE_POOL_LOCKING is not suppored.
#DEFS += -DDEBUG_POOL
# Default pool locking is using the crc checksum. With mprotect memory
@@ -403,7 +408,7 @@ DEFS+=-D_FILE_OFFSET_BITS=64
%.o: %.cpp $(DEPS)
@echo " [CXX] $(<F)"
@mkdir -p $(@D)
$(Q) $(CXX) $(DEPFLAGS) -c $(INCLUDES) $(VALGRIND_CFLAGS) $(DEFS) $(DEFS_$@) $(WFLAGS) $(CXXFLAGS) $(CXXFLAGS_$@) $< -o $@
$(Q) $(CXX) -c $(INCLUDES) $(VALGRIND_CFLAGS) $(DEFS) $(DEFS_$@) $(WFLAGS) $(CXXFLAGS) $(CXXFLAGS_$@) $< -o $@
%.pot: %.c $(DEPS)
@echo " [CC] $@"
@@ -504,21 +509,20 @@ EXPORTED_SYMBOLS := $(wildcard $(srcdir)/.exported_symbols.Base $(srcdir)/.expor
ifeq (,$(firstword $(EXPORTED_SYMBOLS)))
$(Q) set -e; (echo "Base {"; echo " global:";\
$(SED) "/^#/d;s/^/ /;s/$$/;/" $<;\
echo " local:"; echo " *;";\
echo "};";\
echo "Local {"; echo " local:"; echo " *;"; echo "};";\
) > $@
else
$(Q) set -e;\
R=$$($(SORT) $^ | $(GREP) -v "^#" | uniq -u);\
test -z "$$R" || { echo "Mismatch between symbols in shared library and lists in .exported_symbols.* files: $$R"; false; } ;\
LAST=;\
for i in $$(echo $(EXPORTED_SYMBOLS) | tr ' ' '\n' | $(SORT) -nt_ -k5 ); do\
( for i in $$(echo $(EXPORTED_SYMBOLS) | tr ' ' '\n' | $(SORT) -rnt_ -k5 ); do\
echo "$${i##*.} {"; echo " global:";\
$(SED) "/^#/d;s/^/ /;s/$$/;/" $$i;\
if test -z "$$LAST"; then echo " local:"; echo " *;";fi;\
echo "}$$LAST;";\
LAST=" $${i##*.}";\
done > $@
echo "};";\
done;\
echo "Local {"; echo " local:"; echo " *;"; echo "};";\
) > $@
endif
ifeq ("@USE_TRACKING@","yes")

View File

@@ -22,7 +22,6 @@
/*
* Symbol export control macros
*
* DM_EXPORT_NEW_SYMBOL(rettype, func, ver)
* DM_EXPORT_SYMBOL(func,ver)
* DM_EXPORT_SYMBOL_BASE(func,ver)
*
@@ -41,19 +40,19 @@
* compatibility version should be enclosed in '#if defined(GNU_SYMVER)',
* for example:
*
* DM_EXPORT_NEW_SYMBOL(int, dm_foo, 1_02_107)(int bar)
* int dm_foo(int bar)
* {
* return bar;
* }
*
* #if defined(GNU_SYMVER)
* #if defined(__GNUC__)
* // Backward compatible dm_foo() version 1.02.104
* DM_EXPORT_SYMBOL(dm_foo,1_02_104)
* int dm_foo_v1_02_104(void);
* int dm_foo_v1_02_104(void)
* {
* return 0;
* }
* DM_EXPORT_SYMBOL(dm_foo,1_02_104)
* #endif
*
* A prototype for the compatibility version is required as these
@@ -64,30 +63,11 @@
* versioning: it must never be used for new symbols.
*/
#if defined(GNU_SYMVER)
# ifdef __has_attribute
# if __has_attribute(symver)
# define DM_EXPORT_NEW_SYMBOL(rettype, func, ver) \
__attribute__((__symver__( #func "@@DM_" #ver ))) \
__typeof__(func) func ##_v ##ver; \
rettype func ##_v ##ver
# define DM_EXPORT_SYMBOL(func, ver) \
__attribute__((__symver__( #func "@DM_" #ver )))
# define DM_EXPORT_SYMBOL_BASE(func) \
__attribute__((__symver__( #func "@Base" )))
# endif
# endif
#ifndef DM_EXPORT_NEW_SYMBOL
#define DM_EXPORT_NEW_SYMBOL(rettype, func, ver) \
__typeof__(func) func ##_v ##ver; \
__asm__(".symver " #func "_v" #ver ", " #func "@@DM_" #ver ); \
rettype func ##_v ##ver
#define DM_EXPORT_SYMBOL(func, ver) \
__asm__(".symver " #func "_v" #ver ", " #func "@DM_" #ver );
__asm__(".symver " #func "_v" #ver ", " #func "@DM_" #ver )
#define DM_EXPORT_SYMBOL_BASE(func) \
__asm__(".symver " #func "_base, " #func "@Base" );
#endif
__asm__(".symver " #func "_base, " #func "@Base" )
#else
#define DM_EXPORT_NEW_SYMBOL(rettype, func, ver) rettype func
#define DM_EXPORT_SYMBOL(func, ver)
#define DM_EXPORT_SYMBOL_BASE(func)
#endif

View File

@@ -61,10 +61,9 @@ PYTHON2 = @PYTHON2@
PYTHON3 = @PYTHON3@
PYCOMPILE = $(top_srcdir)/autoconf/py-compile
LIBS += @LIBS@ $(SELINUX_LIBS) $(UDEV_LIBS) $(RT_LIBS) $(M_LIBS)
LVMLIBS = $(DMEVENT_LIBS) $(READLINE_LIBS) $(EDITLINE_LIBS) $(SYSTEMD_LIBS) $(BLKID_LIBS) $(AIO_LIBS) $(LIBS)
LIBS += @LIBS@ $(SELINUX_LIBS) $(UDEV_LIBS) $(BLKID_LIBS) $(RT_LIBS) $(M_LIBS)
# Extra libraries always linked with static binaries
STATIC_LIBS = $(PTHREAD_LIBS)
STATIC_LIBS = $(SELINUX_LIBS) $(UDEV_LIBS) $(BLKID_LIBS)
DEFS += @DEFS@
# FIXME set this only where it's needed, not globally?
CFLAGS ?= @COPTIMISE_FLAG@ @CFLAGS@
@@ -76,8 +75,6 @@ LIB_SUFFIX = @LIB_SUFFIX@
DL_LIBS = @DL_LIBS@
RT_LIBS = @RT_LIBS@
M_LIBS = @M_LIBS@
AIO_LIBS = @AIO_LIBS@
AIO_CFLAGS = @AIO_CFLAGS@
PTHREAD_LIBS = @PTHREAD_LIBS@
READLINE_LIBS = @READLINE_LIBS@
EDITLINE_LIBS = @EDITLINE_LIBS@
@@ -149,7 +146,6 @@ vpath %.po $(srcdir)
vpath %.exported_symbols $(srcdir)
interface = @interface@
interfacebuilddir = $(top_builddir)/libdm/$(interface)
rpmbuilddir = $(abs_top_builddir)/build
# The number of jobs to run, if blank, defaults to the make standard
@@ -269,7 +265,7 @@ endif
endif
ifeq ("@BUILD_DMEVENTD@", "yes")
DMEVENT_LIBS = -ldevmapper-event -L$(interfacebuilddir) -ldevmapper
DMEVENT_LIBS = -ldevmapper-event
LDFLAGS += -L$(top_builddir)/daemons/dmeventd
CLDFLAGS += -L$(top_builddir)/daemons/dmeventd
endif
@@ -454,7 +450,7 @@ DEFS+=-D_FILE_OFFSET_BITS=64
%.o: %.cpp $(DEPS)
@echo " [CXX] $(<F)"
@mkdir -p $(@D)
$(Q) $(CXX) $(DEPFLAGS) -c $(INCLUDES) $(VALGRIND_CFLAGS) $(DEFS) $(DEFS_$@) $(WFLAGS) $(CXXFLAGS) $(CXXFLAGS_$@) $< -o $@
$(Q) $(CXX) -c $(INCLUDES) $(VALGRIND_CFLAGS) $(DEFS) $(DEFS_$@) $(WFLAGS) $(CXXFLAGS) $(CXXFLAGS_$@) $< -o $@
%.pot: %.c $(DEPS)
@echo " [CC] $(<F)"
@@ -555,21 +551,20 @@ EXPORTED_SYMBOLS := $(wildcard $(srcdir)/.exported_symbols.Base $(srcdir)/.expor
ifeq (,$(firstword $(EXPORTED_SYMBOLS)))
$(Q) set -e; (echo "Base {"; echo " global:";\
$(SED) "/^#/d;s/^/ /;s/$$/;/" $<;\
echo " local:"; echo " *;";\
echo "};";\
echo "Local {"; echo " local:"; echo " *;"; echo "};";\
) > $@
else
$(Q) set -e;\
R=$$($(SORT) $^ | $(GREP) -v "^#" | uniq -u);\
test -z "$$R" || { echo "Mismatch between symbols in shared library and lists in .exported_symbols.* files: $$R"; false; } ;\
LAST=;\
for i in $$(echo $(EXPORTED_SYMBOLS) | tr ' ' '\n' | $(SORT) -nt_ -k5 ); do\
( for i in $$(echo $(EXPORTED_SYMBOLS) | tr ' ' '\n' | $(SORT) -rnt_ -k5 ); do\
echo "$${i##*.} {"; echo " global:";\
$(SED) "/^#/d;s/^/ /;s/$$/;/" $$i;\
if test -z "$$LAST"; then echo " local:"; echo " *;";fi;\
echo "}$$LAST;";\
LAST=" $${i##*.}";\
done > $@
echo "};";\
done;\
echo "Local {"; echo " local:"; echo " *;"; echo "};";\
) > $@
endif
ifeq ("$(USE_TRACKING)","yes")

View File

@@ -32,8 +32,8 @@ CMIRRORDMAN = cmirrord.8
LVMDBUSDMAN = lvmdbusd.8
MAN5=lvm.conf.5
MAN7=lvmsystemid.7 lvmreport.7 lvmraid.7
MAN7=lvmsystemid.7 lvmreport.7 \
lvmcache.7 lvmraid.7 lvmthin.7 lvmvdo.7
MAN8=lvm.8 lvmdump.8 lvm-fullreport.8 lvm-lvpoll.8 \
lvcreate.8 lvchange.8 lvmconfig.8 lvconvert.8 lvdisplay.8 \
lvextend.8 lvreduce.8 lvremove.8 lvrename.8 lvresize.8 lvs.8 \
@@ -49,7 +49,6 @@ MAN8CLUSTER=
MAN8SYSTEMD_GENERATORS=lvm2-activation-generator.8
ifeq (,$(findstring $(MAKECMDGOALS), distclean all_man install_all_man))
MAN7 += lvmcache.7 lvmthin.7 lvmvdo.7
MAN8+=$(FSADMMAN) $(LVMPOLLDMAN) $(LVMLOCKDMAN) $(LVMDBUSDMAN)
MAN8DM+=$(BLKDEACTIVATEMAN) $(DMEVENTDMAN) $(DMFILEMAPDMAN)
MAN8CLUSTER+=$(CMIRRORDMAN)
@@ -85,23 +84,6 @@ else
ifeq ("@BUILD_CMIRRORD@", "yes")
MAN8CLUSTER+=$(CMIRRORDMAN)
endif
ifeq ("@CACHE@", "internal")
MAN7 += lvmcache.7
else
ifeq ("@WRITECACHE@", "internal")
MAN7 += lvmcache.7
endif
endif
ifeq ("@THIN@", "internal")
MAN7 += lvmthin.7
endif
ifeq ("@VDO@", "internal")
MAN7 += lvmvdo.7
endif
endif
MAN5DIR=$(mandir)/man5
@@ -140,93 +122,67 @@ SEE_ALSO=$(srcdir)/see_also.end
%.8_gen: $(srcdir)/%.8_des $(srcdir)/%.8_end $(MANGENERATOR) $(TESTMAN)
$(Q)set -e ; ( \
if [ ! -s $(TESTMAN) ] ; then \
cat $(srcdir)/$(@:%.8_gen=%.8_pregen) \
$(srcdir)/$(basename $@).8_end $(SEE_ALSO) ; \
cat $(srcdir)/$(@:%.8_gen=%.8_pregen) ; \
else \
MANCMD=$(basename $@) && \
$(MANGENERATOR) --primary $$MANCMD $< && \
$(MANGENERATOR) --secondary $$MANCMD && \
cat $(srcdir)/$(basename $@).8_end $(SEE_ALSO) ; \
cat $(srcdir)/$(basename $@).8_end && \
cat $(SEE_ALSO) ; \
fi \
) > $@
#
# When EDITLINE_LIBS is defined, we are compiling with libedit
#
ifneq ("$(EDITLINE_LIBS)", "")
DEFAULT_LIBLINE=editline
else
DEFAULT_LIBLINE=readline
endif
define SUBSTVARS
$(SED) -e "s+#VERSION#+$(LVM_VERSION)+" \
$(Q)$(SED) -e "s+#VERSION#+$(LVM_VERSION)+" \
-e "s+#DEFAULT_SYS_DIR#+$(DEFAULT_SYS_DIR)+" \
-e "s+#DEFAULT_ARCHIVE_DIR#+$(DEFAULT_ARCHIVE_DIR)+" \
-e "s+#DEFAULT_BACKUP_DIR#+$(DEFAULT_BACKUP_DIR)+" \
-e "s+#DEFAULT_PROFILE_DIR#+$(DEFAULT_PROFILE_DIR)+" \
-e "s+#DEFAULT_CACHE_DIR#+$(DEFAULT_CACHE_DIR)+" \
-e "s+#DEFAULT_LOCK_DIR#+$(DEFAULT_LOCK_DIR)+" \
-e "s+#LVM_PATH#+@bindir@/lvm+" \
-e "s+#LVM_PATH#+$(exec_prefix)/lvm+" \
-e "s+#DEFAULT_RUN_DIR#+$(DEFAULT_RUN_DIR)+" \
-e "s+#DEFAULT_PID_DIR#+$(DEFAULT_PID_DIR)+" \
-e "s+#SYSTEMD_GENERATOR_DIR#+$(SYSTEMD_GENERATOR_DIR)+" \
-e "s+#DEFAULT_LIBLINE#+$(DEFAULT_LIBLINE)+" \
-e "s+#DEFAULT_MANGLING#+$(DEFAULT_MANGLING)+" $< > $@
endef
# Escape any '-' to '\-' (except ^.TH line)
# and fix unwanted changes:
# '\\-' back to '\-'
# words like 'device\-mapper' back to 'device-mapper',
# \[\->] \[<\-] back to \[->], \[<-]
# however for some words i.e. '*-pool' we want '*\-pool'
# also 'vg-lv,[systemd-]machine-id,lvm-full,lvm-lvpoll' should go with \-
# Escape any '-':
#
# - multiple (>= 2)
# - in ' -'
# - in ranges
# - in middle of options (e.g. '--use-policies') and their arguments
# - in symbolic use (e.g. '->')
# - in "$vg-$lv"
# - in single one in '\\f.-'
define ESCAPEHYPHENS
$(SED) -i -e "/^.TH/ !s+-+\\\-+g" \
-e "s+\\\[\]-+\\\-+g" \
-e "s+\(^\|[^[:alnum:]\-]\)\([[:alpha:]]\{1,\}\)\\\-\((\|[([:alpha:]]\{2,\}\)+\1\2-\3+g" \
-e "s+\([[:alpha:]]\)-\(pool\)+\1\\\-\2+g" \
-e "s+[\][[]\(<\{0,1\}\)\\\-+\\\[\1-+g" \
-e "s+\(vg.\{1,\}[^\]\)-lv+\1\\\-lv+g" \
-e "s+systemd-machine+systemd\\\-machine+g" \
-e "s+machine-id+machine\\\-id+g" \
-e "s+lvm-full+lvm\\\-full+g" \
-e "s+lvm-lvpoll+lvm\\\-lvpoll+g" \
$@
$(Q)$(SED) -i -e "s+\([ [:alpha:]]\)-\{7\}+\1\\\-\\\-\\\-\\\-\\\-\\\-\\\-+g" \
-e "s+\([ [:alpha:]]\)-\{6\}+\1\\\-\\\-\\\-\\\-\\\-\\\-+g" \
-e "s+\([ [:alpha:]]\)-\{5\}+\1\\\-\\\-\\\-\\\-\\\-+g" \
-e "s+\([ [:alpha:]]\)-\{4\}+\1\\\-\\\-\\\-\\\-+g" \
-e "s+\([ [:alpha:]]\)-\{3\}+\1\\\-\\\-\\\-+g" \
-e "s+\([ [:alpha:]]\)-\{2\}+\1\\\-\\\-+g" \
-e "s+\([^\]\)-\([[:alnum:]\?]\)+\1\\\-\2+g" \
-e "s+ --+\\\-\\\-+g" \
-e "s+|-|+|\\\-|+g" \
-e "s+|-\\\-+\\\-\\\-+g" \
-e "s+ -\"+ \\\-\"+g" \
-e "s+'--'+'\\\-\\\-'+g" \
-e "s+^--+\\\-\\\-+g" \
-e "s+\([[:alnum:]]\) - \([[:alnum:]]\)+\1 \\\- \2+g" \
-e "s+\(<\)-+\1\\\-+g" \
-e "s+[^\\]-\(>\)+\\\-\1+g" \
-e "s+\([[:alnum:]]\{2,\}\)\\\-\([[:alnum:]]\{2,\}\)+\1-\2+g" \
-e "s+\(\\\-\\\-[[:alnum:]]\{2,\}\)-+\1\\\-+g" \
-e "s+\(lvm2\-activation\)+lvm2\\\-activation+" \
-e "s+\([^\\]\)-pool+\1\\\-pool+g" \
-e "s+\([[:digit:]]\)-\([[:digit:]]\)+\1\\\-\2+g" \
-e "s+\\\-git+\-git+g" \
-e "s+\(vg.*\)\-lv+\1\\\-lv+g" \
-e "s+\([[:digit:]]\{4\}\)\\\-\([[:digit:]]\{2\}\)\\\-\([[:digit:]]\{2\}\)+\1-\2-\3+g" $@
endef
.PHONY: checksed
checksed:
$(Q) echo "cmd -a -b retry -c ret --use-policy -d" > $@
$(Q) echo "cmd \fI-u\fB -d retry \fI--use-pol --use-poli 4.0 --use \"-L|--size\"" >> $@
$(Q) echo "cmd --use-pol" >> $@
$(Q) echo "cmd --[raid]use device-mapper thin-pool \fB-\fP sdb1:1000-1999 \fB-t\fP|\fB--test\fP -? -o-field3" >> $@
$(Q) echo "cmd -dd---- \[->] \[<-] -*- -o#field5 -o-field3 -d" >> $@
$(Q) echo "-d" >> $@
$(Q) echo ".TH 2.03.12(2)-git" >> $@
$(Q) echo "--verbose" >> $@
$(Q) echo ".BR -- [ raid ] most -- [ raid ] most" >> $@
$(Q) echo ".BR | --verbose|--verb --verbose --verbose --verbose --verbose" >> $@
$(Q) echo "skip - unint --aa-dd- --aa-dd-- ---aa-dd 4.0 \-a\-b" >> $@
$(Q) echo "cmd \-a \-b retry \-c ret \-\-use\-policy \-d" > $@-e
$(Q) echo "cmd \fI\-u\fB \-d retry \fI\-\-use\-pol \-\-use\-poli 4.0 \-\-use \"\-L|\-\-size\"" >> $@-e
$(Q) echo "cmd \-\-use\-pol" >> $@-e
$(Q) echo "cmd \-\-[raid]use device-mapper thin\-pool \fB\-\fP sdb1:1000\-1999 \fB\-t\fP|\fB\-\-test\fP \-? \-o\-field3" >> $@-e
$(Q) echo "cmd \-dd\-\-\-\- \[->] \[<-] \-*\- \-o#field5 \-o\-field3 \-d" >> $@-e
$(Q) echo "\-d" >> $@-e
$(Q) echo ".TH 2.03.12(2)-git" >> $@-e
$(Q) echo "\-\-verbose" >> $@-e
$(Q) echo ".BR \-\- [ raid ] most \-\- [ raid ] most" >> $@-e
$(Q) echo ".BR | \-\-verbose|\-\-verb \-\-verbose \-\-verbose \-\-verbose \-\-verbose" >> $@-e
$(Q) echo "skip \- unint \-\-aa\-dd\- \-\-aa\-dd\-\- \-\-\-aa\-dd 4.0 \-a\-b" >> $@-e
$(Q) $(ESCAPEHYPHENS)
$(Q) echo "--- H Y P H E N A T E D ---"
$(Q) cat $@
$(Q) diff -u $@-e $@
$(Q) $(RM) $@ $@-e
%.5: $(srcdir)/%.5_main
@echo " [MAN] $@"
$(Q) $(SUBSTVARS)
@@ -290,13 +246,11 @@ install: install_lvm2 install_device-mapper install_cluster
install_all_man: install install_systemd_generators
# Copy generated man pages back to source tree as fallback for machines where generator doesn't work
pregenerated_man: $(MANGENERATOR) $(TESTMAN)
pregenerated_man: all
@echo " [GENERATE] $^"
$(Q) set -e ; test -s $(TESTMAN) && for i in $(srcdir)/*.8_des; do \
$(Q) set -e ; for i in $(srcdir)/*.8_des; do \
CMD=`basename $$i .8_des`; \
( $(MANGENERATOR) --primary $$CMD $$i && \
$(MANGENERATOR) --secondary $$CMD ) \
> $(srcdir)/$$CMD.8_pregen ; \
cat $${CMD}.8_gen > $(srcdir)/$$CMD.8_pregen ; \
done
generate: pregenerated_man

View File

@@ -1,34 +1,19 @@
.TH "BLKDEACTIVATE" "8" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
.
.SH NAME
.
.SH "NAME"
blkdeactivate \(em utility to deactivate block devices
.
.SH SYNOPSIS
.
.ad l
.nh
.B blkdeactivate
.RB [ -d
.IR dm_options ]
.RB [ -d \ \fIdm_options\fP ]
.RB [ -e ]
.RB [ -h ]
.RB [ -l
.IR lvm_options ]
.RB [ -m
.IR mpath_options ]
.RB [ -r
.IR mdraid_options ]
.RB [ -o
.IR vdo_options ]
.RB [ -l \ \fIlvm_options\fP ]
.RB [ -m \ \fImpath_options\fP ]
.RB [ -r \ \fImdraid_options\fP ]
.RB [ -o \ \fIvdo_options\fP ]
.RB [ -u ]
.RB [ -v ]
.RI [ device ]
.hy
.ad b
.
.SH DESCRIPTION
.
The blkdeactivate utility deactivates block devices. For mounted
block devices, it attempts to unmount it automatically before
trying to deactivate. The utility currently supports
@@ -37,124 +22,109 @@ software RAID MD devices. LVM volumes are handled directly
using the \fBlvm\fP(8) command, the rest of device-mapper
based devices are handled using the \fBdmsetup\fP(8) command.
MD devices are handled using the \fBmdadm\fP(8) command.
.
.SH OPTIONS
.
.TP
.BR -d | --dmoptions " " \fIdm_options
.BR -d ", " --dmoptions \ \fIdm_options\fP
Comma separated list of device-mapper specific options.
Accepted \fBdmsetup\fP(8) options are:
.RS
.TP
.B retry
.IP \fIretry\fP
Retry removal several times in case of failure.
.TP
.B force
.IP \fIforce\fP
Force device removal.
.RE
.
.TP
.BR -e | --errors
.BR -e ", " --errors
Show errors reported from tools called by \fBblkdeactivate\fP. Without this
option, any error messages from these external tools are suppressed and the
\fBblkdeactivate\fP itself provides only a summary message to indicate
the device was skipped.
.
.TP
.BR -h | --help
.BR -h ", " --help
Display the help text.
.
.TP
.BR -l | --lvmoptions " " \fIlvm_options
.BR -l ", " --lvmoptions \ \fIlvm_options\fP
Comma-separated list of LVM specific options:
.RS
.TP
.B retry
.IP \fIretry\fP
Retry removal several times in case of failure.
.TP
.B wholevg
.IP \fIwholevg\fP
Deactivate the whole LVM Volume Group when processing a Logical Volume.
Deactivating the Volume Group as a whole is quicker than deactivating
each Logical Volume separately.
.RE
.
.TP
.BR -r | --mdraidoptions " " \fImdraid_options
Comma-separated list of MD RAID specific options:
.RS
.TP
.B wait
Wait MD device's resync, recovery or reshape action to complete
before deactivation.
.RE
.
.TP
.BR -m | --mpathoptions " " \fImpath_options
.BR -m ", " --mpathoptions \ \fImpath_options\fP
Comma-separated list of device-mapper multipath specific options:
.RS
.TP
.B disablequeueing
.IP \fIdisablequeueing\fP
Disable queueing on all multipath devices before deactivation.
This avoids a situation where blkdeactivate may end up waiting if
all the paths are unavailable for any underlying device-mapper multipath
device.
.RE
.
.TP
.BR -o | --vdooptions " " \fIvdo_options
.BR -r ", " --mdraidoptions \ \fImdraid_options\fP
Comma-separated list of MD RAID specific options:
.RS
.IP \fIwait\fP
Wait MD device's resync, recovery or reshape action to complete
before deactivation.
.RE
.TP
.BR -o ", " --vdooptions \ \fIvdo_options\fP
Comma-separated list of VDO specific options:
.RS
.TP
.BR configfile = \fIfile
.IP \fIconfigfile=file\fP
Use specified VDO configuration file.
.RE
.
.TP
.BR -u | --umount
.BR -u ", " --umount
Unmount a mounted device before trying to deactivate it.
Without this option used, a device that is mounted is not deactivated.
.
.TP
.BR -v ", " --verbose
Run in verbose mode. Use \fB-vv\fP for even more verbose mode.
.
Run in verbose mode. Use --vv for even more verbose mode.
.SH EXAMPLES
.
Deactivate all supported block devices found in the system, skipping mounted
devices.
.br
.BR
#
.B blkdeactivate
.BR
.P
Deactivate all supported block devices found in the system, unmounting any
mounted devices first, if possible.
.br
.BR
#
.B blkdeactivate -u
.BR
.P
Deactivate the device /dev/vg/lvol0 together with all its holders, unmounting
Deactivate the device /dev/vg/lvol0 together with all its holders, unmounting
any mounted devices first, if possible.
.br
.BR
#
.B blkdeactivate -u /dev/vg/lvol0
.BR
.P
Deactivate all supported block devices found in the system. If the deactivation
of a device-mapper device fails, retry it. Deactivate the whole
Volume Group at once when processing an LVM Logical Volume.
.br
.BR
#
.B blkdeactivate -u -d retry -l wholevg
.BR
.P
Deactivate all supported block devices found in the system. If the deactivation
of a device-mapper device fails, retry it and force removal.
.br
.BR
#
.B blkdeactivate -d force,retry
.
.SH SEE ALSO
.
.nh
.ad l
.BR dmsetup (8),
.BR lsblk (8),
.BR lvm (8),

View File

@@ -1,45 +1,35 @@
.TH CMIRRORD 8 "LVM TOOLS #VERSION#" "Red Hat Inc" \" -*- nroff -*-
.
.SH NAME
.
cmirrord \(em cluster mirror log daemon
.
.SH SYNOPSIS
.
.B cmirrord
.RB [ -f | --foreground ]
.RB [ -h | --help ]
.
\fBcmirrord\fR [\fB-f\fR] [\fB-h\fR]
.SH DESCRIPTION
.
\fBcmirrord\fP is the daemon that tracks mirror log information in a cluster.
It is specific to device-mapper based mirrors (and by extension, LVM
cluster mirrors). Cluster mirrors are not possible without this daemon
running.
.P
This daemon relies on the cluster infrastructure provided by the corosync,
which must be set up and running in order for cmirrord to function.
.P
Output is logged via \fBsyslog\fP(3). The \fBSIGUSR1 signal\fP(7) can be
issued to \fBcmirrord\fP to gather current status information for debugging
purposes.
.P
Once started, \fBcmirrord\fP will run until it is shutdown via \fBSIGINT\fP
signal. If there are still active cluster mirrors, however, the signal will be
ignored. Active cluster mirrors should be shutdown before stopping the cluster
mirror log daemon.
.
.SH OPTIONS
.
.TP
.BR -f | --foreground
.IP "\fB-f\fR, \fB--foreground\fR" 4
Do not fork and log to the terminal.
.TP
.BR -h | --help
.IP "\fB-h\fR, \fB--help\fR" 4
Print usage.
.
.SH SEE ALSO
.
.BR lvmlockd (8),
.BR lvm (8),
.BR syslog (3),

View File

@@ -23,63 +23,70 @@ dmeventd is the event monitoring daemon for device-mapper devices.
Library plugins can register and carry out actions triggered when
particular events occur.
.
.
.SH OPTIONS
.
.TP
.B -d
Repeat from 1 to 3 times
.RB ( -d ,
.HP
.BR -d
.br
Repeat from 1 to 3 times (
.BR -d ,
.BR -dd ,
.BR -ddd )
to increase the detail of
.BR -ddd
) to increase the detail of
debug messages sent to syslog.
Each extra d adds more debugging information.
.
.TP
.B -f
.HP
.BR -f
.br
Don't fork, run in the foreground.
.
.TP
.B -h
.HP
.BR -h
.br
Show help information.
.
.TP
.B -l
.HP
.BR -l
.br
Log through stdout and stderr instead of syslog.
This option works only with option -f, otherwise it is ignored.
.
.TP
.B -?
.HP
.BR -?
.br
Show help information on stderr.
.
.TP
.B -R
.HP
.BR -R
.br
Replace a running dmeventd instance. The running dmeventd must be version
2.02.77 or newer. The new dmeventd instance will obtain a list of devices and
events to monitor from the currently running daemon.
.
.TP
.B -V
.HP
.BR -V
.br
Show version of dmeventd.
.
.SH LVM PLUGINS
.
.TP
.B Mirror
Attempts to handle device failure automatically.
.HP
.BR Mirror
.br
See
Attempts to handle device failure automatically. See
.BR lvm.conf (5).
.
.TP
.B Raid
Attempts to handle device failure automatically.
.HP
.BR Raid
.br
See
Attempts to handle device failure automatically. See
.BR lvm.conf (5).
.
.TP
.B Snapshot
.HP
.BR Snapshot
.br
Monitors how full a snapshot is becoming and emits a warning to
syslog when it exceeds 80% full.
The warning is repeated when 85%, 90% and 95% of the snapshot is filled.
@@ -88,19 +95,20 @@ See
Snapshot which runs out of space gets invalid and when it is mounted,
it gets umounted if possible.
.
.TP
.B Thin
.HP
.BR Thin
.br
Monitors how full a thin pool data and metadata is becoming and emits
a warning to syslog when it exceeds 80% full.
The warning is repeated when more then 85%, 90% and 95%
of the thin pool is filled. See
.BR lvm.conf (5).
When a thin pool fills over 50% (data or metadata) thin plugin calls
configured \fBdmeventd/thin_command\fP with every 5% increase.
configured \fIdmeventd/thin_command\fP with every 5% increase.
With default setting it calls internal
\fBlvm lvextend --use-policies\fP to resize thin pool
when it's been filled above configured threshold
\fBactivation/thin_pool_autoextend_threshold\fP.
\fIactivation/thin_pool_autoextend_threshold\fP.
If the command fails, dmeventd thin plugin will keep
retrying execution with increasing time delay between
retries upto 42 minutes.
@@ -115,22 +123,23 @@ Command is executed with environmental variable
in this environment will not try to interact with dmeventd.
To see the fullness of a thin pool command may check these
two environmental variables
\fBDMEVENTD_THIN_POOL_DATA\fP and \fBDMEVENTD_THIN_POOL_\:METADATA\fP.
\fBDMEVENTD_THIN_POOL_DATA\fP and \fBDMEVENTD_THIN_POOL_METADATA\fP.
Command can also read status with tools like \fBlvs\fP(8).
.
.TP
.B Vdo
.HP
.BR Vdo
.br
Monitors how full a VDO pool data is becoming and emits
a warning to syslog when it exceeds 80% full.
The warning is repeated when more then 85%, 90% and 95%
of the VDO pool is filled. See
.BR lvm.conf (5).
When a VDO pool fills over 50% vdo plugin calls
configured \fBdmeventd/vdo_command\fP with every 5% increase.
configured \fIdmeventd/vdo_command\fP with every 5% increase.
With default setting it calls internal
\fBlvm lvextend --use-policies\fP to resize VDO pool
when it's been filled above the configured threshold
\fBactivation/vdo_pool_autoextend_threshold\fP.
\fIactivation/vdo_pool_autoextend_threshold\fP.
If the command fails, dmeventd vdo plugin will keep
retrying execution with increasing time delay between
retries upto 42 minutes.
@@ -173,7 +182,4 @@ a thin_command, vdo_command environment.
.SH SEE ALSO
.
.BR lvm (8),
.BR lvm.conf (5),
.BR lvextend (8),
.br
.BR fstrim (8)
.BR lvm.conf (5)

View File

@@ -1,23 +1,22 @@
.TH DMFILEMAPD 8 "Dec 17 2016" "Linux" "MAINTENANCE COMMANDS"
.
.de OPT_FD
. I file_descriptor
. RB [ file_descriptor ]
..
.
.de OPT_GROUP
. I group_id
. RB [ group_id ]
..
.
.de OPT_PATH
. I abs_path
. RB [ abs_path ]
..
.
.de OPT_MODE
. BR inode | path
. RB [ mode ]
..
.
.de OPT_DEBUG
. RI [ foreground " [" verbose ]]
. RB [ foreground [ verbose ] ]
..
.
.SH NAME
@@ -28,27 +27,26 @@ dmfilemapd \(em device-mapper filemap monitoring daemon
.
.de CMD_DMFILEMAPD
. ad l
. nh
. BR dmfilemapd
. IR dmfilemapd
. OPT_FD
. OPT_GROUP
. OPT_PATH
. OPT_MODE
. OPT_DEBUG
. hy
. ad b
..
.CMD_DMFILEMAPD
.
.PD
.ad b
.
.SH DESCRIPTION
.
The dmfilemapd daemon monitors groups of \fBdmstats\fP(8) regions that
The dmfilemapd daemon monitors groups of \fIdmstats\fP regions that
correspond to the extents of a file, adding and removing regions to
reflect the changing state of the file on-disk.
.P
The daemon is normally launched automatically by the \fBdmstats
The daemon is normally launched automatically by the \fPdmstats
create\fP command, but can be run manually, either to create a new
daemon where one did not previously exist, or to change the options
previously used, by killing the existing daemon and starting a new
@@ -56,63 +54,66 @@ one.
.
.SH OPTIONS
.
.TP
.OPT_FD
.HP
.BR file_descriptor
.br
Specify the file descriptor number for the file to be monitored.
The file descriptor must reference a regular file, open for reading,
in a local file system that supports the FIEMAP ioctl, and that
returns data describing the physical location of extents.
.sp
The process that executes \fBdmfilemapd\fP is responsible for
opening the file descriptor that is handed to the daemon.
.
.TP
.OPT_GROUP
.HP
.BR group_id
.br
The \fBdmstats\fP group identifier of the group that \fBdmfilemapd\fP
should update. The group must exist and it should correspond to
a set of regions created by a previous filemap operation.
.
.TP
.OPT_PATH
.HP
.BR abs_path
.br
The absolute path to the file being monitored, at the time that
it was opened. The use of \fIabs_path\fP by the daemon differs,
it was opened. The use of \fBpath\fP by the daemon differs,
depending on the filemap following mode in use; see \fBMODES\fP
and the \fImode\fP option for more information.
.
.TP
.OPT_MODE
The filemap monitoring mode the daemon.
Use either
.B inode
(\fBDM_FILEMAP_FOLLOW_INODE\fP), or
.B path
and the \fBmode\fP option for more information.
.br
.HP
.BR mode
.br
The filemap monitoring mode the daemon should use: either "inode"
(\fBDM_FILEMAP_FOLLOW_INODE\fP), or "path"
(\fBDM_FILEMAP_FOLLOW_PATH\fP), to enable follow-inode or
follow-path mode respectively.
.
.TP
.RI [ foreground ]
.HP
.BR [foreground]
.br
If set to 1, disable forking and allow the daemon to run in the
foreground.
.
.TP
.RI [ verbose ]
.br
.HP
.BR [verbose]
Control daemon logging. If set to zero, the daemon will close all
stdio streams and run silently. If \fBverbose\fP is a number
between 1 and 3, stdio will be retained and the daemon will log
messages to stdout and stderr that match the specified verbosity
level.
.
.
.SH MODES
.
The file map monitoring daemon can monitor files in two distinct
ways: the mode affects the behaviour of the daemon when a file
under monitoring is renamed or unlinked, and the conditions which
cause the daemon to terminate.
.P
In both modes, the daemon will always shut down when the group
being monitored is deleted.
.P
.B Follow inode
.P
@@ -121,9 +122,10 @@ daemon started. The file descriptor referencing the file is kept
open at all times, and the daemon will exit when it detects that
the file has been unlinked and it is the last holder of a reference
to the file.
.P
This mode is useful if the file is expected to be renamed, or moved
within the file system, while it is being monitored.
.P
.B Follow path
.P
@@ -132,7 +134,7 @@ line. The file descriptor referencing the file is re-opened on each
iteration of the daemon, and the daemon will exit if no file exists
at this location (a tolerance is allowed so that a brief delay
between removal and replacement is permitted).
.P
This mode is useful if the file is updated by unlinking the original
and placing a new file at the same path.
.
@@ -144,14 +146,14 @@ daemon can only react to new allocations once they have been written,
there are inevitably some IO events that cannot be counted when a
file is growing, particularly if the file is being extended by a
single thread writing beyond EOF (for example, the \fBdd\fP program).
.P
There is a further loss of events in that there is currently no way
to atomically resize a \fBdmstats\fP region and preserve its current
counter values. This affects files when they grow by extending the
final extent, rather than allocating a new extent: any events that
had accumulated in the region between any prior operation and the
resize are lost.
.P
File mapping is currently most effective in cases where the majority
of IO does not trigger extent allocation. Future updates may address
these limitations when kernel support is available.
@@ -171,23 +173,30 @@ Start the daemon in the background, in follow-path mode
Start the daemon in follow-inode mode, disable forking and enable
verbose logging
.br
.ad l
#
.B dmfilemapd 3 0 /var/tmp/data inode 1 3 3< /var/tmp/data
.nf
.br
Starting dmfilemapd with fd=3, group_id=0 mode=inode, path=/var/tmp/data
.br
dm version [ opencount flush ] [16384] (*1)
.br
dm info (253:0) [ opencount flush ] [16384] (*1)
.br
dm message (253:0) [ opencount flush ] @stats_list dmstats [16384] (*1)
.br
Read alias 'data' from aux_data
.br
Found group_id 0: alias="data"
.br
dm_stats_walk_init: initialised flags to 4000000000000
.br
starting stats walk with GROUP
.br
exiting _filemap_monitor_get_events() with deleted=0, check=0
.br
Waiting for check interval
.fi
.ad b
.br
.P
.
.SH AUTHORS
.
@@ -196,11 +205,8 @@ Bryn M. Reeves <bmr@redhat.com>
.SH SEE ALSO
.
.BR dmstats (8)
.P
LVM2 resource page:
.UR https://www.sourceware.org/lvm2
.UE
LVM2 resource page: https://www.sourceware.org/lvm2/
.br
Device-mapper resource page: http://sources.redhat.com/dm/
.br
Device-mapper resource page:
.UR http://sources.redhat.com/dm
.UE

View File

@@ -21,17 +21,15 @@ dmsetup \(em low level logical volume management
.B dmsetup
.de CMD_CREATE
. ad l
. nh
. BR create
. IR device_name
. RB [ -n | --notable |\: --table
. IR table |\: table_file ]
. RB [ --readahead
. RB [ + ] \fIsectors |\: auto | none ]
. RB [ -u | --uuid
. IR uuid ]
. RB [ --addnodeoncreate |\: --addnodeonresume ]
. hy
. RB \%[ --addnodeoncreate | --addnodeonresume ]
. RB \%[ -n | --notable | --table
. IR \%table | table_file ]
. RB [ --readahead
. RB \%[ + ] \fIsectors | auto | none ]
. ad b
..
.CMD_CREATE
@@ -79,23 +77,21 @@ dmsetup \(em low level logical volume management
.B dmsetup
.de CMD_INFOLONG
. ad l
. nh
. BR info
. BR -c | -C | --columns
. RB [ --count
. IR count ]
. RB [ --interval
. IR seconds ]
. RB [ --noheadings ]
. RB \%[ --nameprefixes ]
. RB \%[ --noheadings ]
. RB [ -o
. IR fields ]
. RB [ -O | --sort
. IR sort_fields ]
. RB [ --nameprefixes ]
. RB [ --separator
. IR separator ]
. RI [ device_name ]
. hy
. ad b
..
.CMD_INFOLONG
@@ -116,16 +112,14 @@ dmsetup \(em low level logical volume management
.B dmsetup
.de CMD_LS
. ad l
. nh
. BR ls
. RB [ --target
. IR target_type ]
. RB [ -o
. IR options ]
. RB [ --exec
. IR command ]
. RB [ --tree ]
. hy
. RB [ -o
. IR options ]
. ad b
..
.CMD_LS
@@ -228,14 +222,12 @@ dmsetup \(em low level logical volume management
.B dmsetup
.de CMD_SETGEOMETRY
. ad l
. nh
. BR setgeometry
. IR device_name
. IR cyl
. IR head
. IR sect
. IR start
. hy
. ad b
..
.CMD_SETGEOMETRY
@@ -275,12 +267,10 @@ dmsetup \(em low level logical volume management
.B dmsetup
.de CMD_SUSPEND
. ad l
. nh
. BR suspend
. RB [ --nolockfs ]
. RB [ --noflush ]
. IR device_name ...
. hy
. ad b
..
.CMD_SUSPEND
@@ -289,14 +279,12 @@ dmsetup \(em low level logical volume management
.B dmsetup
.de CMD_TABLE
. ad l
. nh
. BR table
. RB [ --concise ]
. RB [ --target
. IR target_type ]
. RB [ --showkeys ]
. RI [ device_name ...]
. hy
. ad b
..
.CMD_TABLE
@@ -365,12 +353,10 @@ dmsetup \(em low level logical volume management
.B dmsetup
.de CMD_WAIT
. ad l
. nh
. BR wait
. RB [ --noflush ]
. IR device_name
. RI [ event_nr ]
. hy
. ad b
..
.CMD_WAIT
@@ -379,23 +365,20 @@ dmsetup \(em low level logical volume management
.B dmsetup
.de CMD_WIPE_TABLE
. ad l
. nh
. BR wipe_table
. IR device_name ...
. RB [ -f | --force ]
. RB [ --noflush ]
. RB [ --nolockfs ]
. hy
. ad b
..
.CMD_WIPE_TABLE
.
.TP
\ \&
.
.TP
.PD
.P
.HP
.PD 0
.B devmap_name \fImajor minor
.TP
.HP
.B devmap_name \fImajor:minor
.PD
.ad b
@@ -405,10 +388,10 @@ dmsetup \(em low level logical volume management
dmsetup manages logical devices that use the device-mapper driver.
Devices are created by loading a table that specifies a target for
each sector (512 bytes) in the logical device.
.P
The first argument to dmsetup is a command.
The second argument is the logical device name or uuid.
.P
Invoking the dmsetup tool as \fBdevmap_name\fP
(which is not normally distributed and is supported
only for historical reasons) is equivalent to
@@ -418,53 +401,66 @@ only for historical reasons) is equivalent to
.
.SH OPTIONS
.
.TP
.B --addnodeoncreate
.HP
.BR --addnodeoncreate
.br
Ensure \fI/dev/mapper\fP node exists after \fBdmsetup create\fP.
.
.TP
.B --addnodeonresume
Ensure \fI/dev/mapper\fP node exists after \fBdmsetup\ resume\fP (default with udev).
.HP
.BR --addnodeonresume
.br
Ensure \fI/dev/mapper\fP node exists after \fBdmsetup resume\fP (default with udev).
.
.TP
.B --checks
.HP
.BR --checks
.br
Perform additional checks on the operations requested and report
potential problems. Useful when debugging scripts.
In some cases these checks may slow down operations noticeably.
.
.TP
.HP
.BR -c | -C | --columns
.br
Display output in columns rather than as Field: Value lines.
.
.TP
.B --count \fIcount
.HP
.BR --count
.IR count
.br
Specify the number of times to repeat a report. Set this to zero
continue until interrupted. The default interval is one second.
.
.TP
.HP
.BR -f | --force
.br
Try harder to complete operation.
.
.TP
.HP
.BR -h | --help
.br
Outputs a summary of the commands available, optionally including
the list of report fields (synonym with \fBhelp\fP command).
.
.TP
.B --inactive
.HP
.BR --inactive
.br
When returning any table information from the kernel report on the
inactive table instead of the live table.
Requires kernel driver version 4.16.0 or above.
.
.TP
.B --interval \fIseconds
.HP
.BR --interval
.IR seconds
.br
Specify the interval in seconds between successive iterations for
repeating reports. If \fB--interval\fP is specified but \fB--count\fP
is not, reports will continue to repeat until interrupted.
The default interval is one second.
.
.TP
.BR --manglename " " auto | hex | none
.HP
.BR --manglename
.BR auto | hex | none
.br
Mangle any character not on a whitelist using mangling_mode when
processing device-mapper device names and UUIDs. The names and UUIDs
are mangled on input and unmangled on output where the mangling mode
@@ -474,27 +470,33 @@ if already mangled, error on mixed),
\fBhex\fP (always do the mangling) and
\fBnone\fP (no mangling).
Default mode is \fB#DEFAULT_MANGLING#\fP.
Character whitelist: 0-9, A-Z, a-z, #+\-.:=@_. This whitelist is
Character whitelist: 0-9, A-Z, a-z, #+-.:=@_. This whitelist is
also supported by udev. Any character not on a whitelist is replaced
with its hex value (two digits) prefixed by \\x.
Mangling mode could be also set through
\fBDM_DEFAULT_NAME_MANGLING_MODE\fP
environment variable.
.
.TP
.BR -j | --major " " \fImajor
.HP
.BR -j | --major
.IR major
.br
Specify the major number.
.
.TP
.BR -m | --minor " " \fIminor
.HP
.BR -m | --minor
.IR minor
.br
Specify the minor number.
.
.TP
.HP
.BR -n | --notable
.br
When creating a device, don't load any table.
.
.TP
.B --nameprefixes
.HP
.BR --nameprefixes
.br
Add a "DM_" prefix plus the field name to the output. Useful with
\fB--noheadings\fP to produce a list of
field=value pairs that can be used to set environment variables
@@ -502,37 +504,45 @@ field=value pairs that can be used to set environment variables
.BR udev (7)
rules).
.
.TP
.B --noheadings
.HP
.BR --noheadings
Suppress the headings line when using columnar output.
.
.TP
.B --noflush
.HP
.BR --noflush
Do not flush outstanding I/O when suspending a device, or do not
commit thin-pool metadata when obtaining thin-pool status.
.
.TP
.B --nolockfs
.HP
.BR --nolockfs
.br
Do not attempt to synchronize filesystem eg, when suspending a device.
.
.TP
.B --noopencount
.HP
.BR --noopencount
.br
Tell the kernel not to supply the open reference count for the device.
.
.TP
.B --noudevrules
.HP
.BR --noudevrules
.br
Do not allow udev to manage nodes for devices in device-mapper directory.
.
.TP
.B --noudevsync
.HP
.BR --noudevsync
.br
Do not synchronise with udev when creating, renaming or removing devices.
.
.TP
.BR -o | --options " " \fIoptions
.HP
.BR -o | --options
.IR options
.br
Specify which fields to display.
.
.TP
.BR --readahead \ [ + ] \fIsectors | auto | none
.HP
.BR --readahead
.RB [ + ] \fIsectors | auto | none
.br
Specify read ahead size in units of sectors.
The default value is \fBauto\fP which allows the kernel to choose
a suitable value automatically. The \fB+\fP prefix lets you
@@ -540,12 +550,15 @@ specify a minimum value which will not be used if it is
smaller than the value chosen by the kernel.
The value \fBnone\fP is equivalent to specifying zero.
.
.TP
.HP
.BR -r | --readonly
.br
Set the table being loaded read-only.
.
.TP
.BR -S | --select " " \fIselection
.HP
.BR -S | --select
.IR selection
.br
Process only items that match \fIselection\fP criteria. If the command is
producing report output, adding the "selected" column (\fB-o
selected\fP) displays all rows and shows 1 if the row matches the
@@ -555,38 +568,49 @@ comparison operators. As a quick help and to see full list of column names that
can be used in selection and the set of supported selection operators, check
the output of \fBdmsetup\ info\ -c\ -S\ help\fP command.
.
.TP
.B --table \fItable
.HP
.BR --table
.IR table
.br
Specify a one-line table directly on the command line.
See below for more information on the table format.
.
.TP
.B --udevcookie \fIcookie
.HP
.BR --udevcookie
.IR cookie
.br
Use cookie for udev synchronisation.
Note: Same cookie should be used for same type of operations i.e. creation of
multiple different devices. It's not adviced to combine different
operations on the single device.
.
.TP
.BR -u | --uuid " " \fIuuid
.HP
.BR -u | --uuid
.br
Specify the \fIuuid\fP.
.
.TP
.HP
.BR -y | --yes
.br
Answer yes to all prompts automatically.
.
.TP
.BR -v | --verbose " [" -v | --verbose ]
.HP
.BR -v | --verbose
.RB [ -v | --verbose ]
.br
Produce additional output.
.
.TP
.B --verifyudev
.HP
.BR --verifyudev
.br
If udev synchronisation is enabled, verify that udev operations get performed
correctly and try to fix up the device nodes afterwards if not.
.
.TP
.B --version
.HP
.BR --version
.br
Display the library and kernel driver version.
.br
.
.SH COMMANDS
.
@@ -616,7 +640,7 @@ Flags defaults to read-write (rw) or may be read-only (ro).
Uuid, minor number and flags are optional so those fields may be empty.
A semi-colon separates specifications of different devices.
Use a backslash to escape the following character, for example a comma or semi-colon in a name or table. See also CONCISE FORMAT below.
.
.
.HP
.CMD_DEPS
.br
@@ -661,11 +685,11 @@ Fields are comma-separated and chosen from the following list:
.BR events ,
.BR uuid .
Attributes are:
.RB ( L )ive,
.RB ( I )nactive,
.RB ( s )uspended,
.RB ( r )ead-only,
.RB read-( w )rite.
.RI ( L )ive,
.RI ( I )nactive,
.RI ( s )uspended,
.RI ( r )ead-only,
.RI read-( w )rite.
Precede the list with '\fB+\fP' to append
to the default selection of columns instead of replacing it.
Precede any sort field with '\fB-\fP' for a reverse sort on that column.
@@ -798,7 +822,7 @@ Outputs status information for each of the device's targets.
With \fB--target\fP, only information relating to the specified target type
any is displayed. With \fB--noflush\fP, the thin target (from version 1.3.0)
doesn't commit any outstanding changes to disk before reporting its statistics.
.
.HP
.CMD_SUSPEND
.br
@@ -924,13 +948,14 @@ Creates a striped area.
e.g. striped 2 32 /dev/hda1 0 /dev/hdb1 0
will map the first chunk (16k) as follows:
.RS
.IP
LV chunk 1 \[->] hda1, chunk 1
LV chunk 2 \[->] hdb1, chunk 1
LV chunk 3 \[->] hda1, chunk 2
LV chunk 4 \[->] hdb1, chunk 2
.RS
LV chunk 1 -> hda1, chunk 1
LV chunk 2 -> hdb1, chunk 1
LV chunk 3 -> hda1, chunk 2
LV chunk 4 -> hdb1, chunk 2
etc.
.RE
.RE
.TP
.B error
Errors any I/O that goes to this area. Useful for testing or
@@ -981,17 +1006,21 @@ documentation directory for the device-mapper package.)
.
.SH EXAMPLES
.
.nf
# A table to join two disks together
.br
0 1028160 linear /dev/hda 0
.br
1028160 3903762 linear /dev/hdb 0
.P
.br
# A table to stripe across the two disks,
.br
# and add the spare space from
.br
# hdb to the back of the volume
.br
0 2056320 striped 2 32 /dev/hda 0 /dev/hdb 0
.br
2056320 2875602 linear /dev/hdb 1028160
.fi
.
.SH CONCISE FORMAT
.
@@ -1003,11 +1032,8 @@ A concise representation of one of more devices.
- A semi-colon separates devices.
.TP
The representation of a device takes the form:
.ad l
.nh
<name>,<uuid>,\:<minor>,<flags>,\:<table>\:[,<table>+]\:[;<dev_name>,<uuid>,\:<minor>,<flags>,<table>\:[,<table>+]]
.hy
.ad b
.sp
<name>,<uuid>,<minor>,<flags>,<table>[,<table>+][;<dev_name>,<uuid>,<minor>,<flags>,<table>[,<table>+]]
.TP
The fields are:
.
@@ -1023,33 +1049,27 @@ The minor number of the device. If empty, the kernel assigns a suitable minor n
.TP
.B flags
Supported flags are:
.br
.ad l
.sp
.B ro
Sets the table being loaded for the device read-only
.br
.B rw
Sets the table being loaded for the device read-write (default)
.ad b
.TP
.B table
One line of the table. See TABLE FORMAT above.
.
.SH EXAMPLES
.
.PD 0
.ad l
.nh
# A simple linear read-only device
.TP
test-linear-small,,,ro,\:0 2097152 linear /dev/loop0 0,\:2097152 2097152 linear /dev/loop1 0
.P
.br
test-linear-small,,,ro,0 2097152 linear /dev/loop0 0, 2097152 2097152 linear /dev/loop1 0
.br
.sp
# Two linear devices
.TP
test-linear-small,,,,\:0 2097152 linear /dev/loop0 0;\:test-linear-large,\:,,,\:0 2097152 linear /dev/loop1 0, 2097152 2097152 linear /dev/loop2 0
.hy
.ad b
.PD
.br
test-linear-small,,,,0 2097152 linear /dev/loop0 0;test-linear-large,,,, 0 2097152 linear /dev/loop1 0, 2097152 2097152 linear /dev/loop2 0
.br
.
.SH ENVIRONMENT VARIABLES
.
@@ -1076,10 +1096,6 @@ Original version: Joe Thornber <thornber@redhat.com>
.BR udev (7),
.BR udevadm (8)
.P
LVM2 resource page:
.UR https://www.sourceware.org/lvm2
.UE
LVM2 resource page: https://www.sourceware.org/lvm2/
.br
Device-mapper resource page:
.UR http://sources.redhat.com/dm
.UE
Device-mapper resource page: http://sources.redhat.com/dm/

View File

@@ -1,12 +1,12 @@
.TH DMSTATS 8 "Jun 23 2016" "Linux" "MAINTENANCE COMMANDS"
.
.de OPT_PROGRAMS
. RB [ --allprograms | --programid
. RB \%[ --allprograms | --programid
. IR id ]
..
.
.de OPT_REGIONS
. RB [ --allregions | --regionid
. RB \%[ --allregions | --regionid
. IR id ]
..
.de OPT_OBJECTS
@@ -55,17 +55,15 @@ dmstats \(em device-mapper statistics management
.B dmstats
.de CMD_COMMAND
. ad l
. nh
. IR command
. IR device_name \ |
. IR device_name " |"
. BR --major
. IR major
. BR --minor
. IR minor \ |
. IR minor " |"
. BR -u | --uuid
. IR uuid
. RB [ -v | --verbose ]
. hy
. RB \%[ -v | --verbose]
. ad b
..
.CMD_COMMAND
@@ -74,12 +72,10 @@ dmstats \(em device-mapper statistics management
.B dmstats
.de CMD_CLEAR
. ad l
. nh
. BR clear
. IR device_name
. OPT_PROGRAMS
. OPT_REGIONS
. hy
. ad b
..
.CMD_CLEAR
@@ -88,14 +84,13 @@ dmstats \(em device-mapper statistics management
.B dmstats
.de CMD_CREATE
. ad l
. nh
. BR create
. IR device_name ...| file_path ...| \fB--alldevices
. IR device_name... | file_path... | \fB--alldevices
. RB [ --areas
. IR nr_areas | \fB--areasize
. IR area_size ]
. RB [ --bounds
. IR histogram_boundaries ]
. IR \%histogram_boundaries ]
. RB [ --filemap ]
. RB [ --follow
. IR follow_mode ]
@@ -107,11 +102,10 @@ dmstats \(em device-mapper statistics management
. IR start_sector
. BR --length
. IR length | \fB--segments ]
. RB [ --userdata
. RB \%[ --userdata
. IR user_data ]
. RB [ --programid
. IR id ]
. hy
. ad b
..
.CMD_CREATE
@@ -120,12 +114,10 @@ dmstats \(em device-mapper statistics management
.B dmstats
.de CMD_DELETE
. ad l
. nh
. BR delete
. IR device_name | \fB--alldevices
. OPT_PROGRAMS
. OPT_REGIONS
. hy
. ad b
..
.CMD_DELETE
@@ -134,14 +126,12 @@ dmstats \(em device-mapper statistics management
.B dmstats
.de CMD_GROUP
. ad l
. nh
. BR group
. RI [ device_name | \fB--alldevices ]
. RB [ --alias
. IR name ]
. RB [ --regions
. IR regions ]
. hy
. ad b
..
.CMD_GROUP
@@ -159,7 +149,6 @@ dmstats \(em device-mapper statistics management
.B dmstats
.de CMD_LIST
. ad l
. nh
. BR list
. RI [ device_name ]
. RB [ --histogram ]
@@ -167,10 +156,9 @@ dmstats \(em device-mapper statistics management
. RB [ --units
. IR units ]
. OPT_OBJECTS
. RB [ --nosuffix ]
. RB \%[ --nosuffix ]
. RB [ --notimesuffix ]
. RB [ -v | --verbose ]
. hy
. RB \%[ -v | --verbose]
. ad b
..
.CMD_LIST
@@ -179,13 +167,11 @@ dmstats \(em device-mapper statistics management
.B dmstats
.de CMD_PRINT
. ad l
. nh
. BR print
. RI [ device_name ]
. RB [ --clear ]
. OPT_PROGRAMS
. OPT_REGIONS
. hy
. ad b
..
.CMD_PRINT
@@ -194,7 +180,6 @@ dmstats \(em device-mapper statistics management
.B dmstats
.de CMD_REPORT
. ad l
. nh
. BR report
. RI [ device_name ]
. RB [ --interval
@@ -214,8 +199,7 @@ dmstats \(em device-mapper statistics management
. RB [ --units
. IR units ]
. RB [ --nosuffix ]
. RB [ --notimesuffix ]
. hy
. RB \%[ --notimesuffix ]
. ad b
..
.CMD_REPORT
@@ -223,12 +207,10 @@ dmstats \(em device-mapper statistics management
.B dmstats
.de CMD_UNGROUP
. ad l
. nh
. BR ungroup
. RI [ device_name | \fB--alldevices ]
. RB [ --groupid
. IR id ]
. hy
. ad b
..
.CMD_UNGROUP
@@ -236,7 +218,6 @@ dmstats \(em device-mapper statistics management
.B dmstats
.de CMD_UPDATE_FILEMAP
. ad l
. nh
. BR update_filemap
. IR file_path
. RB [ --groupid
@@ -244,7 +225,6 @@ dmstats \(em device-mapper statistics management
. RB [ --follow
. IR follow_mode ]
. OPT_FOREGROUND
. hy
. ad b
..
.CMD_UPDATE_FILEMAP
@@ -257,272 +237,334 @@ dmstats \(em device-mapper statistics management
The dmstats program manages IO statistics regions for devices that use
the device-mapper driver. Statistics regions may be created, deleted,
listed and reported on using the tool.
.P
The first argument to dmstats is a \fIcommand\fP.
.P
The second argument is the \fIdevice name\fP,
\fIuuid\fP or \fImajor\fP and \fIminor\fP numbers.
.P
Further options permit the selection of regions, output format
control, and reporting behaviour.
.P
When no device argument is given dmstats will by default operate on all
device-mapper devices present. The \fBcreate\fP and \fBdelete\fP
commands require the use of \fB--alldevices\fP when used in this way.
.
.SH OPTIONS
.
.TP
.B --alias \fIname
.HP
.BR --alias
.IR name
.br
Specify an alias name for a group.
.
.TP
.B --alldevices
.HP
.BR --alldevices
.br
If no device arguments are given allow operation on all devices when
creating or deleting regions.
.
.TP
.B --allprograms
.HP
.BR --allprograms
.br
Include regions from all program IDs for list and report operations.
.
.TP
.B --allregions
.br
.HP
.BR --allregions
.br
Include all present regions for commands that normally accept a single
region identifier.
.
.TP
.B --area
.HP
.BR --area
.br
When peforming a list or report, include objects of type area in the
results.
.
.TP
.B --areas \fInr_areas
.HP
.BR --areas
.IR nr_areas
.br
Specify the number of statistics areas to create within a new region.
.
.TP
.B --areasize \fIarea_size\fR[\c
.HP
.BR --areasize
.IR area_size \c
.RB [ \c
.UNITS
.br
Specify the size of areas into which a new region should be divided. An
optional suffix selects units of:
.HELP_UNITS
.
.TP
.B --clear
.HP
.BR --clear
.br
When printing statistics counters, also atomically reset them to zero.
.
.TP
.B --count \fIcount
.HP
.BR --count
.IR count
.br
Specify the iteration count for repeating reports. If the count
argument is zero reports will continue to repeat until interrupted.
.
.TP
.B --group
.HP
.BR --group
.br
When peforming a list or report, include objects of type group in the
results.
.
.TP
.B --filemap
.HP
.BR --filemap
.br
Instead of creating regions on a device as specified by command line
options, open the file found at each \fBfile_path\fP argument, and
create regions corresponding to the locations of the on-disk extents
allocated to the file(s).
.
.TP
.B --nomonitor
.HP
.BR --nomonitor
.br
Disable the \fBdmfilemapd\fP daemon when creating new file mapped
groups. Normally the device-mapper filemap monitoring daemon,
\fBdmfilemapd\fP, is started for each file mapped group to update the
set of regions as the file changes on-disk: use of this option
disables this behaviour.
.sp
Regions in the group may still be updated with the
\fBupdate_filemap\fP command, or by starting the daemon manually.
.
.TP
.B --follow \fIfollow_mode
.HP
.BR --follow
.IR follow_mode
.br
Specify the \fBdmfilemapd\fP file following mode. The file map
monitoring daemon can monitor files in two distinct ways: the mode
affects the behaviour of the daemon when a file under monitoring is
renamed or unlinked, and the conditions which cause the daemon to
terminate.
.sp
The \fBfollow_mode\fP argument is either "inode", for follow-inode
mode, or "path", for follow-path.
.sp
If follow-inode mode is used, the daemon will hold the file open, and
continue to update regions from the same file descriptor. This means
that the mapping will follow rename, move (within the same file
system), and unlink operations. This mode is useful if the file is
expected to be moved, renamed, or unlinked while it is being
monitored.
.sp
In follow-inode mode, the daemon will exit once it detects that the
file has been unlinked and it is the last holder of a reference to it.
.sp
If follow-path is used, the daemon will re-open the provided path on
each monitoring iteration. This means that the group will be updated
to reflect a new file being moved to the same path as the original
file. This mode is useful for files that are expected to be updated
via unlink and rename.
.sp
In follow-path mode, the daemon will exit if the file is removed and
not replaced within a brief tolerance interval.
.sp
In either mode, the daemon exits automatically if the monitored group
is removed.
.
.TP
.B --foreground
.HP
.BR --foreground
.br
Specify that the \fBdmfilemapd\fP daemon should run in the foreground.
The daemon will not fork into the background, and will replace the
\fBdmstats\fP command that started it.
.
.TP
.B --groupid \fIid
.HP
.BR --groupid
.IR id
.br
Specify the group to operate on.
.
.TP
.B --bounds \fIhistogram_boundaries\c
.HP
.BR --bounds
.IR histogram_boundaries \c
.RB [ ns | us | ms | s ]
.br
Specify the boundaries of a latency histogram to be tracked for the
region as a comma separated list of latency values. Latency values are
given in nanoseconds. An optional unit suffix of
.BR ns , us , ms ,
.BR ns ,
.BR us ,
.BR ms ,
or \fBs\fP may be given after each value to specify units of
nanoseconds, microseconds, miliseconds or seconds respectively.
.
.TP
.B --histogram
.HP
.BR --histogram
.br
When used with the \fBreport\fP and \fBlist\fP commands select default
fields that emphasize latency histogram data.
.
.TP
.B --interval \fIseconds
.HP
.BR --interval
.IR seconds
.br
Specify the interval in seconds between successive iterations for
repeating reports. If \fB--interval\fP is specified but
\fB--count\fP is not,
reports will continue to repeat until interrupted.
.
.TP
.B --length \fIlength\fR[\c
.HP
.BR --length
.IR length \c
.RB [ \c
.UNITS
.br
Specify the length of a new statistics region in sectors. An optional
suffix selects units of:
.HELP_UNITS
.
.TP
.BR -j | --major " " \fImajor
.HP
.BR -j | --major
.IR major
.br
Specify the major number.
.
.TP
.BR -m | --minor " " \fIminor
.HP
.BR -m | --minor
.IR minor
.br
Specify the minor number.
.
.TP
.B --nogroup
.HP
.BR --nogroup
.br
When creating regions mapping the extents of a file in the file
system, do not create a group or set an alias.
.
.TP
.B --nosuffix
.HP
.BR --nosuffix
.br
Suppress the suffix on output sizes. Use with \fB--units\fP
(except h and H) if processing the output.
.
.TP
.B --notimesuffix
.HP
.BR --notimesuffix
.br
Suppress the suffix on output time values. Histogram boundary values
will be reported in units of nanoseconds.
.
.TP
.HP
.BR -o | --options
.br
Specify which report fields to display.
.
.TP
.BR -O | --sort " " \fIsort_fields
.HP
.BR -O | --sort
.IR sort_fields
.br
Sort output according to the list of fields given. Precede any
sort field with '\fB-\fP' for a reverse sort on that column.
.
.TP
.B --precise
.HP
.BR --precise
.br
Attempt to use nanosecond precision counters when creating new
statistics regions.
.
.TP
.B --programid \fIid
.HP
.BR --programid
.IR id
.br
Specify a program ID string. When creating new statistics regions this
string is stored with the region. Subsequent operations may supply a
program ID in order to select only regions with a matching value. The
default program ID for dmstats-managed regions is "dmstats".
.
.TP
.B --region
.HP
.BR --region
.br
When peforming a list or report, include objects of type region in the
results.
.
.TP
.B --regionid \fIid
.HP
.BR --regionid
.IR id
.br
Specify the region to operate on.
.
.TP
.B --regions \fIregion_list
.HP
.BR --regions
.IR region_list
.br
Specify a list of regions to group. The group list is a comma-separated
list of region identifiers. Continuous sequences of identifiers may be
expressed as a hyphen separated range, for example: '1-10'.
.
.TP
.B --relative
.HP
.BR --relative
.br
If displaying the histogram report show relative (percentage) values
instead of absolute counts.
.
.TP
.BR -S | --select " " \fIselection
.HP
.BR -S | --select
.IR selection
.br
Display only rows that match \fIselection\fP criteria. All rows with the
additional "selected" column (\fB-o selected\fP) showing 1 if the row matches
the \fIselection\fP and 0 otherwise. The selection criteria are defined by
specifying column names and their valid values while making use of
supported comparison operators.
.
.TP
.B --start \fIstart\fR[\c
.HP
.BR --start
.IR start \c
.RB [ \c
.UNITS
.br
Specify the start offset of a new statistics region in sectors. An
optional suffix selects units of:
.HELP_UNITS
.
.TP
.B --segments
.HP
.BR --segments
.br
When used with \fBcreate\fP, create a new statistics region for each
target contained in the given device(s). This causes a separate region
to be allocated for each segment of the device.
.sp
The newly created regions are automatically placed into a group unless
the \fB--nogroup\fP option is given. When grouping is enabled a group
alias may be specified using the \fB--alias\fP option.
.
.TP
.B --units \c
.HP
.BR --units
.RI [ units ] \c
.RB [ h | H | \c
.UNITS
.br
Set the display units for report output.
All sizes are output in these units:
.RB ( h )uman-readable,
.HELP_UNITS
Can also specify custom units e.g. \fB--units\ 3M\fP.
.
.TP
.B --userdata \fIuser_data
.HP
.BR --userdata
.IR user_data
.br
Specify user data (a word) to be stored with a new region. The value
is added to any internal auxiliary data (for example, group
information), and stored with the region in the aux_data field provided
by the kernel. Whitespace is not permitted.
.
.TP
.HP
.BR -u | --uuid
.br
Specify the uuid.
.
.TP
.BR -v | --verbose \ [ -v | --verbose ]
.HP
.BR -v | --verbose " [" -v | --verbose ]
.br
Produce additional output.
.
.SH COMMANDS
@@ -537,23 +579,23 @@ regions (with the exception of in-flight IO counters).
.CMD_CREATE
.br
Creates one or more new statistics regions on the specified device(s).
.sp
The region will span the entire device unless \fB--start\fP and
\fB--length\fP or \fB--segments\fP are given. The \fB--start\fP an
\fB--length\fP options allow a region of arbitrary length to be placed
at an arbitrary offset into the device. The \fB--segments\fP option
causes a new region to be created for each target in the corresponding
device-mapper device's table.
.sp
If the \fB--precise\fP option is used the command will attempt to
create a region using nanosecond precision counters.
.sp
If \fB--bounds\fP is given a latency histogram will be tracked for
the new region. The boundaries of the histogram bins are given as a
comma separated list of latency values. There is an implicit lower bound
of zero on the first bin and an implicit upper bound of infinity (or the
configured interval duration) on the final bin.
.sp
Latencies are given in nanoseconds. An optional unit suffix of ns, us,
ms, or s may be given after each value to specify units of nanoseconds,
microseconds, miliseconds or seconds respectively, so for example, 10ms
@@ -561,19 +603,19 @@ is equivalent to 10000000. Latency values with a precision of less than
one milisecond can only be used when precise timestamps are enabled: if
\fB--precise\fP is not given and values less than one milisecond are
used it will be enabled automatically.
.sp
An optional \fBprogram_id\fP or \fBuser_data\fP string may be associated
with the region. A \fBprogram_id\fP may then be used to select regions
for subsequent list, print, and report operations. The \fBuser_data\fP
stores an arbitrary string and is not used by dmstats or the
device-mapper kernel statistics subsystem.
.sp
By default dmstats creates regions with a \fBprogram_id\fP of
"dmstats".
.sp
On success the \fBregion_id\fP of the newly created region is printed
to stdout.
.sp
If the \fB--filemap\fP option is given with a regular file, or list
of files, as the \fBfile_path\fP argument, instead of creating regions
with parameters specified on the command line, \fBdmstats\fP will open
@@ -581,20 +623,20 @@ the files located at \fBfile_path\fP and create regions corresponding to
the physical extents allocated to the file. This can be used to monitor
statistics for individual files in the file system, for example, virtual
machine images, swap areas, or large database files.
.sp
To work with the \fB--filemap\fP option, files must be located on a
local file system, backed by a device-mapper device, that supports
physical extent data using the FIEMAP ioctl (Ext4 and XFS for e.g.).
.sp
By default regions that map a file are placed into a group and the
group alias is set to the basename of the file. This behaviour can be
overridden with the \fB--alias\fP and \fB--nogroup\fP options.
.sp
Creating a group that maps a file automatically starts a daemon,
\fBdmfilemapd\fP to monitor the file and update the mapping as the
extents allocated to the file change. This behaviour can be disabled
using the \fB--nomonitor\fP option.
.sp
Use the \fB--group\fP option to only display information for groups
when listing and reporting.
.
@@ -604,17 +646,17 @@ when listing and reporting.
Delete the specified statistics region. All counters and resources used
by the region are released and the region will not appear in the output
of subsequent list, print, or report operations.
.sp
All regions registered on a device may be removed using
\fB--allregions\fP.
.sp
To remove all regions on all devices both \fB--allregions\fP and
\fB--alldevices\fP must be used.
.sp
If a \fB--groupid\fP is given instead of a \fB--regionid\fP the
command will attempt to delete the group and all regions that it
contains.
.sp
If a deleted region is the first member of a group of regions the group
will also be removed.
.
@@ -623,19 +665,19 @@ will also be removed.
.br
Combine one or more statistics regions on the specified device into a
group.
.sp
The list of regions to be grouped is specified with \fB--regions\fP
and an optional alias may be assigned with \fB--alias\fP. The set of
regions is given as a comma-separated list of region identifiers. A
continuous range of identifers spanning from \fBR1\fP to \fBR2\fP may
be expressed as '\fBR1\fP-\fBR2\fP'.
.sp
Regions that have a histogram configured can be grouped: in this case
the number of histogram bins and their bounds must match exactly.
.sp
On success the group list and newly created \fBgroup_id\fP are
printed to stdout.
.sp
The group metadata is stored with the first (lowest numbered)
\fBregion_id\fP in the group: deleting this region will also delete
the group and other group members will be returned to their prior
@@ -653,21 +695,20 @@ the list of report fields.
List the statistics regions, areas, or groups registered on the device.
If the \fB--allprograms\fP switch is given all regions will be listed
regardless of region program ID values.
.sp
By default only regions and groups are included in list output. If
\fB-v\fP or \fB--verbose\fP is given the report will also include a
row of information for each configured group and for each area contained
in each region displayed.
.sp
Regions that contain a single area are by default omitted from the
verbose list since their properties are identical to the area that they
contain - to view all regions regardless of the number of areas present
use \fB--region\fP). To also view the areas contained within regions
use \fB--area\fP.
.sp
If \fB--histogram\fP is given the report will include the bin count
and latency boundary values for any configured histograms.
.
.HP
.CMD_PRINT
.br
@@ -681,16 +722,16 @@ Start a report for the specified object or for all present objects. If
the count argument is specified, the report will repeat at a fixed
interval set by the \fB--interval\fP option. The default interval is
one second.
.sp
If the \fB--allprograms\fP switch is given, all regions will be
listed, regardless of region program ID values.
.sp
If the \fB--histogram\fP is given the report will include the histogram
values and latency boundaries.
.sp
If the \fB--relative\fP is used the default histogram field displays
bin values as a percentage of the total number of I/Os.
.sp
Object types (areas, regions and groups) to include in the report are
selected using the \fB--area\fP, \fB--region\fP, and \fB--group\fP
options.
@@ -700,28 +741,27 @@ options.
.br
Remove an existing group and return all the group's regions to their
original state.
.sp
The group to be removed is specified using \fB--groupid\fP.
.
.HP
.CMD_UPDATE_FILEMAP
.br
Update a group of \fBdmstats\fP regions specified by \fBgroup_id\fP,
that were previously created with \fB--filemap\fP, either directly,
or by starting the monitoring daemon, \fBdmfilemapd\fP.
.sp
This will add and remove regions to reflect changes in the allocated
extents of the file on-disk, since the time that it was crated or last
updated.
.sp
Use of this command is not normally needed since the \fBdmfilemapd\fP
daemon will automatically monitor filemap groups and perform these
updates when required.
.sp
If a filemapped group was created with \fB--nomonitor\fP, or the
daemon has been killed, the \fBupdate_filemap\fP can be used to
manually force an update or start a new daemon.
.sp
Use \fB--nomonitor\fP to force a direct update and disable starting
the monitoring daemon.
.
@@ -733,54 +773,55 @@ span any range: from a single sector to the whole device. A region may
be further sub-divided into a number of distinct areas (one or more),
each with its own counter set. In this case a summary value for the
entire region is also available for use in reports.
.P
In addition, one or more regions on one device can be combined into
a statistics group. Groups allow several regions to be aggregated and
reported as a single entity; counters for all regions and areas are
summed and used to report totals for all group members. Groups also
permit the assignment of an optional alias, allowing meaningful names
to be associated with sets of regions.
.P
The group metadata is stored with the first (lowest numbered)
\fBregion_id\fP in the group: deleting this region will also delete
the group and other group members will be returned to their prior
state.
.P
By default new regions span the entire device. The \fB--start\fP and
\fB--length\fP options allows a region of any size to be placed at any
location on the device.
.P
Using offsets it is possible to create regions that map individual
objects within a block device (for example: partitions, files in a file
system, or stripes or other structures in a RAID volume). Groups allow
several non-contiguous regions to be assembled together for reporting
and data aggregation.
.P
A region may be either divided into the specified number of equal-sized
areas, or into areas of the given size by specifying one of
\fB--areas\fP or \fB--areasize\fP when creating a region with the
\fBcreate\fP command. Depending on the size of the areas and the device
region the final area within the region may be smaller than requested.
.
.SS Region identifiers
.
.P
.B Region identifiers
.P
Each region is assigned an identifier when it is created that is used to
reference the region in subsequent operations. Region identifiers are
unique within a given device (including across different \fBprogram_id\fP
values).
.P
Depending on the sequence of create and delete operations, gaps may
exist in the sequence of \fBregion_id\fP values for a particular device.
.P
The \fBregion_id\fP should be treated as an opaque identifier used to
reference the region.
.
.SS Group identifiers
.
.P
.B Group identifiers
.P
Groups are also assigned an integer identifier at creation time;
like region identifiers, group identifiers are unique within the
containing device.
.P
The \fBgroup_id\fP should be treated as an opaque identifier used to
reference the group.
.
@@ -791,80 +832,82 @@ correspond to the extents of a file in the file system. This allows
IO statistics to be monitored on a per-file basis, for example to
observe large database files, virtual machine images, or other files
of interest.
.P
To be able to use file mapping, the file must be backed by a
device-mapper device, and in a file system that supports the FIEMAP
ioctl (and which returns data describing the physical location of
extents). This currently includes \fBxfs(5)\fP and \fBext4(5)\fP.
.P
By default the regions making up a file are placed together in a
group, and the group alias is set to the \fBbasename(3)\fP of the
file. This allows statistics to be reported for the file as a whole,
aggregating values for the regions making up the group. To see only
the whole file (group) when using the \fBlist\fP and \fBreport\fP
commands, use \fB--group\fP.
.P
Since it is possible for the file to change after the initial
group of regions is created, the \fBupdate_filemap\fP command, and
\fBdmfilemapd\fP daemon are provided to update file mapped groups
either manually or automatically.
.
.SS File follow modes
.
.P
.B File follow modes
.P
The file map monitoring daemon can monitor files in two distinct ways:
follow-inode mode, and follow-path mode.
.P
The mode affects the behaviour of the daemon when a file under
monitoring is renamed or unlinked, and the conditions which cause the
daemon to terminate.
.P
If follow-inode mode is used, the daemon will hold the file open, and
continue to update regions from the same file descriptor. This means
that the mapping will follow rename, move (within the same file
system), and unlink operations. This mode is useful if the file is
expected to be moved, renamed, or unlinked while it is being
monitored.
.P
In follow-inode mode, the daemon will exit once it detects that the
file has been unlinked and it is the last holder of a reference to it.
.P
If follow-path is used, the daemon will re-open the provided path on
each monitoring iteration. This means that the group will be updated
to reflect a new file being moved to the same path as the original
file. This mode is useful for files that are expected to be updated
via unlink and rename.
.P
In follow-path mode, the daemon will exit if the file is removed and
not replaced within a brief tolerance interval (one second).
.P
To stop the daemon, delete the group containing the mapped regions:
the daemon will automatically shut down.
.P
The daemon can also be safely killed at any time and the group kept:
if the file is still being allocated the mapping will become
progressively out-of-date as extents are added and removed (in this
case the daemon can be re-started or the group updated manually with
the \fBupdate_filemap\fP command).
.P
See the \fBcreate\fP command and \fB--filemap\fP, \fB--follow\fP,
and \fB--nomonitor\fP options for further information.
.
.SS Limitations
.
.P
.B Limitations
.P
The daemon attempts to maintain good synchronisation between the file
extents and the regions contained in the group, however, since it can
only react to new allocations once they have been written, there are
inevitably some IO events that cannot be counted when a file is
growing, particularly if the file is being extended by a single thread
writing beyond end-of-file (for example, the \fBdd\fP program).
.P
There is a further loss of events in that there is currently no way
to atomically resize a \fBdmstats\fP region and preserve its current
counter values. This affects files when they grow by extending the
final extent, rather than allocating a new extent: any events that
had accumulated in the region between any prior operation and the
resize are lost.
.P
File mapping is currently most effective in cases where the majority
of IO does not trigger extent allocation. Future updates may address
these limitations when kernel support is available.
@@ -873,7 +916,7 @@ these limitations when kernel support is available.
.
The dmstats report provides several types of field that may be added to
the default field set, or used to create custom reports.
.P
All performance counters and metrics are calculated per-area.
.
.SS Derived metrics
@@ -1230,15 +1273,12 @@ Bryn M. Reeves <bmr@redhat.com>
.SH SEE ALSO
.
.BR dmsetup (8)
.P
LVM2 resource page:
.UR https://www.sourceware.org/lvm2
.UE
LVM2 resource page: https://www.sourceware.org/lvm2/
.br
Device-mapper resource page:
.UR http://sources.redhat.com/dm
.UE
.P
Device-mapper resource page: http://sources.redhat.com/dm/
.br
Device-mapper statistics kernel documentation
.br
.I Documentation/device-mapper/statistics.txt

View File

@@ -1,27 +1,24 @@
.TH "FSADM" "8" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
.
.SH "NAME"
.
fsadm \(em utility to resize or check filesystem on a device
.
.SH SYNOPSIS
.
.PD 0
.ad l
.TP 6
.HP 5
.B fsadm
.RI [ options ]
.BR check
.IR device
.
.TP
.HP
.B fsadm
.RI [ options ]
.BR resize
.IR device
.RI [ new_size ]
.ad b
.PD
.ad b
.
.SH DESCRIPTION
.
@@ -37,36 +34,44 @@ filesystem.
.
.SH OPTIONS
.
.TP
.HP
.BR -e | --ext-offline
.br
Unmount ext2/ext3/ext4 filesystem before doing resize.
.
.TP
.HP
.BR -f | --force
.br
Bypass some sanity checks.
.
.TP
.HP
.BR -h | --help
.br
Display the help text.
.
.TP
.HP
.BR -n | --dry-run
.br
Print commands without running them.
.
.TP
.HP
.BR -v | --verbose
.br
Be more verbose.
.
.TP
.HP
.BR -y | --yes
.br
Answer "yes" at any prompts.
.
.TP
.HP
.BR -c | --cryptresize
.br
Resize dm-crypt mapping together with filesystem detected on the device. The dm-crypt device must be recognizable by cryptsetup(8).
.
.TP
.HP
.BR \fInew_size [ B | K | M | G | T | P | E ]
.br
Absolute number of filesystem blocks to be in the filesystem,
or an absolute size using a suffix (in powers of 1024).
If new_size is not supplied, the whole device is used.
@@ -86,37 +91,30 @@ Resize the filesystem on logical volume \fI/dev/vg/test\fP to 1000 megabytes.
If \fI/dev/vg/test\fP contains ext2/ext3/ext4
filesystem it will be unmounted prior the resize.
All [y/n] questions will be answered 'y'.
.P
#
.sp
.B fsadm -e -y resize /dev/vg/test 1000M
.
.SH ENVIRONMENT VARIABLES
.
.TP
.B TMPDIR
.B "TMPDIR "
The temporary directory name for mount points. Defaults to "\fI/tmp\fP".
.TP
.B DM_DEV_DIR
The device directory name.
Defaults to "\fI/dev\fP" and must be an absolute path.
.
.SH SEE ALSO
.
.nh
.ad l
.BR lvm (8),
.BR lvresize (8),
.BR lvm.conf (5),
.P
.BR fsck (8),
.BR tune2fs (8),
.BR resize2fs (8),
.P
.BR reiserfstune (8),
.BR resize_reiserfs (8),
.P
.BR xfs_info (8),
.BR xfs_growfs (8),
.BR xfs_check (8),
.P
.BR cryptsetup (8)

View File

@@ -1,6 +1,4 @@
.
.SH EXAMPLES
.
Change LV permission to read-only:
.br
.sp
.B lvchange -pr vg00/lvol1

File diff suppressed because it is too large Load Diff

View File

@@ -1,42 +1,42 @@
lvconvert changes the LV type and includes utilities for LV data
maintenance. The LV type controls data layout and redundancy.
The LV type is also called the segment type or segtype.
.P
To display the current LV type, run the command:
.P
.B lvs -o name,segtype
.I LV
.P
In some cases, an LV is a single device mapper (dm) layer above physical
devices. In other cases, hidden LVs (dm devices) are layered between the
visible LV and physical devices. LVs in the middle layers are called sub LVs.
A command run on a visible LV sometimes operates on a sub LV rather than
the specified LV. In other cases, a sub LV must be specified directly on
the command line.
.P
Sub LVs can be displayed with the command:
.P
.B lvs -a
.P
The
.B linear
type is equivalent to the
.B striped
type when one stripe exists.
In that case, the types can sometimes be used interchangably.
.P
In most cases, the
.B mirror
type is deprecated and the
.B raid1
type should be used. They are both implementations of mirroring.
.P
Striped raid types are
\fBraid0/raid0_meta\fP,
\fBraid5\fP (an alias for raid5_ls),
\fBraid6\fP (an alias for raid6_zr) and
\fBraid10\fP (an alias for raid10_near).
.P
As opposed to mirroring, raid5 and raid6 stripe data and calculate parity
blocks. The parity blocks can be used for data block recovery in case
devices fail. A maximum number of one device in a raid5 LV may fail, and
@@ -45,27 +45,27 @@ data blocks for performance reasons, thus avoiding contention on a single
device. Specific arrangements of parity and data blocks (layouts) can be
used to optimize I/O performance, or to convert between raid levels. See
\fBlvmraid\fP(7) for more information.
.P
Layouts of raid5 rotating parity blocks can be: left-asymmetric
(raid5_la), left-symmetric (raid5_ls with alias raid5), right-asymmetric
(raid5_ra), right-symmetric (raid5_rs) and raid5_n, which doesn't rotate
parity blocks. Layouts of raid6 are: zero-restart (raid6_zr with alias
raid6), next-restart (raid6_nr), and next-continue (raid6_nc).
.P
Layouts including _n allow for conversion between raid levels (raid5_n to
raid6 or raid5_n to striped/raid0/raid0_meta). Additionally, special raid6
layouts for raid level conversions between raid5 and raid6 are:
raid6_ls_6, raid6_rs_6, raid6_la_6 and raid6_ra_6. Those correspond to
their raid5 counterparts (e.g. raid5_rs can be directly converted to
raid6_rs_6 and vice-versa).
.P
raid10 (an alias for raid10_near) is currently limited to one data copy
and even number of sub LVs. This is a mirror group layout, thus a single
sub LV may fail per mirror group without data loss.
.P
Striped raid types support converting the layout, their stripesize and
their number of stripes.
.P
The striped raid types combined with raid1 allow for conversion from
linear \[->] striped/raid0/raid0_meta and vice-versa by e.g. linear \[<>] raid1
\[<>] raid5_n (then adding stripes) \[<>] striped/raid0/raid0_meta.
linear -> striped/raid0/raid0_meta and vice-versa by e.g. linear <-> raid1
<-> raid5_n (then adding stripes) <-> striped/raid0/raid0_meta.

View File

@@ -1,6 +1,4 @@
.
.SH NOTES
.
This previous command syntax would perform two different operations:
.br
\fBlvconvert --thinpool\fP \fILV1\fP \fB--poolmetadata\fP \fILV2\fP
@@ -9,7 +7,7 @@ If LV1 was not a thin pool, the command would convert LV1 to
a thin pool, optionally using a specified LV for metadata.
But, if LV1 was already a thin pool, the command would swap
the current metadata LV with LV2 (for repair purposes.)
.P
In the same way, this previous command syntax would perform two different
operations:
.br
@@ -19,76 +17,74 @@ If LV1 was not a cache pool, the command would convert LV1 to
a cache pool, optionally using a specified LV for metadata.
But, if LV1 was already a cache pool, the command would swap
the current metadata LV with LV2 (for repair purposes.)
.
.SH EXAMPLES
.
Convert a linear LV to a two-way mirror LV.
.br
.B lvconvert --type mirror --mirrors 1 vg/lvol1
.P
Convert a linear LV to a two-way RAID1 LV.
.br
.B lvconvert --type raid1 --mirrors 1 vg/lvol1
.P
Convert a mirror LV to use an in-memory log.
.br
.B lvconvert --mirrorlog core vg/lvol1
.P
Convert a mirror LV to use a disk log.
.br
.B lvconvert --mirrorlog disk vg/lvol1
.P
Convert a mirror or raid1 LV to a linear LV.
.br
.B lvconvert --type linear vg/lvol1
.P
Convert a mirror LV to a raid1 LV with the same number of images.
.br
.B lvconvert --type raid1 vg/lvol1
.P
Convert a linear LV to a two-way mirror LV, allocating new extents from specific
PV ranges.
.br
.B lvconvert --mirrors 1 vg/lvol1 /dev/sda:0-15 /dev/sdb:0-15
.P
Convert a mirror LV to a linear LV, freeing physical extents from a specific PV.
.br
.B lvconvert --type linear vg/lvol1 /dev/sda
.P
Split one image from a mirror or raid1 LV, making it a new LV.
.br
.B lvconvert --splitmirrors 1 --name lv_split vg/lvol1
.P
Split one image from a raid1 LV, and track changes made to the raid1 LV
while the split image remains detached.
.br
.B lvconvert --splitmirrors 1 --trackchanges vg/lvol1
.P
Merge an image (that was previously created with --splitmirrors and
--trackchanges) back into the original raid1 LV.
.br
.B lvconvert --mergemirrors vg/lvol1_rimage_1
.P
Replace PV /dev/sdb1 with PV /dev/sdf1 in a raid1/4/5/6/10 LV.
.br
.B lvconvert --replace /dev/sdb1 vg/lvol1 /dev/sdf1
.P
Replace 3 PVs /dev/sd[b-d]1 with PVs /dev/sd[f-h]1 in a raid1 LV.
.br
.B lvconvert --replace /dev/sdb1 --replace /dev/sdc1 --replace /dev/sdd1
.RS
.B vg/lvol1 /dev/sd[fgh]1
.RE
.P
Replace the maximum of 2 PVs /dev/sd[bc]1 with PVs /dev/sd[gh]1 in a raid6 LV.
.br
.B lvconvert --replace /dev/sdb1 --replace /dev/sdc1 vg/lvol1 /dev/sd[gh]1
.P
Convert an LV into a thin LV in the specified thin pool. The existing LV
is used as an external read-only origin for the new thin LV.
.br
.B lvconvert --type thin --thinpool vg/tpool1 vg/lvol1
.P
Convert an LV into a thin LV in the specified thin pool. The existing LV
is used as an external read-only origin for the new thin LV, and is
renamed "external".
@@ -97,20 +93,20 @@ renamed "external".
.RS
.B --originname external vg/lvol1
.RE
.P
Convert an LV to a cache pool LV using another specified LV for cache pool
metadata.
.br
.B lvconvert --type cache-pool --poolmetadata vg/poolmeta1 vg/lvol1
.P
Convert an LV to a cache LV using the specified cache pool and chunk size.
.br
.B lvconvert --type cache --cachepool vg/cpool1 -c 128 vg/lvol1
.P
Detach and keep the cache pool from a cache LV.
.br
.B lvconvert --splitcache vg/lvol1
.P
Detach and remove the cache pool from a cache LV.
.br
.B lvconvert --uncache vg/lvol1

File diff suppressed because it is too large Load Diff

View File

@@ -2,45 +2,45 @@ lvcreate creates a new LV in a VG. For standard LVs, this requires
allocating logical extents from the VG's free physical extents. If there
is not enough free space, the VG can be extended with other PVs
(\fBvgextend\fP(8)), or existing LVs can be reduced or removed
(\fBlvremove\fP(8), \fBlvreduce\fP(8)).
.P
(\fBlvremove\fP(8), \fBlvreduce\fP(8).)
To control which PVs a new LV will use, specify one or more PVs as
position args at the end of the command line. lvcreate will allocate
physical extents only from the specified PVs.
.P
lvcreate can also create snapshots of existing LVs, e.g. for backup
purposes. The data in a new snapshot LV represents the content of the
original LV from the time the snapshot was created.
.P
RAID LVs can be created by specifying an LV type when creating the LV (see
\fBlvmraid\fP(7)). Different RAID levels require different numbers of
unique PVs be available in the VG for allocation.
.P
Thin pools (for thin provisioning) and cache pools (for caching) are
represented by special LVs with types thin-pool and cache-pool (see
\fBlvmthin\fP(7) and \fBlvmcache\fP(7)). The pool LVs are not usable as
standard block devices, but the LV names act as references to the pools.
.P
Thin LVs are thinly provisioned from a thin pool, and are created with a
virtual size rather than a physical size. A cache LV is the combination of
a standard LV with a cache pool, used to cache active portions of the LV
to improve performance.
.P
VDO LVs are also provisioned volumes from a VDO pool, and are created with a
virtual size rather than a physical size (see \fBlvmvdo\fP(7)).
.P
.SS Usage notes
In the usage section below, \fB--size\fP \fISize\fP can be replaced
with \fB--extents\fP \fINumber\fP. See descriptions in the options section.
.P
In the usage section below, \fB--name\fP is omitted from the required
options, even though it is typically used. When the name is not
specified, a new LV name is generated with the "lvol" prefix and a unique
numeric suffix.
.P
In the usage section below, when creating a pool and the name is omitted
the new LV pool name is generated with the
"vpool" for vdo-pools for prefix and a unique numeric suffix.
.P
Pool name can be specified together with \fIVG\fP name i.e.:
vg00/mythinpool.

View File

@@ -1,52 +1,50 @@
.
.SH EXAMPLES
.
.P
Create a striped LV with 3 stripes, a stripe size of 8KiB and a size of 100MiB.
The LV name is chosen by lvcreate.
.br
.B lvcreate -i 3 -I 8 -L 100m vg00
.P
Create a raid1 LV with two images, and a useable size of 500 MiB. This
operation requires two devices, one for each mirror image. RAID metadata
(superblock and bitmap) is also included on the two devices.
.br
.B lvcreate --type raid1 -m1 -L 500m -n mylv vg00
.P
Create a mirror LV with two images, and a useable size of 500 MiB.
This operation requires three devices: two for mirror images and
one for a disk log.
.br
.B lvcreate --type mirror -m1 -L 500m -n mylv vg00
.P
Create a mirror LV with 2 images, and a useable size of 500 MiB.
This operation requires 2 devices because the log is in memory.
.br
.B lvcreate --type mirror -m1 --mirrorlog core -L 500m -n mylv vg00
.P
Create a copy-on-write snapshot of an LV:
.br
.B lvcreate --snapshot --size 100m --name mysnap vg00/mylv
.P
Create a copy-on-write snapshot with a size sufficient
for overwriting 20% of the size of the original LV.
.br
.B lvcreate -s -l 20%ORIGIN -n mysnap vg00/mylv
.P
Create a sparse LV with 1TiB of virtual space, and actual space just under
100MiB.
.br
.B lvcreate --snapshot --virtualsize 1t --size 100m --name mylv vg00
.P
Create a linear LV with a usable size of 64MiB on specific physical extents.
.br
.B lvcreate -L 64m -n mylv vg00 /dev/sda:0-7 /dev/sdb:0-7
.P
Create a RAID5 LV with a usable size of 5GiB, 3 stripes, a stripe size of
64KiB, using a total of 4 devices (including one for parity).
.br
.B lvcreate --type raid5 -L 5G -i 3 -I 64 -n mylv vg00
.P
Create a RAID5 LV using all of the free space in the VG and spanning all the
PVs in the VG (note that the command will fail if there are more than 8 PVs in
the VG, in which case \fB-i 7\fP must be used to get to the current maximum of
@@ -56,7 +54,7 @@ the VG, in which case \fB-i 7\fP must be used to get to the current maximum of
.RS
.B --type raid5 -l 100%FREE -n mylv vg00
.RE
.P
Create RAID10 LV with a usable size of 5GiB, using 2 stripes, each on
a two-image mirror. (Note that the \fB-i\fP and \fB-m\fP arguments behave
differently:
@@ -65,11 +63,11 @@ but \fB-m\fP specifies the number of images in addition
to the first image).
.br
.B lvcreate --type raid10 -L 5G -i 2 -m 1 -n mylv vg00
.P
Create a 1TiB thin LV mythin, with 256GiB thinpool tpool0 in vg00.
.br
.B lvcreate -T -V 1T --size 256G --name mythin vg00/tpool0
.P
.B lvcreate --T --size 256G --name mythin vg00/tpool0
Create a 1TiB thin LV, first creating a new thin pool for it, where
the thin pool has 100MiB of space, uses 2 stripes, has a 64KiB stripe
size, and 256KiB chunk size.
@@ -78,22 +76,22 @@ size, and 256KiB chunk size.
.RS
.B -V 1t -L 100m -i 2 -I 64 -c 256 vg00
.RE
.P
Create a thin snapshot of a thin LV (the size option must not be
used, otherwise a copy-on-write snapshot would be created).
.br
.B lvcreate --snapshot --name mysnap vg00/thinvol
.P
Create a thin snapshot of the read-only inactive LV named "origin"
which becomes an external origin for the thin snapshot LV.
.br
.B lvcreate --snapshot --name mysnap --thinpool mypool vg00/origin
.P
Create a cache pool from a fast physical device. The cache pool can
then be used to cache an LV.
.br
.B lvcreate --type cache-pool -L 1G -n my_cpool vg00 /dev/fast1
.P
Create a cache LV, first creating a new origin LV on a slow physical device,
then combining the new origin LV with an existing cache pool.
.br
@@ -101,7 +99,7 @@ then combining the new origin LV with an existing cache pool.
.RS
.B -L 100G -n mylv vg00 /dev/slow1
.RE
.P
Create a VDO LV vdo0 with VDOPoolLV size of 10GiB and name vpool1.
.br
.B lvcreate --vdo --size 10G --name vdo0 vg00/vpool1

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
lvdisplay shows the attributes of LVs, like size, read/write status,
snapshot information, etc.
.P
\fBlvs\fP(8) is a preferred alternative that shows the same information
and more, using a more compact and configurable output format.

View File

@@ -1,277 +1,362 @@
.TH LVDISPLAY 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.SH NAME
.
lvdisplay \(em Display information about a logical volume
lvdisplay - Display information about a logical volume
.
.SH SYNOPSIS
.
\fBlvdisplay\fP
.br
[ \fIoption_args\fP ]
.br
[ \fIposition_args\fP ]
.br
.
.SH DESCRIPTION
.
lvdisplay shows the attributes of LVs, like size, read/write status,
snapshot information, etc.
.P
\fBlvs\fP(8) is a preferred alternative that shows the same information
and more, using a more compact and configurable output format.
.
.SH USAGE
.
\fBlvdisplay\fP
.br
.RS 4
.ad l
[ \fB-a\fP|\fB--all\fP ]
.ad b
.br
.ad l
[ \fB-c\fP|\fB--colon\fP ]
.ad b
.br
.ad l
[ \fB-C\fP|\fB--columns\fP ]
.ad b
.br
.ad l
[ \fB-H\fP|\fB--history\fP ]
.ad b
.br
.ad l
[ \fB-m\fP|\fB--maps\fP ]
.ad b
.br
.ad l
[ \fB-o\fP|\fB--options\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB-O\fP|\fB--sort\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB-S\fP|\fB--select\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--aligned\fP ]
.ad b
.br
.ad l
[ \fB--binary\fP ]
.ad b
.br
.ad l
[ \fB--configreport\fP \fBlog\fP|\fBvg\fP|\fBlv\fP|\fBpv\fP|\fBpvseg\fP|\fBseg\fP ]
.ad b
.br
.ad l
[ \fB--foreign\fP ]
.ad b
.br
.ad l
[ \fB--ignorelockingfailure\fP ]
.ad b
.br
.ad l
[ \fB--logonly\fP ]
.ad b
.br
.ad l
[ \fB--noheadings\fP ]
.ad b
.br
.ad l
[ \fB--nosuffix\fP ]
.ad b
.br
.ad l
[ \fB--readonly\fP ]
.ad b
.br
.ad l
[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP ]
.ad b
.br
.ad l
[ \fB--segments\fP ]
.ad b
.br
.ad l
[ \fB--separator\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--shared\fP ]
.ad b
.br
.ad l
[ \fB--unbuffered\fP ]
.ad b
.br
[ \fB--units\fP \c
.nh
\%[\fINumber\fP]\fBr\fP|\:\fBR\fP|\:\fBh\fP|\:\fBH\fP|\:\fBb\fP|\:\fBB\fP|\:\fBs\fP|\:\fBS\fP|\:\fBk\fP|\:\fBK\fP|\:\fBm\fP|\:\fBM\fP|\:\fBg\fP|\:\fBG\fP|\:\fBt\fP|\:\fBT\fP|\:\fBp\fP|\:\fBP\fP|\:\fBe\fP|\:\fBE\fP
.hy
]
.ad l
[ \fB--units\fP \fBr\fP|\fBR\fP|\fBh\fP|\fBH\fP|\fBb\fP|\fBB\fP|\fBs\fP|\fBS\fP|\fBk\fP|\fBK\fP|\fBm\fP|\fBM\fP|\fBg\fP|\fBG\fP|\fBt\fP|\fBT\fP|\fBp\fP|\fBP\fP|\fBe\fP|\fBE\fP ]
.ad b
.br
[ COMMON_OPTIONS ]
.ad b
.RE
.br
.RS 4
[ \fIVG\fP|\fILV\fP|\fITag\fP ... ]
.RE
.P
Common options for lvm:
.
.RS 4
.ad l
[ \fB-d\fP|\fB--debug\fP ]
.ad b
.br
.ad l
[ \fB-h\fP|\fB--help\fP ]
.ad b
.br
.ad l
[ \fB-q\fP|\fB--quiet\fP ]
.ad b
.br
.ad l
[ \fB-t\fP|\fB--test\fP ]
.ad b
.br
.ad l
[ \fB-v\fP|\fB--verbose\fP ]
.ad b
.br
.ad l
[ \fB-y\fP|\fB--yes\fP ]
.ad b
.br
.ad l
[ \fB--commandprofile\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--config\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--devices\fP \fIPV\fP ]
.ad b
.br
.ad l
[ \fB--devicesfile\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
.ad l
[ \fB--lockopt\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--longhelp\fP ]
.ad b
.br
.ad l
[ \fB--nolocking\fP ]
.ad b
.br
.ad l
[ \fB--profile\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--version\fP ]
.ad b
.RE
.
.SH OPTIONS
.
.
.HP
.ad l
\fB--aligned\fP
.br
Use with --separator to align the output columns
.
.ad b
.HP
.ad l
\fB-a\fP|\fB--all\fP
.br
Show information about internal LVs.
These are components of normal LVs, such as mirrors,
which are not independently accessible, e.g. not mountable.
.
.ad b
.HP
.ad l
\fB--binary\fP
.br
Use binary values "0" or "1" instead of descriptive literal values
for columns that have exactly two valid values to report (not counting
the "unknown" value which denotes that the value could not be determined).
.
.ad b
.HP
.ad l
\fB-c\fP|\fB--colon\fP
.br
Generate colon separated output for easier parsing in scripts or programs.
Also see \fBvgs\fP(8) which provides considerably more control over the output.
.
.ad b
.HP
.ad l
\fB-C\fP|\fB--columns\fP
.br
Display output in columns, the equivalent of \fBvgs\fP(8).
Options listed are the same as options given in \fBvgs\fP(8).
.
.ad b
.HP
.ad l
\fB--commandprofile\fP \fIString\fP
.br
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.ad b
.HP
.ad l
\fB--config\fP \fIString\fP
.br
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
Config settings for the command. These override lvm.conf settings.
The String arg uses the same format as lvm.conf,
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.ad b
.HP
.ad l
\fB--configreport\fP \fBlog\fP|\fBvg\fP|\fBlv\fP|\fBpv\fP|\fBpvseg\fP|\fBseg\fP
.br
See \fBlvmreport\fP(7).
.
.ad b
.HP
.ad l
\fB-d\fP|\fB--debug\fP ...
.br
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.ad b
.HP
.ad l
\fB--devices\fP \fIPV\fP
.br
Devices that the command can use. This option can be repeated
or accepts a comma separated list of devices. This overrides
the devices file.
.
.ad b
.HP
.ad l
\fB--devicesfile\fP \fIString\fP
.br
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
The file must exist in /etc/lvm/devices/ and is managed
with the lvmdevices(8) command.
This overrides the lvm.conf devices/devicesfile and
devices/use_devicesfile settings.
.ad b
.HP
.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.ad b
.HP
.ad l
\fB--foreign\fP
.br
Report/display foreign VGs that would otherwise be skipped.
See \fBlvmsystemid\fP(7) for more information about foreign VGs.
.
.ad b
.HP
.ad l
\fB-h\fP|\fB--help\fP
.br
Display help text.
.
.ad b
.HP
.ad l
\fB-H\fP|\fB--history\fP
.br
Include historical LVs in the output.
(This has no effect unless LVs were removed while
\fBlvm.conf\fP(5) \fBmetadata/record_lvs_history\fP was enabled.
.
lvm.conf metadata/record_lvs_history was enabled.
.ad b
.HP
.ad l
\fB--ignorelockingfailure\fP
.br
Allows a command to continue with read-only metadata
operations after locking failures.
.
.ad b
.HP
.ad l
\fB--lockopt\fP \fIString\fP
.br
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.ad b
.HP
.ad l
\fB--logonly\fP
.br
Suppress command report and display only log report.
.
.ad b
.HP
.ad l
\fB--longhelp\fP
.br
Display long help text.
.
.ad b
.HP
.ad l
\fB-m\fP|\fB--maps\fP
.br
Display the mapping of logical extents to PVs and physical extents.
To map physical extents to logical extents use:
pvs --segments -o+lv_name,seg_start_pe,segtype
.
.ad b
.HP
.ad l
\fB--noheadings\fP
.br
Suppress the headings line that is normally the first line of output.
Useful if grepping the output.
.
.ad b
.HP
.ad l
\fB--nolocking\fP
.br
Disable locking.
.
.ad b
.HP
.ad l
\fB--nosuffix\fP
.br
Suppress the suffix on output sizes. Use with --units
(except h and H) if processing the output.
.
.ad b
.HP
.ad l
\fB-o\fP|\fB--options\fP \fIString\fP
.br
Comma-separated, ordered list of fields to display in columns.
String arg syntax is: [\fB+\fP|\fB-\fP|\fB#\fP]\fIField1\fP[\fB,\fP\fIField2\fP ...]
String arg syntax is: [+|-|#]Field1[,Field2 ...]
The prefix \fB+\fP will append the specified fields to the default fields,
\fB-\fP will remove the specified fields from the default fields, and
\fB#\fP will compact specified fields (removing them when empty for all rows.)
@@ -285,22 +370,25 @@ Use field name \fBlv_all\fP to view all LV fields,
\fBpvseg_all\fP all PV segment fields,
\fBseg_all\fP all LV segment fields, and
\fBpvseg_all\fP all PV segment columns.
See the \fBlvm.conf\fP(5) report section for more config options.
See the lvm.conf report section for more config options.
See \fBlvmreport\fP(7) for more information about reporting.
.
.ad b
.HP
.ad l
\fB--profile\fP \fIString\fP
.br
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.ad b
.HP
.ad l
\fB-q\fP|\fB--quiet\fP ...
.br
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.ad b
.HP
.ad l
\fB--readonly\fP
.br
Run the command in a special read-only mode which will read on-disk
@@ -309,22 +397,25 @@ inside metadata used by a virtual machine image while the virtual
machine is running. No attempt will be made to communicate with the
device-mapper kernel driver, so this option is unable to report whether
or not LVs are actually in use.
.
.ad b
.HP
.ad l
\fB--reportformat\fP \fBbasic\fP|\fBjson\fP
.br
Overrides current output format for reports which is defined globally by
the report/output_format setting in \fBlvm.conf\fP(5).
the report/output_format setting in lvm.conf.
\fBbasic\fP is the original format with columns and rows.
If there is more than one report per command, each report is prefixed
with the report name for identification. \fBjson\fP produces report
output in JSON format. See \fBlvmreport\fP(7) for more information.
.
.ad b
.HP
.ad l
\fB--segments\fP
.br
.
.ad b
.HP
.ad l
\fB-S\fP|\fB--select\fP \fIString\fP
.br
Select objects for processing and reporting based on specified criteria.
@@ -335,26 +426,30 @@ Rows can be displayed with an additional "selected" field (-o selected)
showing 1 if the row matches the selection and 0 otherwise.
For non-reporting commands which process LVM entities, the selection is
used to choose items to process.
.
.ad b
.HP
.ad l
\fB--separator\fP \fIString\fP
.br
String to use to separate each column. Useful if grepping the output.
.
.ad b
.HP
.ad l
\fB--shared\fP
.br
Report/display shared VGs that would otherwise be skipped when
lvmlockd is not being used on the host.
See \fBlvmlockd\fP(8) for more information about shared VGs.
.
.ad b
.HP
.ad l
\fB-O\fP|\fB--sort\fP \fIString\fP
.br
Comma-separated ordered list of columns to sort by. Replaces the default
selection. Precede any column with \fB-\fP for a reverse sort on that column.
.
.ad b
.HP
.ad l
\fB-t\fP|\fB--test\fP
.br
Run in test mode. Commands will not update metadata.
@@ -362,19 +457,16 @@ This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.ad b
.HP
.ad l
\fB--unbuffered\fP
.br
Produce output immediately without sorting or aligning the columns properly.
.
.ad b
.HP
.ad l
\fB--units\fP \c
.nh
\%[\fINumber\fP]\fBr\fP|\:\fBR\fP|\:\fBh\fP|\:\fBH\fP|\:\fBb\fP|\:\fBB\fP|\:\fBs\fP|\:\fBS\fP|\:\fBk\fP|\:\fBK\fP|\:\fBm\fP|\:\fBM\fP|\:\fBg\fP|\:\fBG\fP|\:\fBt\fP|\:\fBT\fP|\:\fBp\fP|\:\fBP\fP|\:\fBe\fP|\:\fBE\fP
.hy
.ad b
\fB--units\fP \fBr\fP|\fBR\fP|\fBh\fP|\fBH\fP|\fBb\fP|\fBB\fP|\fBs\fP|\fBS\fP|\fBk\fP|\fBK\fP|\fBm\fP|\fBM\fP|\fBg\fP|\fBG\fP|\fBt\fP|\fBT\fP|\fBp\fP|\fBP\fP|\fBe\fP|\fBE\fP
.br
All sizes are output in these units:
human-(r)eadable with '<' rounding indicator,
@@ -382,68 +474,127 @@ human-(r)eadable with '<' rounding indicator,
(g)igabytes, (t)erabytes, (p)etabytes, (e)xabytes.
Capitalise to use multiples of 1000 (S.I.) instead of 1024.
Custom units can be specified, e.g. --units 3M.
.
.ad b
.HP
.ad l
\fB-v\fP|\fB--verbose\fP ...
.br
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.ad b
.HP
.ad l
\fB--version\fP
.br
Display version information.
.
.ad b
.HP
.ad l
\fB-y\fP|\fB--yes\fP
.br
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
.
.ad b
.SH VARIABLES
.
.TP
.I VG
.HP
\fIVG\fP
.br
Volume Group name. See \fBlvm\fP(8) for valid names.
.TP
.I LV
.HP
\fILV\fP
.br
Logical Volume name. See \fBlvm\fP(8) for valid names.
An LV positional arg generally includes the VG name and LV name, e.g. VG/LV.
.TP
.I Tag
.HP
\fITag\fP
.br
Tag name. See \fBlvm\fP(8) for information about tag names and using tags
in place of a VG, LV or PV.
.TP
.I String
.HP
\fIString\fP
.br
See the option description for information about the string content.
.TP
.IR Size [UNIT]
.HP
\fISize\fP[UNIT]
.br
Size is an input number that accepts an optional unit.
Input units are always treated as base two values, regardless of
capitalization, e.g. 'k' and 'K' both refer to 1024.
The default input unit is specified by letter, followed by |UNIT.
UNIT represents other possible input units:
.BR b | B
is bytes,
.BR s | S
is sectors of 512 bytes,
.BR k | K
is KiB,
.BR m | M
is MiB,
.BR g | G
is GiB,
.BR t | T
is TiB,
.BR p | P
is PiB,
.BR e | E
is EiB.
UNIT represents other possible input units: \fBbBsSkKmMgGtTpPeE\fP.
b|B is bytes, s|S is sectors of 512 bytes, k|K is KiB,
m|M is MiB, g|G is GiB, t|T is TiB, p|P is PiB, e|E is EiB.
(This should not be confused with the output control --units, where
capital letters mean multiple of 1000.)
.
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
.SH SEE ALSO
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
.BR pvcreate (8)
.BR pvdisplay (8)
.BR pvmove (8)
.BR pvremove (8)
.BR pvresize (8)
.BR pvs (8)
.BR pvscan (8)
.BR vgcfgbackup (8)
.BR vgcfgrestore (8)
.BR vgchange (8)
.BR vgck (8)
.BR vgcreate (8)
.BR vgconvert (8)
.BR vgdisplay (8)
.BR vgexport (8)
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
.BR vgremove (8)
.BR vgrename (8)
.BR vgs (8)
.BR vgscan (8)
.BR vgsplit (8)
.BR lvcreate (8)
.BR lvchange (8)
.BR lvconvert (8)
.BR lvdisplay (8)
.BR lvextend (8)
.BR lvreduce (8)
.BR lvremove (8)
.BR lvrename (8)
.BR lvresize (8)
.BR lvs (8)
.BR lvscan (8)
.BR lvm-fullreport (8)
.BR lvm-lvpoll (8)
.BR lvm2-activation-generator (8)
.BR blkdeactivate (8)
.BR lvmdump (8)
.BR dmeventd (8)
.BR lvmpolld (8)
.BR lvmlockd (8)
.BR lvmlockctl (8)
.BR cmirrord (8)
.BR lvmdbusd (8)
.BR lvmsystemid (7)
.BR lvmreport (7)
.BR lvmraid (7)
.BR lvmthin (7)
.BR lvmcache (7)

View File

@@ -1,12 +1,12 @@
lvextend extends the size of an LV. This requires allocating logical
extents from the VG's free physical extents. If the extension adds a new
LV segment, the new segment will use the existing segment type of the LV.
.P
Extending a copy-on-write snapshot LV adds space for COW blocks.
.P
Use \fBlvconvert\fP(8) to change the number of data images in a RAID or
mirrored LV.
.P
In the usage section below, \fB--size\fP \fISize\fP can be replaced
with \fB--extents\fP \fINumber\fP. See both descriptions
the options section.

View File

@@ -1,16 +1,14 @@
.
.SH EXAMPLES
.
Extend the size of an LV by 54MiB, using a specific PV.
.br
.B lvextend -L +54 vg01/lvol10 /dev/sdk3
.P
Extend the size of an LV by the amount of free
space on PV /dev/sdk3. This is equivalent to specifying
"-l +100%PVS" on the command line.
.br
.B lvextend vg01/lvol01 /dev/sdk3
.P
Extend an LV by 16MiB using specific physical extents.
.br
.B lvextend -L+16m vg01/lvol01 /dev/sda:8-9 /dev/sdb:8-9

View File

@@ -1,11 +1,8 @@
.TH LVEXTEND 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.SH NAME
.
lvextend \(em Add space to a logical volume
lvextend - Add space to a logical volume
.
.SH SYNOPSIS
.
\fBlvextend\fP \fIoption_args\fP \fIposition_args\fP
.br
[ \fIoption_args\fP ]
@@ -14,94 +11,146 @@ lvextend \(em Add space to a logical volume
.br
.P
.ad l
\fB--alloc\fP \c
.nh
\%\fBcontiguous\fP|\:\fBcling\fP|\:\fBcling_by_tags\fP|\:\fBnormal\fP|\:\fBanywhere\fP|\:\fBinherit\fP
.hy
\fB--alloc\fP \fBcontiguous\fP|\fBcling\fP|\fBcling_by_tags\fP|\fBnormal\fP|\fBanywhere\fP|\fBinherit\fP
.ad b
.br
.ad l
\fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
.ad b
.br
.ad l
\fB--commandprofile\fP \fIString\fP
.ad b
.br
.ad l
\fB--config\fP \fIString\fP
.ad b
.br
.ad l
\fB-d\fP|\fB--debug\fP
.ad b
.br
.ad l
\fB--devices\fP \fIPV\fP
.ad b
.br
.ad l
\fB--devicesfile\fP \fIString\fP
.ad b
.br
.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.ad b
.br
.ad l
\fB-l\fP|\fB--extents\fP [\fB+\fP]\fINumber\fP[PERCENT]
.ad b
.br
.ad l
\fB-f\fP|\fB--force\fP
.ad b
.br
.ad l
\fB-h\fP|\fB--help\fP
.ad b
.br
.ad l
\fB--lockopt\fP \fIString\fP
.ad b
.br
.ad l
\fB--longhelp\fP
.ad b
.br
.ad l
\fB-m\fP|\fB--mirrors\fP \fINumber\fP
.ad b
.br
.ad l
\fB-n\fP|\fB--nofsck\fP
.ad b
.br
.ad l
\fB--nolocking\fP
.ad b
.br
.ad l
\fB--nosync\fP
.ad b
.br
.ad l
\fB--noudevsync\fP
.ad b
.br
.ad l
\fB--poolmetadatasize\fP [\fB+\fP]\fISize\fP[m|UNIT]
.ad b
.br
.ad l
\fB--profile\fP \fIString\fP
.ad b
.br
.ad l
\fB-q\fP|\fB--quiet\fP
.ad b
.br
.ad l
\fB--reportformat\fP \fBbasic\fP|\fBjson\fP
.ad b
.br
.ad l
\fB-r\fP|\fB--resizefs\fP
.ad b
.br
.ad l
\fB-L\fP|\fB--size\fP [\fB+\fP]\fISize\fP[m|UNIT]
.ad b
.br
.ad l
\fB-i\fP|\fB--stripes\fP \fINumber\fP
.ad b
.br
.ad l
\fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT]
.ad b
.br
.ad l
\fB-t\fP|\fB--test\fP
.ad b
.br
\fB--type\fP \c
.nh
\%\fBlinear\fP|\:\fBstriped\fP|\:\fBsnapshot\fP|\:\fBraid\fP|\:\fBmirror\fP|\:\fBthin\fP|\:\fBthin-pool\fP|\:\fBvdo\fP|\:\fBvdo-pool\fP|\:\fBcache\fP|\:\fBcache-pool\fP|\:\fBwritecache\fP
.hy
.ad l
\fB--type\fP \fBlinear\fP|\fBstriped\fP|\fBsnapshot\fP|\fBraid\fP|\fBmirror\fP|\fBthin\fP|\fBthin-pool\fP|\fBvdo\fP|\fBvdo-pool\fP|\fBcache\fP|\fBcache-pool\fP|\fBwritecache\fP
.ad b
.br
.ad l
\fB--usepolicies\fP
.ad b
.br
.ad l
\fB-v\fP|\fB--verbose\fP
.ad b
.br
.ad l
\fB--version\fP
.ad b
.br
.ad l
\fB-y\fP|\fB--yes\fP
.ad b
.
.SH DESCRIPTION
.
lvextend extends the size of an LV. This requires allocating logical
extents from the VG's free physical extents. If the extension adds a new
LV segment, the new segment will use the existing segment type of the LV.
.P
Extending a copy-on-write snapshot LV adds space for COW blocks.
.P
Use \fBlvconvert\fP(8) to change the number of data images in a RAID or
mirrored LV.
.P
In the usage section below, \fB--size\fP \fISize\fP can be replaced
with \fB--extents\fP \fINumber\fP. See both descriptions
the options section.
.
.SH USAGE
.
Extend an LV by a specified size.
.br
.P
@@ -110,24 +159,32 @@ Extend an LV by a specified size.
.RS 4
.ad l
[ \fB-l\fP|\fB--extents\fP [\fB+\fP]\fINumber\fP[PERCENT] ]
.ad b
.br
.ad l
[ \fB-r\fP|\fB--resizefs\fP ]
.ad b
.br
.ad l
[ \fB-i\fP|\fB--stripes\fP \fINumber\fP ]
.ad b
.br
.ad l
[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
.ad b
.br
.ad l
[ \fB--poolmetadatasize\fP [\fB+\fP]\fISize\fP[m|UNIT] ]
.ad b
.br
[ COMMON_OPTIONS ]
.ad b
.RE
.br
.RS 4
[ \fIPV\fP ... ]
.RE
.P
\(em
.P
-
Extend an LV by specified PV extents.
.br
.P
@@ -136,143 +193,172 @@ Extend an LV by specified PV extents.
.RS 4
.ad l
[ \fB-r\fP|\fB--resizefs\fP ]
.ad b
.br
.ad l
[ \fB-i\fP|\fB--stripes\fP \fINumber\fP ]
.ad b
.br
.ad l
[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
.ad b
.br
[ COMMON_OPTIONS ]
.ad b
.RE
.P
\(em
.P
.br
-
Extend a pool metadata SubLV by a specified size.
.br
.P
\fBlvextend\fP \fB--poolmetadatasize\fP [\fB+\fP]\fISize\fP[m|UNIT] \fILV1\fP
\fBlvextend\fP \fB--poolmetadatasize\fP [\fB+\fP]\fISize\fP[m|UNIT] \fILV\fP\fI_thinpool\fP
.br
.RS 4
.ad l
[ \fB-i\fP|\fB--stripes\fP \fINumber\fP ]
.ad b
.br
.ad l
[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
.ad b
.br
[ COMMON_OPTIONS ]
.ad b
.RE
.br
.RS 4
[ \fIPV\fP ... ]
.RE
.P
.RS 4
LV1 types: thinpool
.RE
.P
\(em
.P
-
Extend an LV according to a predefined policy.
.br
.P
\fBlvextend\fP \fB--usepolicies\fP \fILV1\fP
\fBlvextend\fP \fB--usepolicies\fP \fILV\fP\fI_snapshot_thinpool\fP
.br
.RS 4
.ad l
[ \fB-r\fP|\fB--resizefs\fP ]
.ad b
.br
[ COMMON_OPTIONS ]
.ad b
.RE
.br
.RS 4
[ \fIPV\fP ... ]
.RE
.P
.RS 4
LV1 types: snapshot thinpool
.RE
.P
\(em
.P
-
Common options for command:
.
.RS 4
.ad l
[ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP ]
.ad b
.br
.ad l
[ \fB-f\fP|\fB--force\fP ]
.ad b
.br
.ad l
[ \fB-m\fP|\fB--mirrors\fP \fINumber\fP ]
.ad b
.br
.ad l
[ \fB-n\fP|\fB--nofsck\fP ]
.ad b
.br
[ \fB--alloc\fP \c
.nh
\%\fBcontiguous\fP|\:\fBcling\fP|\:\fBcling_by_tags\fP|\:\fBnormal\fP|\:\fBanywhere\fP|\:\fBinherit\fP
.hy
]
.ad l
[ \fB--alloc\fP \fBcontiguous\fP|\fBcling\fP|\fBcling_by_tags\fP|\fBnormal\fP|\fBanywhere\fP|\fBinherit\fP ]
.ad b
.br
.ad l
[ \fB--nosync\fP ]
.ad b
.br
.ad l
[ \fB--noudevsync\fP ]
.ad b
.br
.ad l
[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP ]
.ad b
.br
[ \fB--type\fP \c
.nh
\%\fBlinear\fP|\:\fBstriped\fP|\:\fBsnapshot\fP|\:\fBraid\fP|\:\fBmirror\fP|\:\fBthin\fP|\:\fBthin-pool\fP|\:\fBvdo\fP|\:\fBvdo-pool\fP|\:\fBcache\fP|\:\fBcache-pool\fP|\:\fBwritecache\fP
.hy
]
.ad l
[ \fB--type\fP \fBlinear\fP|\fBstriped\fP|\fBsnapshot\fP|\fBraid\fP|\fBmirror\fP|\fBthin\fP|\fBthin-pool\fP|\fBvdo\fP|\fBvdo-pool\fP|\fBcache\fP|\fBcache-pool\fP|\fBwritecache\fP ]
.ad b
.RE
.P
Common options for lvm:
.
.RS 4
.ad l
[ \fB-d\fP|\fB--debug\fP ]
.ad b
.br
.ad l
[ \fB-h\fP|\fB--help\fP ]
.ad b
.br
.ad l
[ \fB-q\fP|\fB--quiet\fP ]
.ad b
.br
.ad l
[ \fB-t\fP|\fB--test\fP ]
.ad b
.br
.ad l
[ \fB-v\fP|\fB--verbose\fP ]
.ad b
.br
.ad l
[ \fB-y\fP|\fB--yes\fP ]
.ad b
.br
.ad l
[ \fB--commandprofile\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--config\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--devices\fP \fIPV\fP ]
.ad b
.br
.ad l
[ \fB--devicesfile\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
.ad l
[ \fB--lockopt\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--longhelp\fP ]
.ad b
.br
.ad l
[ \fB--nolocking\fP ]
.ad b
.br
.ad l
[ \fB--profile\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--version\fP ]
.ad b
.RE
.
.SH OPTIONS
.
.
.HP
.ad l
\fB--alloc\fP \c
.nh
\%\fBcontiguous\fP|\:\fBcling\fP|\:\fBcling_by_tags\fP|\:\fBnormal\fP|\:\fBanywhere\fP|\:\fBinherit\fP
.hy
.ad b
\fB--alloc\fP \fBcontiguous\fP|\fBcling\fP|\fBcling_by_tags\fP|\fBnormal\fP|\fBanywhere\fP|\fBinherit\fP
.br
Determines the allocation policy when a command needs to allocate
Physical Extents (PEs) from the VG. Each VG and LV has an allocation policy
@@ -290,56 +376,64 @@ e.g. by placing two stripes on the same PV.
Optional positional PV args on the command line can also be used to limit
which PVs the command will use for allocation.
See \fBlvm\fP(8) for more information about allocation.
.
.ad b
.HP
.ad l
\fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
.br
Specifies if metadata should be backed up automatically after a change.
Enabling this is strongly advised! See \fBvgcfgbackup\fP(8) for more information.
.
.ad b
.HP
.ad l
\fB--commandprofile\fP \fIString\fP
.br
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.ad b
.HP
.ad l
\fB--config\fP \fIString\fP
.br
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
Config settings for the command. These override lvm.conf settings.
The String arg uses the same format as lvm.conf,
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.ad b
.HP
.ad l
\fB-d\fP|\fB--debug\fP ...
.br
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.ad b
.HP
.ad l
\fB--devices\fP \fIPV\fP
.br
Devices that the command can use. This option can be repeated
or accepts a comma separated list of devices. This overrides
the devices file.
.
.ad b
.HP
.ad l
\fB--devicesfile\fP \fIString\fP
.br
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
The file must exist in /etc/lvm/devices/ and is managed
with the lvmdevices(8) command.
This overrides the lvm.conf devices/devicesfile and
devices/use_devicesfile settings.
.ad b
.HP
.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.ad b
.HP
.ad l
\fB-l\fP|\fB--extents\fP [\fB+\fP]\fINumber\fP[PERCENT]
.br
Specifies the new size of the LV in logical extents.
@@ -360,47 +454,55 @@ extents in the new LV is not determined until the command has completed.
When the plus \fB+\fP or minus \fB-\fP prefix is used,
the value is not an absolute size, but is relative and added or subtracted
from the current size.
.
.ad b
.HP
.ad l
\fB-f\fP|\fB--force\fP ...
.br
Override various checks, confirmations and protections.
Use with extreme caution.
.
.ad b
.HP
.ad l
\fB-h\fP|\fB--help\fP
.br
Display help text.
.
.ad b
.HP
.ad l
\fB--lockopt\fP \fIString\fP
.br
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.ad b
.HP
.ad l
\fB--longhelp\fP
.br
Display long help text.
.
.ad b
.HP
.ad l
\fB-m\fP|\fB--mirrors\fP \fINumber\fP
.br
Not used.
.
.ad b
.HP
.ad l
\fB-n\fP|\fB--nofsck\fP
.br
Do not perform fsck before resizing filesystem when filesystem
requires it. You may need to use --force to proceed with
this option.
.
.ad b
.HP
.ad l
\fB--nolocking\fP
.br
Disable locking.
.
.ad b
.HP
.ad l
\fB--nosync\fP
.br
Causes the creation of mirror, raid1, raid4, raid5 and raid10 to skip the
@@ -415,50 +517,57 @@ This option is not valid for raid6, because raid6 relies on proper parity
to reconstruct proper user date in case of device failures.
raid0 and raid0_meta do not provide any data copies or parity support
and thus do not support initial synchronization.
.
.ad b
.HP
.ad l
\fB--noudevsync\fP
.br
Disables udev synchronisation. The process will not wait for notification
from udev. It will continue irrespective of any possible udev processing
in the background. Only use this if udev is not running or has rules that
ignore the devices LVM creates.
.
.ad b
.HP
.ad l
\fB--poolmetadatasize\fP [\fB+\fP]\fISize\fP[m|UNIT]
.br
Specifies the new size of the pool metadata LV.
The plus prefix \fB+\fP can be used, in which case
the value is added to the current size.
.
.ad b
.HP
.ad l
\fB--profile\fP \fIString\fP
.br
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.ad b
.HP
.ad l
\fB-q\fP|\fB--quiet\fP ...
.br
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.ad b
.HP
.ad l
\fB--reportformat\fP \fBbasic\fP|\fBjson\fP
.br
Overrides current output format for reports which is defined globally by
the report/output_format setting in \fBlvm.conf\fP(5).
the report/output_format setting in lvm.conf.
\fBbasic\fP is the original format with columns and rows.
If there is more than one report per command, each report is prefixed
with the report name for identification. \fBjson\fP produces report
output in JSON format. See \fBlvmreport\fP(7) for more information.
.
.ad b
.HP
.ad l
\fB-r\fP|\fB--resizefs\fP
.br
Resize underlying filesystem together with the LV using fsadm(8).
.
.ad b
.HP
.ad l
\fB-L\fP|\fB--size\fP [\fB+\fP]\fISize\fP[m|UNIT]
.br
Specifies the new size of the LV.
@@ -468,8 +577,9 @@ greater when redundant data is needed for RAID levels.
When the plus \fB+\fP or minus \fB-\fP prefix is used,
the value is not an absolute size, but is relative and added or subtracted
from the current size.
.
.ad b
.HP
.ad l
\fB-i\fP|\fB--stripes\fP \fINumber\fP
.br
Specifies the number of stripes in a striped LV. This is the number of
@@ -483,15 +593,17 @@ the RAID type (raid0: 64, raid10: 32, raid4/5: 63, raid6: 62), and
when unspecified, the default depends on the RAID type
(raid0: 2, raid10: 2, raid4/5: 3, raid6: 5.)
To stripe a new raid LV across all PVs by default,
see \fBlvm.conf\fP(5) \fBallocation/raid_stripe_all_devices\fP.
.
see lvm.conf allocation/raid_stripe_all_devices.
.ad b
.HP
.ad l
\fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT]
.br
The amount of data that is written to one device before
moving to the next in a striped LV.
.
.ad b
.HP
.ad l
\fB-t\fP|\fB--test\fP
.br
Run in test mode. Commands will not update metadata.
@@ -499,14 +611,10 @@ This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.ad b
.HP
.ad l
\fB--type\fP \c
.nh
\%\fBlinear\fP|\:\fBstriped\fP|\:\fBsnapshot\fP|\:\fBraid\fP|\:\fBmirror\fP|\:\fBthin\fP|\:\fBthin-pool\fP|\:\fBvdo\fP|\:\fBvdo-pool\fP|\:\fBcache\fP|\:\fBcache-pool\fP|\:\fBwritecache\fP
.hy
.ad b
\fB--type\fP \fBlinear\fP|\fBstriped\fP|\fBsnapshot\fP|\fBraid\fP|\fBmirror\fP|\fBthin\fP|\fBthin-pool\fP|\fBvdo\fP|\fBvdo-pool\fP|\fBcache\fP|\fBcache-pool\fP|\fBwritecache\fP
.br
The LV type, also known as "segment type" or "segtype".
See usage descriptions for the specific ways to use these types.
@@ -519,41 +627,46 @@ Several commands omit an explicit type option because the type
is inferred from other options or shortcuts
(e.g. --stripes, --mirrors, --snapshot, --virtualsize, --thin, --cache, --vdo).
Use inferred types with care because it can lead to unexpected results.
.
.ad b
.HP
.ad l
\fB--usepolicies\fP
.br
Perform an operation according to the policy configured in \fBlvm.conf\fP(5)
Perform an operation according to the policy configured in lvm.conf
or a profile.
.
.ad b
.HP
.ad l
\fB-v\fP|\fB--verbose\fP ...
.br
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.ad b
.HP
.ad l
\fB--version\fP
.br
Display version information.
.
.ad b
.HP
.ad l
\fB-y\fP|\fB--yes\fP
.br
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
.
.ad b
.SH VARIABLES
.
.TP
.I LV
.HP
\fILV\fP
.br
Logical Volume name. See \fBlvm\fP(8) for valid names.
An LV positional arg generally includes the VG name and LV name, e.g. VG/LV.
LV1 indicates the LV must have a specific type, where the
accepted LV types are listed. (raid represents raid<N> type).
.TP
.I PV
LV followed by _<type> indicates that an LV of the
given type is required. (raid represents raid<N> type)
.HP
\fIPV\fP
.br
Physical Volume name, a device path under /dev.
For commands managing physical extents, a PV positional arg
generally accepts a suffix indicating a range (or multiple ranges)
@@ -561,36 +674,104 @@ of physical extents (PEs). When the first PE is omitted, it defaults
to the start of the device, and when the last PE is omitted it defaults to end.
Start and end range (inclusive): \fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]...
Start and length range (counting from 0): \fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]...
.TP
.I String
.HP
\fIString\fP
.br
See the option description for information about the string content.
.TP
.IR Size [UNIT]
.HP
\fISize\fP[UNIT]
.br
Size is an input number that accepts an optional unit.
Input units are always treated as base two values, regardless of
capitalization, e.g. 'k' and 'K' both refer to 1024.
The default input unit is specified by letter, followed by |UNIT.
UNIT represents other possible input units:
.BR b | B
is bytes,
.BR s | S
is sectors of 512 bytes,
.BR k | K
is KiB,
.BR m | M
is MiB,
.BR g | G
is GiB,
.BR t | T
is TiB,
.BR p | P
is PiB,
.BR e | E
is EiB.
UNIT represents other possible input units: \fBbBsSkKmMgGtTpPeE\fP.
b|B is bytes, s|S is sectors of 512 bytes, k|K is KiB,
m|M is MiB, g|G is GiB, t|T is TiB, p|P is PiB, e|E is EiB.
(This should not be confused with the output control --units, where
capital letters mean multiple of 1000.)
.
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
.SH EXAMPLES
Extend the size of an LV by 54MiB, using a specific PV.
.br
.B lvextend -L +54 vg01/lvol10 /dev/sdk3
Extend the size of an LV by the amount of free
space on PV /dev/sdk3. This is equivalent to specifying
"-l +100%PVS" on the command line.
.br
.B lvextend vg01/lvol01 /dev/sdk3
Extend an LV by 16MiB using specific physical extents.
.br
.B lvextend -L+16m vg01/lvol01 /dev/sda:8-9 /dev/sdb:8-9
.SH SEE ALSO
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
.BR pvcreate (8)
.BR pvdisplay (8)
.BR pvmove (8)
.BR pvremove (8)
.BR pvresize (8)
.BR pvs (8)
.BR pvscan (8)
.BR vgcfgbackup (8)
.BR vgcfgrestore (8)
.BR vgchange (8)
.BR vgck (8)
.BR vgcreate (8)
.BR vgconvert (8)
.BR vgdisplay (8)
.BR vgexport (8)
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
.BR vgremove (8)
.BR vgrename (8)
.BR vgs (8)
.BR vgscan (8)
.BR vgsplit (8)
.BR lvcreate (8)
.BR lvchange (8)
.BR lvconvert (8)
.BR lvdisplay (8)
.BR lvextend (8)
.BR lvreduce (8)
.BR lvremove (8)
.BR lvrename (8)
.BR lvresize (8)
.BR lvs (8)
.BR lvscan (8)
.BR lvm-fullreport (8)
.BR lvm-lvpoll (8)
.BR lvm2-activation-generator (8)
.BR blkdeactivate (8)
.BR lvmdump (8)
.BR dmeventd (8)
.BR lvmpolld (8)
.BR lvmlockd (8)
.BR lvmlockctl (8)
.BR cmirrord (8)
.BR lvmdbusd (8)
.BR lvmsystemid (7)
.BR lvmreport (7)
.BR lvmraid (7)
.BR lvmthin (7)
.BR lvmcache (7)

View File

@@ -1,251 +1,329 @@
.TH LVM FULLREPORT 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.SH NAME
.
lvm fullreport \(em Display full report
lvm fullreport - Display full report
.
.SH SYNOPSIS
.
\fBlvm fullreport\fP
.br
[ \fIoption_args\fP ]
.br
[ \fIposition_args\fP ]
.br
.
.SH DESCRIPTION
.
lvm fullreport produces formatted output about PVs, PV segments, VGs, LVs
and LV segments. The information is all gathered together for each VG
(under a per-VG lock) so it is consistent. Information gathered from
separate calls to \fBvgs\fP, \fBpvs\fP, and \fBlvs\fP can be inconsistent
if information changes between commands.
.
.SH USAGE
.
\fBlvm fullreport\fP
.br
.RS 4
.ad l
[ \fB-a\fP|\fB--all\fP ]
.ad b
.br
.ad l
[ \fB-o\fP|\fB--options\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB-S\fP|\fB--select\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB-O\fP|\fB--sort\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--aligned\fP ]
.ad b
.br
.ad l
[ \fB--binary\fP ]
.ad b
.br
.ad l
[ \fB--configreport\fP \fBlog\fP|\fBvg\fP|\fBlv\fP|\fBpv\fP|\fBpvseg\fP|\fBseg\fP ]
.ad b
.br
.ad l
[ \fB--foreign\fP ]
.ad b
.br
.ad l
[ \fB--ignorelockingfailure\fP ]
.ad b
.br
.ad l
[ \fB--logonly\fP ]
.ad b
.br
.ad l
[ \fB--nameprefixes\fP ]
.ad b
.br
.ad l
[ \fB--noheadings\fP ]
.ad b
.br
.ad l
[ \fB--nosuffix\fP ]
.ad b
.br
.ad l
[ \fB--readonly\fP ]
.ad b
.br
.ad l
[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP ]
.ad b
.br
.ad l
[ \fB--rows\fP ]
.ad b
.br
.ad l
[ \fB--separator\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--shared\fP ]
.ad b
.br
.ad l
[ \fB--unbuffered\fP ]
.ad b
.br
[ \fB--units\fP \c
.nh
\%[\fINumber\fP]\fBr\fP|\:\fBR\fP|\:\fBh\fP|\:\fBH\fP|\:\fBb\fP|\:\fBB\fP|\:\fBs\fP|\:\fBS\fP|\:\fBk\fP|\:\fBK\fP|\:\fBm\fP|\:\fBM\fP|\:\fBg\fP|\:\fBG\fP|\:\fBt\fP|\:\fBT\fP|\:\fBp\fP|\:\fBP\fP|\:\fBe\fP|\:\fBE\fP
.hy
]
.ad l
[ \fB--units\fP \fBr\fP|\fBR\fP|\fBh\fP|\fBH\fP|\fBb\fP|\fBB\fP|\fBs\fP|\fBS\fP|\fBk\fP|\fBK\fP|\fBm\fP|\fBM\fP|\fBg\fP|\fBG\fP|\fBt\fP|\fBT\fP|\fBp\fP|\fBP\fP|\fBe\fP|\fBE\fP ]
.ad b
.br
.ad l
[ \fB--unquoted\fP ]
.ad b
.br
[ COMMON_OPTIONS ]
.ad b
.RE
.br
.RS 4
[ \fIVG\fP ... ]
.RE
.P
Common options for lvm:
.
.RS 4
.ad l
[ \fB-d\fP|\fB--debug\fP ]
.ad b
.br
.ad l
[ \fB-h\fP|\fB--help\fP ]
.ad b
.br
.ad l
[ \fB-q\fP|\fB--quiet\fP ]
.ad b
.br
.ad l
[ \fB-t\fP|\fB--test\fP ]
.ad b
.br
.ad l
[ \fB-v\fP|\fB--verbose\fP ]
.ad b
.br
.ad l
[ \fB-y\fP|\fB--yes\fP ]
.ad b
.br
.ad l
[ \fB--commandprofile\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--config\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--devices\fP \fIPV\fP ]
.ad b
.br
.ad l
[ \fB--devicesfile\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
.ad l
[ \fB--lockopt\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--longhelp\fP ]
.ad b
.br
.ad l
[ \fB--nolocking\fP ]
.ad b
.br
.ad l
[ \fB--profile\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--version\fP ]
.ad b
.RE
.
.SH OPTIONS
.
.
.HP
.ad l
\fB--aligned\fP
.br
Use with --separator to align the output columns
.
.ad b
.HP
.ad l
\fB-a\fP|\fB--all\fP
.br
.
.ad b
.HP
.ad l
\fB--binary\fP
.br
Use binary values "0" or "1" instead of descriptive literal values
for columns that have exactly two valid values to report (not counting
the "unknown" value which denotes that the value could not be determined).
.
.ad b
.HP
.ad l
\fB--commandprofile\fP \fIString\fP
.br
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.ad b
.HP
.ad l
\fB--config\fP \fIString\fP
.br
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
Config settings for the command. These override lvm.conf settings.
The String arg uses the same format as lvm.conf,
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.ad b
.HP
.ad l
\fB--configreport\fP \fBlog\fP|\fBvg\fP|\fBlv\fP|\fBpv\fP|\fBpvseg\fP|\fBseg\fP
.br
See \fBlvmreport\fP(7).
.
.ad b
.HP
.ad l
\fB-d\fP|\fB--debug\fP ...
.br
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.ad b
.HP
.ad l
\fB--devices\fP \fIPV\fP
.br
Devices that the command can use. This option can be repeated
or accepts a comma separated list of devices. This overrides
the devices file.
.
.ad b
.HP
.ad l
\fB--devicesfile\fP \fIString\fP
.br
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
The file must exist in /etc/lvm/devices/ and is managed
with the lvmdevices(8) command.
This overrides the lvm.conf devices/devicesfile and
devices/use_devicesfile settings.
.ad b
.HP
.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.ad b
.HP
.ad l
\fB--foreign\fP
.br
Report/display foreign VGs that would otherwise be skipped.
See \fBlvmsystemid\fP(7) for more information about foreign VGs.
.
.ad b
.HP
.ad l
\fB-h\fP|\fB--help\fP
.br
Display help text.
.
.ad b
.HP
.ad l
\fB--ignorelockingfailure\fP
.br
Allows a command to continue with read-only metadata
operations after locking failures.
.
.ad b
.HP
.ad l
\fB--lockopt\fP \fIString\fP
.br
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.ad b
.HP
.ad l
\fB--logonly\fP
.br
Suppress command report and display only log report.
.
.ad b
.HP
.ad l
\fB--longhelp\fP
.br
Display long help text.
.
.ad b
.HP
.ad l
\fB--nameprefixes\fP
.br
Add an "LVM2_" prefix plus the field name to the output. Useful
with --noheadings to produce a list of field=value pairs that can
be used to set environment variables (for example, in udev rules).
.
.ad b
.HP
.ad l
\fB--noheadings\fP
.br
Suppress the headings line that is normally the first line of output.
Useful if grepping the output.
.
.ad b
.HP
.ad l
\fB--nolocking\fP
.br
Disable locking.
.
.ad b
.HP
.ad l
\fB--nosuffix\fP
.br
Suppress the suffix on output sizes. Use with --units
(except h and H) if processing the output.
.
.ad b
.HP
.ad l
\fB-o\fP|\fB--options\fP \fIString\fP
.br
Comma-separated, ordered list of fields to display in columns.
String arg syntax is: [\fB+\fP|\fB-\fP|\fB#\fP]\fIField1\fP[\fB,\fP\fIField2\fP ...]
String arg syntax is: [+|-|#]Field1[,Field2 ...]
The prefix \fB+\fP will append the specified fields to the default fields,
\fB-\fP will remove the specified fields from the default fields, and
\fB#\fP will compact specified fields (removing them when empty for all rows.)
@@ -259,22 +337,25 @@ Use field name \fBlv_all\fP to view all LV fields,
\fBpvseg_all\fP all PV segment fields,
\fBseg_all\fP all LV segment fields, and
\fBpvseg_all\fP all PV segment columns.
See the \fBlvm.conf\fP(5) report section for more config options.
See the lvm.conf report section for more config options.
See \fBlvmreport\fP(7) for more information about reporting.
.
.ad b
.HP
.ad l
\fB--profile\fP \fIString\fP
.br
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.ad b
.HP
.ad l
\fB-q\fP|\fB--quiet\fP ...
.br
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.ad b
.HP
.ad l
\fB--readonly\fP
.br
Run the command in a special read-only mode which will read on-disk
@@ -283,23 +364,26 @@ inside metadata used by a virtual machine image while the virtual
machine is running. No attempt will be made to communicate with the
device-mapper kernel driver, so this option is unable to report whether
or not LVs are actually in use.
.
.ad b
.HP
.ad l
\fB--reportformat\fP \fBbasic\fP|\fBjson\fP
.br
Overrides current output format for reports which is defined globally by
the report/output_format setting in \fBlvm.conf\fP(5).
the report/output_format setting in lvm.conf.
\fBbasic\fP is the original format with columns and rows.
If there is more than one report per command, each report is prefixed
with the report name for identification. \fBjson\fP produces report
output in JSON format. See \fBlvmreport\fP(7) for more information.
.
.ad b
.HP
.ad l
\fB--rows\fP
.br
Output columns as rows.
.
.ad b
.HP
.ad l
\fB-S\fP|\fB--select\fP \fIString\fP
.br
Select objects for processing and reporting based on specified criteria.
@@ -310,26 +394,30 @@ Rows can be displayed with an additional "selected" field (-o selected)
showing 1 if the row matches the selection and 0 otherwise.
For non-reporting commands which process LVM entities, the selection is
used to choose items to process.
.
.ad b
.HP
.ad l
\fB--separator\fP \fIString\fP
.br
String to use to separate each column. Useful if grepping the output.
.
.ad b
.HP
.ad l
\fB--shared\fP
.br
Report/display shared VGs that would otherwise be skipped when
lvmlockd is not being used on the host.
See \fBlvmlockd\fP(8) for more information about shared VGs.
.
.ad b
.HP
.ad l
\fB-O\fP|\fB--sort\fP \fIString\fP
.br
Comma-separated ordered list of columns to sort by. Replaces the default
selection. Precede any column with \fB-\fP for a reverse sort on that column.
.
.ad b
.HP
.ad l
\fB-t\fP|\fB--test\fP
.br
Run in test mode. Commands will not update metadata.
@@ -337,19 +425,16 @@ This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.ad b
.HP
.ad l
\fB--unbuffered\fP
.br
Produce output immediately without sorting or aligning the columns properly.
.
.ad b
.HP
.ad l
\fB--units\fP \c
.nh
\%[\fINumber\fP]\fBr\fP|\:\fBR\fP|\:\fBh\fP|\:\fBH\fP|\:\fBb\fP|\:\fBB\fP|\:\fBs\fP|\:\fBS\fP|\:\fBk\fP|\:\fBK\fP|\:\fBm\fP|\:\fBM\fP|\:\fBg\fP|\:\fBG\fP|\:\fBt\fP|\:\fBT\fP|\:\fBp\fP|\:\fBP\fP|\:\fBe\fP|\:\fBE\fP
.hy
.ad b
\fB--units\fP \fBr\fP|\fBR\fP|\fBh\fP|\fBH\fP|\fBb\fP|\fBB\fP|\fBs\fP|\fBS\fP|\fBk\fP|\fBK\fP|\fBm\fP|\fBM\fP|\fBg\fP|\fBG\fP|\fBt\fP|\fBT\fP|\fBp\fP|\fBP\fP|\fBe\fP|\fBE\fP
.br
All sizes are output in these units:
human-(r)eadable with '<' rounding indicator,
@@ -357,66 +442,124 @@ human-(r)eadable with '<' rounding indicator,
(g)igabytes, (t)erabytes, (p)etabytes, (e)xabytes.
Capitalise to use multiples of 1000 (S.I.) instead of 1024.
Custom units can be specified, e.g. --units 3M.
.
.ad b
.HP
.ad l
\fB--unquoted\fP
.br
When used with --nameprefixes, output values in the field=value
pairs are not quoted.
.
.ad b
.HP
.ad l
\fB-v\fP|\fB--verbose\fP ...
.br
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.ad b
.HP
.ad l
\fB--version\fP
.br
Display version information.
.
.ad b
.HP
.ad l
\fB-y\fP|\fB--yes\fP
.br
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
.
.ad b
.SH VARIABLES
.
.TP
.I VG
.HP
\fIVG\fP
.br
Volume Group name. See \fBlvm\fP(8) for valid names.
.TP
.I String
.HP
\fIString\fP
.br
See the option description for information about the string content.
.TP
.IR Size [UNIT]
.HP
\fISize\fP[UNIT]
.br
Size is an input number that accepts an optional unit.
Input units are always treated as base two values, regardless of
capitalization, e.g. 'k' and 'K' both refer to 1024.
The default input unit is specified by letter, followed by |UNIT.
UNIT represents other possible input units:
.BR b | B
is bytes,
.BR s | S
is sectors of 512 bytes,
.BR k | K
is KiB,
.BR m | M
is MiB,
.BR g | G
is GiB,
.BR t | T
is TiB,
.BR p | P
is PiB,
.BR e | E
is EiB.
UNIT represents other possible input units: \fBbBsSkKmMgGtTpPeE\fP.
b|B is bytes, s|S is sectors of 512 bytes, k|K is KiB,
m|M is MiB, g|G is GiB, t|T is TiB, p|P is PiB, e|E is EiB.
(This should not be confused with the output control --units, where
capital letters mean multiple of 1000.)
.
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
.SH SEE ALSO
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
.BR pvcreate (8)
.BR pvdisplay (8)
.BR pvmove (8)
.BR pvremove (8)
.BR pvresize (8)
.BR pvs (8)
.BR pvscan (8)
.BR vgcfgbackup (8)
.BR vgcfgrestore (8)
.BR vgchange (8)
.BR vgck (8)
.BR vgcreate (8)
.BR vgconvert (8)
.BR vgdisplay (8)
.BR vgexport (8)
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
.BR vgremove (8)
.BR vgrename (8)
.BR vgs (8)
.BR vgscan (8)
.BR vgsplit (8)
.BR lvcreate (8)
.BR lvchange (8)
.BR lvconvert (8)
.BR lvdisplay (8)
.BR lvextend (8)
.BR lvreduce (8)
.BR lvremove (8)
.BR lvrename (8)
.BR lvresize (8)
.BR lvs (8)
.BR lvscan (8)
.BR lvm-fullreport (8)
.BR lvm-lvpoll (8)
.BR lvm2-activation-generator (8)
.BR blkdeactivate (8)
.BR lvmdump (8)
.BR dmeventd (8)
.BR lvmpolld (8)
.BR lvmlockd (8)
.BR lvmlockctl (8)
.BR cmirrord (8)
.BR lvmdbusd (8)
.BR lvmsystemid (7)
.BR lvmreport (7)
.BR lvmraid (7)
.BR lvmthin (7)
.BR lvmcache (7)

View File

@@ -1,33 +1,31 @@
.
.SH NOTES
.
To find the name of the pvmove LV that was created by an original
\fBpvmove /dev/name\fP command, use the command:
.br
\fBlvs -a -S move_pv=/dev/name\fP.
.
.SH EXAMPLES
.
Continue polling a pvmove operation.
.br
.B lvm lvpoll --polloperation pvmove vg00/pvmove0
.P
Abort a pvmove operation.
.br
.B lvm lvpoll --polloperation pvmove --abort vg00/pvmove0
.P
Continue polling a mirror conversion.
.br
.B lvm lvpoll --polloperation convert vg00/lvmirror
.P
Continue mirror repair.
.br
.B lvm lvpoll --polloperation convert vg/damaged_mirror --handlemissingpvs
.P
Continue snapshot merge.
.br
.B lvm lvpoll --polloperation merge vg/snapshot_old
.P
Continue thin snapshot merge.
.br
.B lvm lvpoll --polloperation merge_thin vg/thin_snapshot

View File

@@ -1,185 +1,230 @@
.TH LVM LVPOLL 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.SH NAME
.
lvm lvpoll \(em Continue already initiated poll operation on a logical volume
lvm lvpoll - Continue already initiated poll operation on a logical volume
.
.SH SYNOPSIS
.
\fBlvm lvpoll\fP \fIoption_args\fP \fIposition_args\fP
.br
[ \fIoption_args\fP ]
.br
.
.SH DESCRIPTION
.
lvm lvpoll is an internal command used by \fBlvmpolld\fP(8) to monitor and
complete \fBlvconvert\fP(8) and \fBpvmove\fP(8) operations. lvpoll itself
does not initiate these operations and should not normally need to be run
directly.
.
.SH USAGE
.
\fBlvm lvpoll\fP \fB--polloperation\fP \fBpvmove\fP|\fBconvert\fP|\fBmerge\fP|\fBmerge_thin\fP \fILV\fP ...
.br
.RS 4
.ad l
[ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP ]
.ad b
.br
.ad l
[ \fB-i\fP|\fB--interval\fP \fINumber\fP ]
.ad b
.br
.ad l
[ \fB--abort\fP ]
.ad b
.br
.ad l
[ \fB--handlemissingpvs\fP ]
.ad b
.br
[ COMMON_OPTIONS ]
.ad b
.RE
.P
.br
Common options for lvm:
.
.RS 4
.ad l
[ \fB-d\fP|\fB--debug\fP ]
.ad b
.br
.ad l
[ \fB-h\fP|\fB--help\fP ]
.ad b
.br
.ad l
[ \fB-q\fP|\fB--quiet\fP ]
.ad b
.br
.ad l
[ \fB-t\fP|\fB--test\fP ]
.ad b
.br
.ad l
[ \fB-v\fP|\fB--verbose\fP ]
.ad b
.br
.ad l
[ \fB-y\fP|\fB--yes\fP ]
.ad b
.br
.ad l
[ \fB--commandprofile\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--config\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--devices\fP \fIPV\fP ]
.ad b
.br
.ad l
[ \fB--devicesfile\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
.ad l
[ \fB--lockopt\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--longhelp\fP ]
.ad b
.br
.ad l
[ \fB--nolocking\fP ]
.ad b
.br
.ad l
[ \fB--profile\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--version\fP ]
.ad b
.RE
.
.SH OPTIONS
.
.
.HP
.ad l
\fB--abort\fP
.br
Stop processing a poll operation in lvmpolld.
.
.ad b
.HP
.ad l
\fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
.br
Specifies if metadata should be backed up automatically after a change.
Enabling this is strongly advised! See \fBvgcfgbackup\fP(8) for more information.
.
.ad b
.HP
.ad l
\fB--commandprofile\fP \fIString\fP
.br
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.ad b
.HP
.ad l
\fB--config\fP \fIString\fP
.br
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
Config settings for the command. These override lvm.conf settings.
The String arg uses the same format as lvm.conf,
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.ad b
.HP
.ad l
\fB-d\fP|\fB--debug\fP ...
.br
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.ad b
.HP
.ad l
\fB--devices\fP \fIPV\fP
.br
Devices that the command can use. This option can be repeated
or accepts a comma separated list of devices. This overrides
the devices file.
.
.ad b
.HP
.ad l
\fB--devicesfile\fP \fIString\fP
.br
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
The file must exist in /etc/lvm/devices/ and is managed
with the lvmdevices(8) command.
This overrides the lvm.conf devices/devicesfile and
devices/use_devicesfile settings.
.ad b
.HP
.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.ad b
.HP
.ad l
\fB--handlemissingpvs\fP
.br
Allows a polling operation to continue when PVs are missing,
e.g. for repairs due to faulty devices.
.
.ad b
.HP
.ad l
\fB-h\fP|\fB--help\fP
.br
Display help text.
.
.ad b
.HP
.ad l
\fB-i\fP|\fB--interval\fP \fINumber\fP
.br
Report progress at regular intervals.
.
.ad b
.HP
.ad l
\fB--lockopt\fP \fIString\fP
.br
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.ad b
.HP
.ad l
\fB--longhelp\fP
.br
Display long help text.
.
.ad b
.HP
.ad l
\fB--nolocking\fP
.br
Disable locking.
.
.ad b
.HP
.ad l
\fB--polloperation\fP \fBpvmove\fP|\fBconvert\fP|\fBmerge\fP|\fBmerge_thin\fP
.br
The command to perform from lvmpolld.
.
.ad b
.HP
.ad l
\fB--profile\fP \fIString\fP
.br
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.ad b
.HP
.ad l
\fB-q\fP|\fB--quiet\fP ...
.br
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.ad b
.HP
.ad l
\fB-t\fP|\fB--test\fP
.br
Run in test mode. Commands will not update metadata.
@@ -187,61 +232,149 @@ This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.ad b
.HP
.ad l
\fB-v\fP|\fB--verbose\fP ...
.br
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.ad b
.HP
.ad l
\fB--version\fP
.br
Display version information.
.
.ad b
.HP
.ad l
\fB-y\fP|\fB--yes\fP
.br
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
.
.ad b
.SH VARIABLES
.
.TP
.I LV
.HP
\fILV\fP
.br
Logical Volume name. See \fBlvm\fP(8) for valid names.
An LV positional arg generally includes the VG name and LV name, e.g. VG/LV.
.TP
.I String
.HP
\fIString\fP
.br
See the option description for information about the string content.
.TP
.IR Size [UNIT]
.HP
\fISize\fP[UNIT]
.br
Size is an input number that accepts an optional unit.
Input units are always treated as base two values, regardless of
capitalization, e.g. 'k' and 'K' both refer to 1024.
The default input unit is specified by letter, followed by |UNIT.
UNIT represents other possible input units:
.BR b | B
is bytes,
.BR s | S
is sectors of 512 bytes,
.BR k | K
is KiB,
.BR m | M
is MiB,
.BR g | G
is GiB,
.BR t | T
is TiB,
.BR p | P
is PiB,
.BR e | E
is EiB.
UNIT represents other possible input units: \fBbBsSkKmMgGtTpPeE\fP.
b|B is bytes, s|S is sectors of 512 bytes, k|K is KiB,
m|M is MiB, g|G is GiB, t|T is TiB, p|P is PiB, e|E is EiB.
(This should not be confused with the output control --units, where
capital letters mean multiple of 1000.)
.
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
.SH NOTES
To find the name of the pvmove LV that was created by an original
\fBpvmove /dev/name\fP command, use the command:
.br
\fBlvs -a -S move_pv=/dev/name\fP.
.SH EXAMPLES
Continue polling a pvmove operation.
.br
.B lvm lvpoll --polloperation pvmove vg00/pvmove0
Abort a pvmove operation.
.br
.B lvm lvpoll --polloperation pvmove --abort vg00/pvmove0
Continue polling a mirror conversion.
.br
.B lvm lvpoll --polloperation convert vg00/lvmirror
Continue mirror repair.
.br
.B lvm lvpoll --polloperation convert vg/damaged_mirror --handlemissingpvs
Continue snapshot merge.
.br
.B lvm lvpoll --polloperation merge vg/snapshot_old
Continue thin snapshot merge.
.br
.B lvm lvpoll --polloperation merge_thin vg/thin_snapshot
.SH SEE ALSO
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
.BR pvcreate (8)
.BR pvdisplay (8)
.BR pvmove (8)
.BR pvremove (8)
.BR pvresize (8)
.BR pvs (8)
.BR pvscan (8)
.BR vgcfgbackup (8)
.BR vgcfgrestore (8)
.BR vgchange (8)
.BR vgck (8)
.BR vgcreate (8)
.BR vgconvert (8)
.BR vgdisplay (8)
.BR vgexport (8)
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
.BR vgremove (8)
.BR vgrename (8)
.BR vgs (8)
.BR vgscan (8)
.BR vgsplit (8)
.BR lvcreate (8)
.BR lvchange (8)
.BR lvconvert (8)
.BR lvdisplay (8)
.BR lvextend (8)
.BR lvreduce (8)
.BR lvremove (8)
.BR lvrename (8)
.BR lvresize (8)
.BR lvs (8)
.BR lvscan (8)
.BR lvm-fullreport (8)
.BR lvm-lvpoll (8)
.BR lvm2-activation-generator (8)
.BR blkdeactivate (8)
.BR lvmdump (8)
.BR dmeventd (8)
.BR lvmpolld (8)
.BR lvmlockd (8)
.BR lvmlockctl (8)
.BR cmirrord (8)
.BR lvmdbusd (8)
.BR lvmsystemid (7)
.BR lvmreport (7)
.BR lvmraid (7)
.BR lvmthin (7)
.BR lvmcache (7)

View File

@@ -11,6 +11,7 @@ lvm \(em LVM2 tools
.
.SH DESCRIPTION
.
The Logical Volume Manager (LVM) provides tools to create virtual block
devices from physical devices. Virtual devices may be easier to manage
than physical devices, and can have capabilities beyond what the physical
@@ -21,14 +22,15 @@ applications. Each block of data in an LV is stored on one or more PV in
the VG, according to algorithms implemented by Device Mapper (DM) in the
kernel.
.P
The lvm command, and other commands listed below, are the command-line
tools for LVM. A separate manual page describes each command in detail.
.P
If \fBlvm\fP is invoked with no arguments it presents a #DEFAULT_LIBLINE# prompt
(assuming it was compiled with #DEFAULT_LIBLINE# support).
If \fBlvm\fP is invoked with no arguments it presents a readline prompt
(assuming it was compiled with readline support).
LVM commands may be entered interactively at this prompt with
#DEFAULT_LIBLINE# facilities including history and command name and option
completion. Refer to \fB#DEFAULT_LIBLINE#\fP(3) for details.
readline facilities including history and command name and option
completion. Refer to \fBreadline\fP(3) for details.
.P
If \fBlvm\fP is invoked with argv[0] set to the name of a specific
LVM command (for example by using a hard or soft link) it acts as
@@ -38,7 +40,7 @@ On invocation, \fBlvm\fP requires that only the standard file descriptors
stdin, stdout and stderr are available. If others are found, they
get closed and messages are issued warning about the leak.
This warning can be suppressed by setting the environment variable
.BR LVM_SUPPRESS_FD_WARNINGS .
.B LVM_SUPPRESS_FD_WARNINGS\fP.
.P
Where commands take VG or LV names as arguments, the full path name is
optional. An LV called "lvol0" in a VG called "vg0" can be specified
@@ -65,7 +67,7 @@ The following commands are built into lvm without links
normally being created in the filesystem for them.
.sp
.PD 0
.TP 16
.TP 14
.B config
The same as \fBlvmconfig\fP(8) below.
.TP
@@ -110,7 +112,7 @@ Display version information.
The following commands implement the core LVM functionality.
.sp
.PD 0
.TP 16
.TP 14
.B pvchange
Change attributes of a Physical Volume.
.TP
@@ -258,7 +260,7 @@ The valid characters for VG and LV names are:
.BR a - z
.BR A - Z
.BR 0 - 9
.B + _ . -
.BR "+ _ . -"
.P
VG names cannot begin with a hyphen.
The name of a new LV also cannot begin with a hyphen. However, if the
@@ -274,31 +276,11 @@ argument.)
.P
There are also various reserved names that are used internally by lvm that can
not be used as LV or VG names. A VG cannot be called anything that exists in
\fI/dev/\fP at the time of creation, nor can it be called
.RB ' . '
or
.RB ' .. '.
An LV cannot be called
.RB ' . ',
.RB ' .. ',
.RB ' snapshot '
or
.RB ' pvmove '.
\fI/dev/\fP at the time of creation, nor can it be called '.' or '..'.
An LV cannot be called '.', '..', 'snapshot' or 'pvmove'.
The LV name may also not contain any of the following strings:
.RB ' _cdata ',
.RB ' _cmeta ',
.RB ' _corig ',
.RB ' _mimage ',
.RB ' _mlog ',
.RB ' _pmspare ',
.RB ' _rimage ',
.RB ' _rmeta ',
.RB ' _tdata ',
.RB ' _tmeta ',
.RB ' _vdata ',
.RB ' _vorigin '
or
.RB ' _wcorig '.
\fR'_cdata', '_cmeta', '_corig', '_mlog', '_mimage', '_pmspare',
\fR'_rimage', '_rmeta', '_tdata', '_tmeta', '_vorigin' or '_vdata'.
A directory bearing the name of each Volume Group is created under
\fI/dev\fP when any of its Logical Volumes are activated.
Each active Logical Volume is accessible from this directory as a symbolic
@@ -314,37 +296,39 @@ original VG, LV and internal layer names.
.
.SH UNIQUE NAMES
.
VG names should be unique. vgcreate will produce an error if the
specified VG name matches an existing VG name. However, there are cases
where different VGs with the same name can appear to LVM, e.g. after
moving disks or changing filters.
.P
When VGs with the same name exist, commands operating on all VGs will
include all of the VGs with the same name. If the ambiguous VG name is
specified on the command line, the command will produce an error. The
error states that multiple VGs exist with the specified name. To process
one of the VGs specifically, the --select option should be used with the
UUID of the intended VG: --select vg_uuid=<uuid>
.P
UUID of the intended VG: '--select vg_uuid=<uuid>'.
An exception is if all but one of the VGs with the shared name is foreign
(see
.BR lvmsystemid (7)).
.BR lvmsystemid (7).)
In this case, the one VG that is not foreign is assumed to be the intended
VG and is processed.
.P
LV names are unique within a VG. The name of an historical LV cannot be
reused until the historical LV has itself been removed or renamed.
.
.SH ALLOCATION
.
When an operation needs to allocate Physical Extents for one or more
Logical Volumes, the tools proceed as follows:
.P
First of all, they generate the complete set of unallocated Physical Extents
in the Volume Group. If any ranges of Physical Extents are supplied at
the end of the command line, only unallocated Physical Extents within
those ranges on the specified Physical Volumes are considered.
.P
Then they try each allocation policy in turn, starting with the strictest
policy (\fBcontiguous\fP) and ending with the allocation policy specified
using \fB--alloc\fP or set as the default for the particular Logical
@@ -353,14 +337,14 @@ lowest-numbered Logical Extent of the empty Logical Volume space that
needs to be filled, they allocate as much space as possible according to
the restrictions imposed by the policy. If more space is needed,
they move on to the next policy.
.P
The restrictions are as follows:
.P
\fBContiguous\fP requires that the physical location of any Logical
Extent that is not the first Logical Extent of a Logical Volume is
adjacent to the physical location of the Logical Extent immediately
preceding it.
.P
\fBCling\fP requires that the Physical Volume used for any Logical
Extent to be added to an existing Logical Volume is already in use by at
least one Logical Extent earlier in that Logical Volume. If the
@@ -369,31 +353,31 @@ Physical Volumes are considered to match if any of the listed tags is
present on both Physical Volumes. This allows groups of Physical
Volumes with similar properties (such as their physical location) to be
tagged and treated as equivalent for allocation purposes.
.P
When a Logical Volume is striped or mirrored, the above restrictions are
applied independently to each stripe or mirror image (leg) that needs
space.
.P
\fBNormal\fP will not choose a Physical Extent that shares the same Physical
Volume as a Logical Extent already allocated to a parallel Logical
Volume (i.e. a different stripe or mirror image/leg) at the same offset
within that parallel Logical Volume.
.P
When allocating a mirror log at the same time as Logical Volumes to hold
the mirror data, Normal will first try to select different Physical
Volumes for the log and the data. If that's not possible and the
.B allocation/mirror_logs_require_separate_pvs
configuration parameter is set to 0, it will then allow the log
to share Physical Volume(s) with part of the data.
.P
When allocating thin pool metadata, similar considerations to those of a
mirror log in the last paragraph apply based on the value of the
.B allocation/thin_pool_metadata_require_separate_pvs
configuration parameter.
.P
If you rely upon any layout behaviour beyond that documented here, be
aware that it might change in future versions of the code.
.P
For example, if you supply on the command line two empty Physical
Volumes that have an identical number of free Physical Extents available for
allocation, the current code considers using each of them in the order
@@ -403,7 +387,7 @@ for a particular Logical Volume, then you should build it up through a
sequence of \fBlvcreate\fP(8) and \fBlvconvert\fP(8) steps such that the
restrictions described above applied to each step leave the tools no
discretion over the layout.
.P
To view the way the allocation process currently works in any specific
case, read the debug logging output, for example by adding \fB-vvvv\fP to
a command.
@@ -429,7 +413,7 @@ Message text may also change.
.
.TP
.B HOME
Directory containing \fI.lvm_history\fP if the internal #DEFAULT_LIBLINE#
Directory containing \fI.lvm_history\fP if the internal readline
shell is invoked.
.TP
.B LVM_OUT_FD
@@ -513,72 +497,71 @@ Prepends source file name and code line number with libdm debugging.
.SH SEE ALSO
.
.nh
.ad l
.BR lvm (8),
.BR lvm.conf (5),
.BR lvmconfig (8),
.P
.BR pvchange (8),
.BR pvck (8),
.BR pvcreate (8),
.BR pvdisplay (8),
.BR pvmove (8),
.BR pvremove (8),
.BR pvresize (8),
.BR pvs (8),
.BR pvscan (8),
.P
.BR vgcfgbackup (8),
.BR vgcfgrestore (8),
.BR vgchange (8),
.BR vgck (8),
.BR vgcreate (8),
.BR vgconvert (8),
.BR vgdisplay (8),
.BR vgexport (8),
.BR vgextend (8),
.BR vgimport (8),
.BR vgimportclone (8),
.BR vgmerge (8),
.BR vgmknodes (8),
.BR vgreduce (8),
.BR vgremove (8),
.BR vgrename (8),
.BR vgs (8),
.BR vgscan (8),
.BR vgsplit (8),
.P
.BR lvcreate (8),
.BR lvchange (8),
.BR lvconvert (8),
.BR lvdisplay (8),
.BR lvextend (8),
.BR lvreduce (8),
.BR lvremove (8),
.BR lvrename (8),
.BR lvresize (8),
.BR lvs (8),
.BR lvscan (8),
.P
.BR lvm-fullreport (8),
.BR lvm-lvpoll (8),
.BR lvm2-activation-generator (8),
.BR blkdeactivate (8),
.BR lvmdump (8),
.P
.BR dmeventd (8),
.BR lvmpolld (8),
.BR lvmlockd (8),
.BR lvmlockctl (8),
.BR cmirrord (8),
.BR lvmdbusd (8),
.P
.BR lvmsystemid (7),
.BR lvmreport (7),
.BR lvmraid (7),
.BR lvmthin (7),
.BR lvmcache (7),
.P
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
.BR pvchange (8)
.BR pvck (8)
.BR pvcreate (8)
.BR pvdisplay (8)
.BR pvmove (8)
.BR pvremove (8)
.BR pvresize (8)
.BR pvs (8)
.BR pvscan (8)
.BR vgcfgbackup (8)
.BR vgcfgrestore (8)
.BR vgchange (8)
.BR vgck (8)
.BR vgcreate (8)
.BR vgconvert (8)
.BR vgdisplay (8)
.BR vgexport (8)
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
.BR vgremove (8)
.BR vgrename (8)
.BR vgs (8)
.BR vgscan (8)
.BR vgsplit (8)
.BR lvcreate (8)
.BR lvchange (8)
.BR lvconvert (8)
.BR lvdisplay (8)
.BR lvextend (8)
.BR lvreduce (8)
.BR lvremove (8)
.BR lvrename (8)
.BR lvresize (8)
.BR lvs (8)
.BR lvscan (8)
.BR lvm-fullreport (8)
.BR lvm-lvpoll (8)
.BR lvm2-activation-generator (8)
.BR blkdeactivate (8)
.BR lvmdump (8)
.BR dmeventd (8)
.BR lvmpolld (8)
.BR lvmlockd (8)
.BR lvmlockctl (8)
.BR cmirrord (8)
.BR lvmdbusd (8)
.BR lvmsystemid (7)
.BR lvmreport (7)
.BR lvmraid (7)
.BR lvmthin (7)
.BR lvmcache (7)
.BR dmsetup (8),
.BR dmstats (8),
.BR #DEFAULT_LIBLINE# (3)
.BR readline (3)

View File

@@ -1,35 +1,28 @@
.TH LVM.CONF 5 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.TH LVM.CONF 5 "LVM TOOLS #VERSION#" "Red Hat, Inc." \" -*- nroff -*-
.SH NAME
.
lvm.conf \(em Configuration file for LVM2
.
.SH SYNOPSIS
.
.I #DEFAULT_SYS_DIR#/lvm.conf
.
.B #DEFAULT_SYS_DIR#/lvm.conf
.SH DESCRIPTION
.
\fBlvm.conf\fP is loaded during the initialisation phase of
\fBlvm\fP(8). This file can in turn lead to other files
being loaded - settings read in later override earlier
settings. File timestamps are checked between commands and if
any have changed, all the files are reloaded.
.P
For a description of each \fBlvm.conf\fP(5) setting, run:
.P
For a description of each lvm.conf setting, run:
.B lvmconfig --typeconfig default --withcomments --withspaces
.P
The settings defined in lvm.conf can be overridden by any
of these extended configuration methods:
.
.TP
.B direct config override on command line
The \fB--config ConfigurationString\fP command line option takes the
ConfigurationString as direct string representation of the configuration
to override the existing configuration. The ConfigurationString is of
exactly the same format as used in any LVM configuration file.
.
.TP
.B profile config
.br
@@ -37,17 +30,17 @@ A profile is a set of selected customizable configuration settings
that are aimed to achieve a certain characteristics in various
environments or uses. It's used to override existing configuration.
Normally, the name of the profile should reflect that environment or use.
.P
There are two groups of profiles recognised: \fBcommand profiles\fP and
\fBmetadata profiles\fP.
.P
The \fBcommand profile\fP is used to override selected configuration
settings at global LVM command level - it is applied at the very beginning
of LVM command execution and it is used throughout the whole time of LVM
command execution. The command profile is applied by using the
\fB--commandprofile ProfileName\fP command line option that is recognised by
all LVM2 commands.
.P
The \fBmetadata profile\fP is used to override selected configuration
settings at Volume Group/Logical Volume level - it is applied independently
for each Volume Group/Logical Volume that is being processed. As such,
@@ -63,12 +56,12 @@ option during creation when using \fBvgcreate\fP or \fBlvcreate\fP command.
The \fBvgs\fP and \fBlvs\fP reporting commands provide \fB-o vg_profile\fP
and \fB-o lv_profile\fP output options to show the metadata profile
currently attached to a Volume Group or a Logical Volume.
.P
The set of options allowed for command profiles is mutually exclusive
when compared to the set of options allowed for metadata profiles. The
settings that belong to either of these two sets can't be mixed together
and LVM tools will reject such profiles.
.P
LVM itself provides a few predefined configuration profiles.
Users are allowed to add more profiles with different values if needed.
For this purpose, there's the \fBcommand_profile_template.profile\fP
@@ -81,36 +74,31 @@ or \fBlvmconfig --file <ProfileName.profile> --type profilable-metadata <section
can be used to generate a configuration with profilable settings in either
of the type for given section and save it to new ProfileName.profile
(if the section is not specified, all profilable settings are reported).
.P
The profiles are stored in \fI#DEFAULT_PROFILE_DIR#\fP directory by default.
The profiles are stored in #DEFAULT_PROFILE_DIR# directory by default.
This location can be changed by using the \fBconfig/profile_dir\fP setting.
Each profile configuration is stored in \fBProfileName.profile\fP file
in the profile directory. When referencing the profile, the \fB.profile\fP
suffix is left out.
.
.TP
.B tag config
.br
See \fBtags\fP configuration setting description below.
.P
.LP
When several configuration methods are used at the same time
and when LVM looks for the value of a particular setting, it traverses
this \fBconfig cascade\fP from left to right:
.P
\fBdirect config override on command line\fP \[->]
\fBcommand profile config\fP \[->]
\fBmetadata profile config\fP \[->]
\fBtag config\fP \[->]
\fBlvmlocal.conf\fP \[->]
\fBlvm.conf\fP
.P
\fBdirect config override on command line\fP -> \fBcommand profile config\fP -> \fBmetadata profile config\fP -> \fBtag config\fP -> \fBlvmlocal.conf\fB -> \fBlvm.conf\fP
No part of this cascade is compulsory. If there's no setting value found at
the end of the cascade, a default value is used for that setting.
Use \fBlvmconfig\fP to check what settings are in use and what
the default values are.
.
.SH SYNTAX
.
.LP
This section describes the configuration file syntax.
.LP
Whitespace is not significant unless it is within quotes.
@@ -121,12 +109,15 @@ They are treated as whitespace.
Here is an informal grammar:
.TP
.BR file " = " value *
.br
A configuration file consists of a set of values.
.TP
.BR value " = " section " | " assignment
.br
A value can either be a new section, or an assignment.
.TP
.BR section " = " identifier " '" { "' " value "* '" } '
.br
A section groups associated values together. If the same section is
encountered multiple times, the contents of all instances are concatenated
together in the order of appearance.
@@ -151,58 +142,60 @@ e.g. \fBlevel = 7\fP
.br
.TP
.BR array " = '" [ "' ( " type " '" , "')* " type " '" ] "' | '" [ "' '" ] '
.br
Inhomogeneous arrays are supported.
.br
Elements must be separated by commas.
.br
An empty array is acceptable.
.TP
.BR type " = " integer | float | string
.BR integer " = [" 0 - 9 "]*"
.BR type " = " integer " | " float " | " string
.BR integer " = [0-9]*"
.br
.BR float " = [" 0 - 9 "]*'" . "'[" 0 - 9 ]*
.BR float " = [0-9]*'" . '[0-9]*
.br
.BR string " = '" \(dq "' .* '" \(dq '
.B string \fR= '\fB"\fR'.*'\fB"\fR'
.IP
Strings with spaces must be enclosed in double quotes, single words that start
with a letter can be left unquoted.
.
.SH SETTINGS
.
The
.B lvmconfig
command prints the LVM configuration settings in various ways.
See the man page
.BR lvmconfig (8).
.P
Command to print a list of all possible config settings, with their
default values:
.br
.B lvmconfig --type default
.P
Command to print a list of all possible config settings, with their
default values, and a full description of each as a comment:
.br
.B lvmconfig --type default --withcomments
.P
Command to print a list of all possible config settings, with their
current values (configured, non-default values are shown):
.br
.B lvmconfig --type current
.P
Command to print all config settings that have been configured with a
different value than the default (configured, non-default values are
shown):
.br
.B lvmconfig --type diff
.P
Command to print a single config setting, with its default value,
and a full description, where "Section" refers to the config section,
e.g. global, and "Setting" refers to the name of the specific setting,
e.g. umask:
.br
.B lvmconfig --type default --withcomments Section/Setting
.
.SH FILES
.I #DEFAULT_SYS_DIR#/lvm.conf
.br
@@ -214,11 +207,11 @@ e.g. umask:
.br
.I #DEFAULT_CACHE_DIR#/.cache
.br
.I #DEFAULT_PROFILE_DIR#
.br
.I #DEFAULT_LOCK_DIR#
.
.br
.I #DEFAULT_PROFILE_DIR#
.SH SEE ALSO
.
.BR lvm (8),
.BR lvm (8)
.BR lvmconfig (8)

View File

@@ -1,58 +1,49 @@
.TH "LVM2-ACTIVATION-GENERATOR" "8" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
.
.SH "NAME"
.
lvm2-activation-generator - generator for systemd units to activate LVM volumes on boot
.
.SH SYNOPSIS
.
.B #SYSTEMD_GENERATOR_DIR#/lvm2-activation-generator
.
.sp
.SH DESCRIPTION
.
The lvm2-activation-generator is called by \fBsystemd\fP(1) on boot to
generate systemd units at runtime to activate LVM Logical Volumes (LVs)
when global/event_activation=0 is set in \fBlvm.conf\fP(5). These units use
\fBvgchange -aay\fP to activate LVs.
.P
If event_activation=1, the lvm2-activation-generator exits immediately without
generating any systemd units, and LVM fully relies on event-based
activation to activate LVs. In this case, event-generated
.B pvscan --cache -aay
commands activate LVs.
.P
activation to activate LVs. In this case, event-generated \fBpvscan
--cache -aay\fP commands activate LVs.
These systemd units are generated by lvm2-activation-generator:
.P
.I lvm2-activation-early.service
.sp
\fIlvm2-activation-early.service\fP
is run before systemd's special \fBcryptsetup.target\fP to activate
LVs that are not layered on top of encrypted devices.
.P
.I lvm2-activation.service
\fIlvm2-activation.service\fP
is run after systemd's special \fBcryptsetup.target\fP to activate
LVs that are layered on top of encrypted devices.
.P
.I lvm2-activation-net.service
\fIlvm2-activation-net.service\fP
is run after systemd's special \fBremote-fs-pre.target\fP to activate
LVs that are layered on attached remote devices.
.P
Note that all the underlying LVM devices (Physical Volumes) need to be
present when the service is run. If the there are any devices that appear
to the system later, LVs using these devices need to be activated directly
by \fBlvchange\fP(8) or \fBvgchange\fP(8).
.P
The lvm2-activation-generator implements the \fBGenerators Specification\fP
as referenced in \fBsystemd\fP(1).
.
.sp
.SH SEE ALSO
.nh
.ad l
.BR lvm.conf (5),
.BR vgchange (8),
.BR lvchange (8),
.BR pvscan (8),
.P
.BR systemd (1),
.BR systemd.target (5),
.BR systemd.special (7),
.P
.BR lvm.conf (5)
.BR vgchange (8)
.BR lvchange (8)
.BR pvscan (8)
.BR udev (7)
.BR systemd (1)
.BR systemd.target (5)
.BR systemd.special (7)

View File

@@ -1,16 +1,14 @@
.TH "LVMCACHE" "7" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
.
.SH NAME
.
lvmcache \(em LVM caching
.
.SH DESCRIPTION
.
\fBlvm\fP(8) includes two kinds of caching that can be used to improve the
performance of a Logical Volume (LV). When caching, varying subsets of an
LV's data are temporarily stored on a smaller, faster device (e.g. an SSD)
to improve the performance of the LV.
.P
To do this with lvm, a new special LV is first created from the faster
device. This LV will hold the cache. Then, the new fast LV is attached to
the main LV by way of an lvconvert command. lvconvert inserts one of the
@@ -19,162 +17,164 @@ mapper target combines the main LV and fast LV into a hybrid device that looks
like the main LV, but has better performance. While the main LV is being
used, portions of its data will be temporarily and transparently stored on
the special fast LV.
.P
The two kinds of caching are:
.P
.IP \[bu] 2
A read and write hot-spot cache, using the dm-cache kernel module.
This cache tracks access patterns and adjusts its content deliberately so
that commonly used parts of the main LV are likely to be found on the fast
storage. LVM refers to this using the LV type \fBcache\fP.
.
.IP \[bu]
.IP \[bu] 2
A write cache, using the dm-writecache kernel module. This cache can be
used with SSD or PMEM devices to speed up all writes to the main LV. Data
read from the main LV is not stored in the cache, only newly written data.
LVM refers to this using the LV type \fBwritecache\fP.
.
.SH USAGE
.
.SS 1. Identify main LV that needs caching
.
.B 1. Identify main LV that needs caching
The main LV may already exist, and is located on larger, slower devices.
A main LV would be created with a command like:
.P
# lvcreate -n main -L Size vg /dev/slow_hhd
.
.SS 2. Identify fast LV to use as the cache
.
.nf
$ lvcreate -n main -L Size vg /dev/slow_hhd
.fi
.B 2. Identify fast LV to use as the cache
A fast LV is created using one or more fast devices, like an SSD. This
special LV will be used to hold the cache:
.P
# lvcreate -n fast -L Size vg /dev/fast_ssd
.P
# lvs -a
.nf
$ lvcreate -n fast -L Size vg /dev/fast_ssd
$ lvs -a
LV Attr Type Devices
fast -wi------- linear /dev/fast_ssd
main -wi------- linear /dev/slow_hhd
.fi
.
.SS 3. Start caching the main LV
.
.B 3. Start caching the main LV
To start caching the main LV, convert the main LV to the desired caching
type, and specify the fast LV to use as the cache:
.P
.nf
using dm-cache (with cachepool):
.P
# lvconvert --type cache --cachepool fast vg/main
.P
$ lvconvert --type cache --cachepool fast vg/main
using dm-cache (with cachevol):
.P
# lvconvert --type cache --cachevol fast vg/main
.P
$ lvconvert --type cache --cachevol fast vg/main
using dm-writecache (with cachevol):
.P
# lvconvert --type writecache --cachevol fast vg/main
.P
$ lvconvert --type writecache --cachevol fast vg/main
For more alteratives see:
.br
dm-cache command shortcut
.br
dm-cache with separate data and metadata LVs
.
.SS 4. Display LVs
.
.fi
.B 4. Display LVs
Once the fast LV has been attached to the main LV, lvm reports the main LV
type as either \fBcache\fP or \fBwritecache\fP depending on the type used.
While attached, the fast LV is hidden, and renamed with a _cvol or _cpool
suffix. It is displayed by lvs -a. The _corig or _wcorig LV represents
the original LV without the cache.
.sp
using dm-cache (with cachepool):
.P
# lvs -ao+devices
.nf
using dm-cache (with cachepool):
$ lvs -ao+devices
LV Pool Type Devices
main [fast_cpool] cache main_corig(0)
[fast_cpool] cache-pool fast_pool_cdata(0)
[fast_cpool_cdata] linear /dev/fast_ssd
[fast_cpool_cmeta] linear /dev/fast_ssd
[main_corig] linear /dev/slow_hhd
.fi
.sp
using dm-cache (with cachevol):
.P
# lvs -ao+devices
.P
.nf
$ lvs -ao+devices
LV Pool Type Devices
main [fast_cvol] cache main_corig(0)
[fast_cvol] linear /dev/fast_ssd
[main_corig] linear /dev/slow_hhd
.fi
.sp
using dm-writecache (with cachevol):
.P
# lvs -ao+devices
.P
.nf
$ lvs -ao+devices
LV Pool Type Devices
main [fast_cvol] writecache main_wcorig(0)
[fast_cvol] linear /dev/fast_ssd
[main_wcorig] linear /dev/slow_hhd
.fi
.
.SS 5. Use the main LV
.
.B 5. Use the main LV
Use the LV until the cache is no longer wanted, or needs to be changed.
.
.SS 6. Stop caching
.
.B 6. Stop caching
To stop caching the main LV and also remove unneeded cache pool,
use the --uncache:
.P
# lvconvert --uncache vg/main
.P
# lvs -a
.nf
$ lvconvert --uncache vg/main
$ lvs -a
LV VG Attr Type Devices
main vg -wi------- linear /dev/slow_hhd
.fi
.P
To stop caching the main LV, separate the fast LV from the main LV. This
changes the type of the main LV back to what it was before the cache was
attached.
.P
# lvconvert --splitcache vg/main
.P
# lvs -a
.nf
$ lvconvert --splitcache vg/main
$ lvs -a
LV VG Attr Type Devices
fast vg -wi------- linear /dev/fast_ssd
main vg -wi------- linear /dev/slow_hhd
.fi
.
.SS 7. Create a new LV with caching
.
.SS Create a new LV with caching.
A new LV can be created with caching attached at the time of creation
using the following command:
.P
.nf
# lvcreate --type cache|writecache -n Name -L Size
$ lvcreate --type cache|writecache -n Name -L Size
--cachedevice /dev/fast_ssd vg /dev/slow_hhd
.fi
.P
The main LV is created with the specified Name and Size from the slow_hhd.
A hidden fast LV is created on the fast_ssd and is then attached to the
new main LV. If the fast_ssd is unused, the entire disk will be used as
the cache unless the --cachesize option is used to specify a size for the
fast LV. The --cachedevice option can be repeated to use multiple disks
for the fast LV.
.
.SH OPTIONS
.
\&
.SS option args
.
\&
.B --cachepool
.IR CachePoolLV | LV
.P
.br
Pass this option a cachepool LV or a standard LV. When using a cache
pool, lvm places cache data and cache metadata on different LVs. The two
LVs together are called a cache pool. This has a bit better performance
@@ -184,17 +184,19 @@ A cache pool is represented as a special type of LV
that cannot be used directly. If a standard LV is passed with this
option, lvm will first convert it to a cache pool by combining it with
another LV to use for metadata. This option can be used with dm-cache.
.P
.B --cachevol
.I LV
.P
.br
Pass this option a fast LV that should be used to hold the cache. With a
cachevol, cache data and metadata are stored in different parts of the
same fast LV. This option can be used with dm-writecache or dm-cache.
.P
.B --cachedevice
.I PV
.P
.br
This option can be used in place of --cachevol, in which case a cachevol
LV will be created using the specified device. This option can be
repeated to create a cachevol using multiple devices, or a tag name can be
@@ -202,96 +204,112 @@ specified in which case the cachevol will be created using any of the
devices with the given tag. If a named cache device is unused, the entire
device will be used to create the cachevol. To create a cachevol of a
specific size from the cache devices, include the --cachesize option.
.
\&
.SS dm-cache block size
.
\&
A cache pool will have a logical block size of 4096 bytes if it is created
on a device with a logical block size of 4096 bytes.
.P
If a main LV has logical block size 512 (with an existing xfs file system
using that size), then it cannot use a cache pool with a 4096 logical
block size. If the cache pool is attached, the main LV will likely fail
to mount.
.P
To avoid this problem, use a mkfs option to specify a 4096 block size for
the file system, or attach the cache pool before running mkfs.
.
.SS dm-writecache block size
.
\&
The dm-writecache block size can be 4096 bytes (the default), or 512
bytes. The default 4096 has better performance and should be used except
when 512 is necessary for compatibility. The dm-writecache block size is
specified with --cachesettings block_size=4096|512 when caching is started.
.P
When a file system like xfs already exists on the main LV prior to
caching, and the file system is using a block size of 512, then the
writecache block size should be set to 512. (The file system will likely
fail to mount if writecache block size of 4096 is used in this case.)
.P
Check the xfs sector size while the fs is mounted:
.P
# xfs_info /dev/vg/main
.nf
$ xfs_info /dev/vg/main
Look for sectsz=512 or sectsz=4096
.fi
.P
The writecache block size should be chosen to match the xfs sectsz value.
.P
It is also possible to specify a sector size of 4096 to mkfs.xfs when
creating the file system. In this case the writecache block size of 4096
can be used.
.
.SS dm-writecache settings
.
\&
Tunable parameters can be passed to the dm-writecache kernel module using
the --cachesettings option when caching is started, e.g.
.P
.nf
# lvconvert --type writecache --cachevol fast \\
$ lvconvert --type writecache --cachevol fast \\
--cachesettings 'high_watermark=N writeback_jobs=N' vg/main
.fi
.P
Tunable options are:
.
.TP
.IP \[bu] 2
high_watermark = <percent>
Start writeback when the writecache usage reaches this percent (0-100).
.
.TP
.IP \[bu] 2
low_watermark = <percent>
Stop writeback when the writecache usage reaches this percent (0-100).
.
.TP
.IP \[bu] 2
writeback_jobs = <count>
Limit the number of blocks that are in flight during writeback. Setting
this value reduces writeback throughput, but it may improve latency of
read requests.
.
.TP
.IP \[bu] 2
autocommit_blocks = <count>
When the application writes this amount of blocks without issuing the
FLUSH request, the blocks are automatically commited.
.
.TP
.IP \[bu] 2
autocommit_time = <milliseconds>
The data is automatically commited if this time passes and no FLUSH
request is received.
.
.TP
.IP \[bu] 2
fua = 0|1
Use the FUA flag when writing data from persistent memory back to the
underlying device.
Applicable only to persistent memory.
.
.TP
.IP \[bu] 2
nofua = 0|1
Don't use the FUA flag when writing back data and send the FLUSH request
afterwards. Some underlying devices perform better with fua, some with
nofua. Testing is necessary to determine which.
Applicable only to persistent memory.
.
.TP
.IP \[bu] 2
cleaner = 0|1
Setting cleaner=1 enables the writecache cleaner mode in which data is
gradually flushed from the cache. If this is done prior to detaching the
writecache, then the splitcache command will have little or no flushing to
@@ -299,89 +317,99 @@ perform. If not done beforehand, the splitcache command enables the
cleaner mode and waits for flushing to complete before detaching the
writecache. Adding cleaner=0 to the splitcache command will skip the
cleaner mode, and any required flushing is performed in device suspend.
.
.SS dm-cache with separate data and metadata LVs
.
\&
Preferred way of using dm-cache is to place the cache metadata and cache data
on separate LVs. To do this, a "cache pool" is created, which is a special
LV that references two sub LVs, one for data and one for metadata.
.P
To create a cache pool of given data size and let lvm2 calculate appropriate
metadata size:
.P
# lvcreate --type cache-pool -L DataSize -n fast vg /dev/fast_ssd1
.P
.nf
$ lvcreate --type cache-pool -L DataSize -n fast vg /dev/fast_ssd1
.fi
To create a cache pool from separate LV and let lvm2 calculate
appropriate cache metadata size:
.P
# lvcreate -n fast -L DataSize vg /dev/fast_ssd1
.br
# lvconvert --type cache-pool vg/fast /dev/fast_ssd1
.br
.P
.nf
$ lvcreate -n fast -L DataSize vg /dev/fast_ssd1
$ lvconvert --type cache-pool vg/fast /dev/fast_ssd1
.fi
To create a cache pool from two separate LVs:
.P
# lvcreate -n fast -L DataSize vg /dev/fast_ssd1
.br
# lvcreate -n fastmeta -L MetadataSize vg /dev/fast_ssd2
.br
# lvconvert --type cache-pool --poolmetadata fastmeta vg/fast
.P
.nf
$ lvcreate -n fast -L DataSize vg /dev/fast_ssd1
$ lvcreate -n fastmeta -L MetadataSize vg /dev/fast_ssd2
$ lvconvert --type cache-pool --poolmetadata fastmeta vg/fast
.fi
Then use the cache pool LV to start caching the main LV:
.P
# lvconvert --type cache --cachepool fast vg/main
.P
.nf
$ lvconvert --type cache --cachepool fast vg/main
.fi
A variation of the same procedure automatically creates a cache pool when
caching is started. To do this, use a standard LV as the --cachepool
(this will hold cache data), and use another standard LV as the
--poolmetadata (this will hold cache metadata). LVM will create a
cache pool LV from the two specified LVs, and use the cache pool to start
caching the main LV.
.P
.nf
# lvcreate -n fast -L DataSize vg /dev/fast_ssd1
# lvcreate -n fastmeta -L MetadataSize vg /dev/fast_ssd2
# lvconvert --type cache --cachepool fast \\
--poolmetadata fastmeta vg/main
$ lvcreate -n fast -L DataSize vg /dev/fast_ssd1
$ lvcreate -n fastmeta -L MetadataSize vg /dev/fast_ssd2
$ lvconvert --type cache --cachepool fast --poolmetadata fastmeta vg/main
.fi
.
.SS dm-cache cache modes
.
\&
The default dm-cache cache mode is "writethrough". Writethrough ensures
that any data written will be stored both in the cache and on the origin
LV. The loss of a device associated with the cache in this case would not
mean the loss of any data.
.P
A second cache mode is "writeback". Writeback delays writing data blocks
from the cache back to the origin LV. This mode will increase
performance, but the loss of a cache device can result in lost data.
.P
With the --cachemode option, the cache mode can be set when caching is
started, or changed on an LV that is already cached. The current cache
mode can be displayed with the cache_mode reporting option:
.P
.B lvs -o+cache_mode VG/LV
.P
.BR lvm.conf (5)
.B allocation/cache_mode
.br
defines the default cache mode.
.P
.nf
# lvconvert --type cache --cachemode writethrough \\
$ lvconvert --type cache --cachemode writethrough \\
--cachepool fast vg/main
.P
# lvconvert --type cache --cachemode writethrough \\
$ lvconvert --type cache --cachemode writethrough \\
--cachevol fast vg/main
.nf
.
.SS dm-cache chunk size
.
\&
The size of data blocks managed by dm-cache can be specified with the
--chunksize option when caching is started. The default unit is KiB. The
value must be a multiple of 32KiB between 32KiB and 1GiB. Cache chunks
bigger then 512KiB shall be only used when necessary.
.P
Using a chunk size that is too large can result in wasteful use of the
cache, in which small reads and writes cause large sections of an LV to be
stored in the cache. It can also require increasing migration threshold
@@ -392,184 +420,191 @@ cache origin LV. However, choosing a chunk size that is too small
can result in more overhead trying to manage the numerous chunks that
become mapped into the cache. Overhead can include both excessive CPU
time searching for chunks, and excessive memory tracking chunks.
.P
Command to display the chunk size:
.P
.br
.B lvs -o+chunksize VG/LV
.P
.BR lvm.conf (5)
.B allocation/cache_pool_chunk_size
.P
.B cache_pool_chunk_size
.br
controls the default chunk size.
.P
The default value is shown by:
.P
.br
.B lvmconfig --type default allocation/cache_pool_chunk_size
.P
Checking migration threshold (in sectors) of running cached LV:
.br
.B lvs -o+kernel_cache_settings VG/LV
.
.SS dm-cache migration threshold
.
\&
Migrating data between the origin and cache LV uses bandwidth.
The user can set a throttle to prevent more than a certain amount of
migration occurring at any one time. Currently dm-cache is not taking any
account of normal io traffic going to the devices.
.P
User can set migration threshold via cache policy settings as
"migration_threshold=<#sectors>" to set the maximum number
of sectors being migrated, the default being 2048 sectors (1MiB).
.P
Command to set migration threshold to 2MiB (4096 sectors):
.P
.br
.B lvcreate --cachepolicy 'migration_threshold=4096' VG/LV
.P
Command to display the migration threshold:
.P
.br
.B lvs -o+kernel_cache_settings,cache_settings VG/LV
.br
.B lvs -o+chunksize VG/LV
.
.SS dm-cache cache policy
.
\&
The dm-cache subsystem has additional per-LV parameters: the cache policy
to use, and possibly tunable parameters for the cache policy. Three
policies are currently available: "smq" is the default policy, "mq" is an
older implementation, and "cleaner" is used to force the cache to write
back (flush) all cached writes to the origin LV.
.P
The older "mq" policy has a number of tunable parameters. The defaults are
chosen to be suitable for the majority of systems, but in special
circumstances, changing the settings can improve performance.
.P
With the --cachepolicy and --cachesettings options, the cache policy and
settings can be set when caching is started, or changed on an existing
cached LV (both options can be used together). The current cache policy
and settings can be displayed with the cache_policy and cache_settings
reporting options:
.P
.B lvs -o+cache_policy,cache_settings VG/LV
.P
Change the cache policy and settings of an existing LV.
.nf
# lvchange --cachepolicy mq --cachesettings \\
Change the cache policy and settings of an existing LV.
$ lvchange --cachepolicy mq --cachesettings \\
\(aqmigration_threshold=2048 random_threshold=4\(aq vg/main
.fi
.P
.BR lvm.conf (5)
.B allocation/cache_policy
.br
defines the default cache policy.
.P
.BR lvm.conf (5)
.B allocation/cache_settings
.br
defines the default cache settings.
.
.SS dm-cache using metadata profiles
.
\&
Cache pools allows to set a variety of options. Lots of these settings
can be specified in lvm.conf or profile settings. You can prepare
a number of different profiles in the \fI#DEFAULT_SYS_DIR#/profile\fP directory
a number of different profiles in the #DEFAULT_SYS_DIR#/profile directory
and just specify the metadata profile file name when caching LV or creating cache-pool.
Check the output of \fBlvmconfig --type default --withcomments\fP
for a detailed description of all individual cache settings.
.P
.I Example
.nf
# cat <<EOF > #DEFAULT_SYS_DIR#/profile/cache_big_chunk.profile
allocation {
.RS
cache_pool_metadata_require_separate_pvs=0
cache_pool_chunk_size=512
cache_metadata_format=2
cache_mode="writethrough"
cache_policy="smq"
cache_settings {
.RS
smq {
.RS
migration_threshold=8192
random_threshold=4096
.RE
}
.RE
}
.RE
cache_pool_metadata_require_separate_pvs=0
cache_pool_chunk_size=512
cache_metadata_format=2
cache_mode="writethrough"
cache_policy="smq"
cache_settings {
smq {
migration_threshold=8192
random_threshold=4096
}
}
}
EOF
.P
# lvcreate --cache -L10G --metadataprofile cache_big_chunk vg/main \\
/dev/fast_ssd
# lvcreate --cache -L10G vg/main --config \\
'allocation/cache_pool_chunk_size=512' /dev/fast_ssd
# lvcreate --cache -L10G --metadataprofile cache_big_chunk vg/main /dev/fast_ssd
# lvcreate --cache -L10G --config 'allocation/cache_pool_chunk_size=512' vg/main /dev/fast_ssd
.fi
.
.SS dm-cache spare metadata LV
.
\&
See
.BR lvmthin (7)
for a description of the "pool metadata spare" LV.
The same concept is used for cache pools.
.
.SS dm-cache metadata formats
.
\&
There are two disk formats for dm-cache metadata. The metadata format can
be specified with --cachemetadataformat when caching is started, and
cannot be changed. Format \fB2\fP has better performance; it is more
compact, and stores dirty bits in a separate btree, which improves the
speed of shutting down the cache. With \fBauto\fP, lvm selects the best
option provided by the current dm-cache kernel module.
.
.SS RAID1 cache device
.
\&
RAID1 can be used to create the fast LV holding the cache so that it can
tolerate a device failure. (When using dm-cache with separate data
and metadata LVs, each of the sub-LVs can use RAID1.)
.P
.nf
# lvcreate -n main -L Size vg /dev/slow
# lvcreate --type raid1 -m 1 -n fast -L Size vg /dev/ssd1 /dev/ssd2
# lvconvert --type cache --cachevol fast vg/main
$ lvcreate -n main -L Size vg /dev/slow
$ lvcreate --type raid1 -m 1 -n fast -L Size vg /dev/ssd1 /dev/ssd2
$ lvconvert --type cache --cachevol fast vg/main
.fi
.
.SS dm-cache command shortcut
.
\&
A single command can be used to cache main LV with automatic
creation of a cache-pool:
.P
.nf
# lvcreate --cache --size CacheDataSize VG/LV [FastPVs]
$ lvcreate --cache --size CacheDataSize VG/LV [FastPVs]
.fi
.P
or the longer variant
.P
.nf
# lvcreate --type cache --size CacheDataSize \\
--name NameCachePool VG/LV [FastPVs]
$ lvcreate --type cache --size CacheDataSize \\
--name NameCachePool VG/LV [FastPVs]
.fi
.P
In this command, the specified LV already exists, and is the main LV to be
cached. The command creates a new cache pool with size and given name
or the name is automatically selected from a sequence lvolX_cpool,
using the optionally specified fast PV(s) (typically an ssd). Then it
attaches the new cache pool to the existing main LV to begin caching.
.P
(Note: ensure that the specified main LV is a standard LV. If a cache
pool LV is mistakenly specified, then the command does something
different.)
.P
(Note: the type option is interpreted differently by this command than by
normal lvcreate commands in which --type specifies the type of the newly
created LV. In this case, an LV with type cache-pool is being created,
and the existing main LV is being converted to type cache.)
.
.SH SEE ALSO
.
.nh
.ad l
.BR lvm.conf (5),
.BR lvchange (8),
.BR lvcreate (8),
@@ -579,12 +614,7 @@ and the existing main LV is being converted to type cache.)
.BR lvrename (8),
.BR lvresize (8),
.BR lvs (8),
.br
.BR vgchange (8),
.BR vgmerge (8),
.BR vgreduce (8),
.BR vgsplit (8),
.P
.BR cache_check (8),
.BR cache_dump (8),
.BR cache_repair (8)
.BR vgsplit (8)

View File

@@ -1,124 +1,180 @@
.TH LVMCONFIG 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.SH NAME
.
lvmconfig \(em Display and manipulate configuration information
lvmconfig - Display and manipulate configuration information
.
.SH SYNOPSIS
.
\fBlvmconfig\fP
.br
[ \fIoption_args\fP ]
.br
[ \fIposition_args\fP ]
.br
.
.SH DESCRIPTION
.
lvmconfig, lvm config, lvm dumpconfig (for compatibility reasons, to be phased out) produce
formatted output from the LVM configuration tree. The
sources of the configuration data include \fBlvm.conf\fP(5) and command
line settings from --config.
.
.SH USAGE
.
\fBlvmconfig\fP
.br
.RS 4
.ad l
[ \fB-f\fP|\fB--file\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB-l\fP|\fB--list\fP ]
.ad b
.br
.ad l
[ \fB--atversion\fP \fIString\fP ]
.ad b
.br
[ \fB--typeconfig\fP \c
.nh
\%\fBcurrent\fP|\:\fBdefault\fP|\:\fBdiff\fP|\:\fBfull\fP|\:\fBlist\fP|\:\fBmissing\fP|\:\fBnew\fP|\:\fBprofilable\fP|\:\fBprofilable-command\fP|\:\fBprofilable-metadata\fP
.hy
]
.ad l
[ \fB--typeconfig\fP \fBcurrent\fP|\fBdefault\fP|\fBdiff\fP|\fBfull\fP|\fBlist\fP|\fBmissing\fP|\fBnew\fP|\fBprofilable\fP|\fBprofilable-command\fP|\fBprofilable-metadata\fP ]
.ad b
.br
.ad l
[ \fB--ignoreadvanced\fP ]
.ad b
.br
.ad l
[ \fB--ignoreunsupported\fP ]
.ad b
.br
.ad l
[ \fB--ignorelocal\fP ]
.ad b
.br
.ad l
[ \fB--mergedconfig\fP ]
.ad b
.br
.ad l
[ \fB--metadataprofile\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--sinceversion\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--showdeprecated\fP ]
.ad b
.br
.ad l
[ \fB--showunsupported\fP ]
.ad b
.br
.ad l
[ \fB--validate\fP ]
.ad b
.br
.ad l
[ \fB--withsummary\fP ]
.ad b
.br
.ad l
[ \fB--withcomments\fP ]
.ad b
.br
.ad l
[ \fB--withgeneralpreamble\fP ]
.ad b
.br
.ad l
[ \fB--withlocalpreamble\fP ]
.ad b
.br
.ad l
[ \fB--withspaces\fP ]
.ad b
.br
.ad l
[ \fB--unconfigured\fP ]
.ad b
.br
.ad l
[ \fB--withversions\fP ]
.ad b
.br
[ COMMON_OPTIONS ]
.ad b
.RE
.br
.RS 4
[ \fIString\fP ... ]
.RE
.P
Common options for lvm:
.
.RS 4
.ad l
[ \fB-d\fP|\fB--debug\fP ]
.ad b
.br
.ad l
[ \fB-h\fP|\fB--help\fP ]
.ad b
.br
.ad l
[ \fB-q\fP|\fB--quiet\fP ]
.ad b
.br
.ad l
[ \fB-t\fP|\fB--test\fP ]
.ad b
.br
.ad l
[ \fB-v\fP|\fB--verbose\fP ]
.ad b
.br
.ad l
[ \fB-y\fP|\fB--yes\fP ]
.ad b
.br
.ad l
[ \fB--commandprofile\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--config\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--devices\fP \fIPV\fP ]
.ad b
.br
.ad l
[ \fB--devicesfile\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
.ad l
[ \fB--lockopt\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--longhelp\fP ]
.ad b
.br
.ad l
[ \fB--nolocking\fP ]
.ad b
.br
.ad l
[ \fB--profile\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--version\fP ]
.ad b
.RE
.
.SH OPTIONS
.
.
.HP
.ad l
\fB--atversion\fP \fIString\fP
.br
Specify an LVM version in x.y.z format where x is the major version,
@@ -128,73 +184,84 @@ at this LVM version will be considered only. This can be used
to display a configuration that a certain LVM version understands and
which does not contain any newer settings for which LVM would
issue a warning message when checking the configuration.
.
.ad b
.HP
.ad l
\fB--commandprofile\fP \fIString\fP
.br
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.ad b
.HP
.ad l
\fB--config\fP \fIString\fP
.br
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
Config settings for the command. These override lvm.conf settings.
The String arg uses the same format as lvm.conf,
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.ad b
.HP
.ad l
\fB-d\fP|\fB--debug\fP ...
.br
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.ad b
.HP
.ad l
\fB--devices\fP \fIPV\fP
.br
Devices that the command can use. This option can be repeated
or accepts a comma separated list of devices. This overrides
the devices file.
.
.ad b
.HP
.ad l
\fB--devicesfile\fP \fIString\fP
.br
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
The file must exist in /etc/lvm/devices/ and is managed
with the lvmdevices(8) command.
This overrides the lvm.conf devices/devicesfile and
devices/use_devicesfile settings.
.ad b
.HP
.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.ad b
.HP
.ad l
\fB-f\fP|\fB--file\fP \fIString\fP
.br
Write output to the named file.
.
.ad b
.HP
.ad l
\fB-h\fP|\fB--help\fP
.br
Display help text.
.
.ad b
.HP
.ad l
\fB--ignoreadvanced\fP
.br
Exclude advanced configuration settings from the output.
.
.ad b
.HP
.ad l
\fB--ignorelocal\fP
.br
Ignore the local section. The local section should be defined in
the lvmlocal.conf file, and should contain config settings
specific to the local host which should not be copied to
other hosts.
.
.ad b
.HP
.ad l
\fB--ignoreunsupported\fP
.br
Exclude unsupported configuration settings from the output. These settings are
@@ -202,25 +269,29 @@ either used for debugging and development purposes only or their support is not
yet complete and they are not meant to be used in production. The \fBcurrent\fP
and \fBdiff\fP types include unsupported settings in their output by default,
all the other types ignore unsupported settings.
.
.ad b
.HP
.ad l
\fB-l\fP|\fB--list\fP
.br
List config settings with summarizing comment. This is the same as using
options --typeconfig list --withsummary.
.
.ad b
.HP
.ad l
\fB--lockopt\fP \fIString\fP
.br
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.ad b
.HP
.ad l
\fB--longhelp\fP
.br
Display long help text.
.
.ad b
.HP
.ad l
\fB--mergedconfig\fP
.br
When the command is run with --config
@@ -230,31 +301,36 @@ merge all the contents of the "config cascade" before displaying it.
Without merging, only the configuration at the front of the
cascade is displayed.
See \fBlvm.conf\fP(5) for more information about config.
.
.ad b
.HP
.ad l
\fB--metadataprofile\fP \fIString\fP
.br
The metadata profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.ad b
.HP
.ad l
\fB--nolocking\fP
.br
Disable locking.
.
.ad b
.HP
.ad l
\fB--profile\fP \fIString\fP
.br
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.ad b
.HP
.ad l
\fB-q\fP|\fB--quiet\fP ...
.br
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.ad b
.HP
.ad l
\fB--showdeprecated\fP
.br
Include deprecated configuration settings in the output. These settings
@@ -263,8 +339,9 @@ with --atversion, deprecated settings are automatically included
if the specified version is lower than the version in which the settings were
deprecated. The current and diff types include deprecated settings
in their output by default, all the other types ignore deprecated settings.
.
.ad b
.HP
.ad l
\fB--showunsupported\fP
.br
Include unsupported configuration settings in the output. These settings
@@ -272,16 +349,18 @@ are either used for debugging or development purposes only, or their support
is not yet complete and they are not meant to be used in production. The
current and diff types include unsupported settings in their
output by default, all the other types ignore unsupported settings.
.
.ad b
.HP
.ad l
\fB--sinceversion\fP \fIString\fP
.br
Specify an LVM version in x.y.z format where x is the major version,
the y is the minor version and z is the patchlevel (e.g. 2.2.106).
This option is currently applicable only with --typeconfig new
to display all configuration settings introduced since given version.
.
.ad b
.HP
.ad l
\fB-t\fP|\fB--test\fP
.br
Run in test mode. Commands will not update metadata.
@@ -289,14 +368,10 @@ This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.ad b
.HP
.ad l
\fB--typeconfig\fP \c
.nh
\%\fBcurrent\fP|\:\fBdefault\fP|\:\fBdiff\fP|\:\fBfull\fP|\:\fBlist\fP|\:\fBmissing\fP|\:\fBnew\fP|\:\fBprofilable\fP|\:\fBprofilable-command\fP|\:\fBprofilable-metadata\fP
.hy
.ad b
\fB--typeconfig\fP \fBcurrent\fP|\fBdefault\fP|\fBdiff\fP|\fBfull\fP|\fBlist\fP|\fBmissing\fP|\fBnew\fP|\fBprofilable\fP|\fBprofilable-command\fP|\fBprofilable-metadata\fP
.br
\fBcurrent\fP prints the config settings that would be applied
to an lvm command (assuming the command does not override them
@@ -330,104 +405,168 @@ with their default values.
\fBprofilable-command\fP prints settings with their default values that can be set from a command profile.
\fBprofilable-metadata\fP prints settings with their default values that can be set from a metadata profile.
Also see \fBlvm.conf\fP(5).
.
.ad b
.HP
.ad l
\fB--unconfigured\fP
.br
Internal option used for generating config file during build.
.
.ad b
.HP
.ad l
\fB--validate\fP
.br
Validate current configuration used and exit with appropriate
return code. The validation is done only for the configuration
at the front of the "config cascade". To validate the whole
merged configuration tree, also use --mergedconfig.
The validation is done even if \fBlvm.conf\fP(5) \fBconfig/checks\fP is disabled.
.
The validation is done even if lvm.conf config/checks is disabled.
.ad b
.HP
.ad l
\fB-v\fP|\fB--verbose\fP ...
.br
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.ad b
.HP
.ad l
\fB--version\fP
.br
Display version information.
.
.ad b
.HP
.ad l
\fB--withcomments\fP
.br
Display a full comment for each configuration node. For deprecated
settings, also display comments about deprecation.
.
.ad b
.HP
.ad l
\fB--withgeneralpreamble\fP
.br
Include general config file preamble.
.
.ad b
.HP
.ad l
\fB--withlocalpreamble\fP
.br
Include local config file preamble.
.
.ad b
.HP
.ad l
\fB--withspaces\fP
.br
Where appropriate, add more spaces in output for better readability.
.
.ad b
.HP
.ad l
\fB--withsummary\fP
.br
Display a one line comment for each configuration node.
.
.ad b
.HP
.ad l
\fB--withversions\fP
.br
Also display a comment containing the version of introduction for
each configuration node. If the setting is deprecated, also display
the version since which it is deprecated.
.
.ad b
.HP
.ad l
\fB-y\fP|\fB--yes\fP
.br
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
.
.ad b
.SH VARIABLES
.
.TP
.I String
.HP
\fIString\fP
.br
See the option description for information about the string content.
.TP
.IR Size [UNIT]
.HP
\fISize\fP[UNIT]
.br
Size is an input number that accepts an optional unit.
Input units are always treated as base two values, regardless of
capitalization, e.g. 'k' and 'K' both refer to 1024.
The default input unit is specified by letter, followed by |UNIT.
UNIT represents other possible input units:
.BR b | B
is bytes,
.BR s | S
is sectors of 512 bytes,
.BR k | K
is KiB,
.BR m | M
is MiB,
.BR g | G
is GiB,
.BR t | T
is TiB,
.BR p | P
is PiB,
.BR e | E
is EiB.
UNIT represents other possible input units: \fBbBsSkKmMgGtTpPeE\fP.
b|B is bytes, s|S is sectors of 512 bytes, k|K is KiB,
m|M is MiB, g|G is GiB, t|T is TiB, p|P is PiB, e|E is EiB.
(This should not be confused with the output control --units, where
capital letters mean multiple of 1000.)
.
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
.SH SEE ALSO
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
.BR pvcreate (8)
.BR pvdisplay (8)
.BR pvmove (8)
.BR pvremove (8)
.BR pvresize (8)
.BR pvs (8)
.BR pvscan (8)
.BR vgcfgbackup (8)
.BR vgcfgrestore (8)
.BR vgchange (8)
.BR vgck (8)
.BR vgcreate (8)
.BR vgconvert (8)
.BR vgdisplay (8)
.BR vgexport (8)
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
.BR vgremove (8)
.BR vgrename (8)
.BR vgs (8)
.BR vgscan (8)
.BR vgsplit (8)
.BR lvcreate (8)
.BR lvchange (8)
.BR lvconvert (8)
.BR lvdisplay (8)
.BR lvextend (8)
.BR lvreduce (8)
.BR lvremove (8)
.BR lvrename (8)
.BR lvresize (8)
.BR lvs (8)
.BR lvscan (8)
.BR lvm-fullreport (8)
.BR lvm-lvpoll (8)
.BR lvm2-activation-generator (8)
.BR blkdeactivate (8)
.BR lvmdump (8)
.BR dmeventd (8)
.BR lvmpolld (8)
.BR lvmlockd (8)
.BR lvmlockctl (8)
.BR cmirrord (8)
.BR lvmdbusd (8)
.BR lvmsystemid (7)
.BR lvmreport (7)
.BR lvmraid (7)
.BR lvmthin (7)
.BR lvmcache (7)

View File

@@ -8,28 +8,31 @@ lvmdbusd \(em LVM D-Bus daemon
.
.ad l
.B lvmdbusd
.RB [ --debug ]
.RB [ --udev ]
.RB [ --debug \]
.RB [ --udev \]
.ad b
.
.SH DESCRIPTION
.
lvmdbusd is a service which provides a D-Bus API to the logical volume manager (LVM).
Run
Run
.BR lvmdbusd (8)
as root.
.
.SH OPTIONS
.
.TP 8
.B --debug
Enable debug statements
.HP
.BR --debug
.br
Enable debug statements
.
.TP
.B --udev
.HP
.BR --udev
.br
Use udev events to trigger updates
.
.SH SEE ALSO
.
.nh
.BR dbus-send (1),
.BR lvm (8)

View File

@@ -1,19 +1,19 @@
The LVM devices file lists devices that lvm can use. The default file is
\fI#DEFAULT_SYS_DIR#/devices/system.devices\fP, and the \fBlvmdevices\fP(8) command is used to
/etc/lvm/devices/system.devices, and the lvmdevices(8) command is used to
add or remove device entries. If the file does not exist, or if lvm.conf
includes use_devicesfile=0, then lvm will not use a devices file.
.P
To use a device with lvm, add it to the devices file with the command
lvmdevices --adddev, and to prevent lvm from seeing or using a device,
remove it from the devices file with lvmdevices --deldev. The
vgimportdevices(8) command adds all PVs from a VG to the devices file,
and updates the VG metadata to include device IDs of the PVs.
.P
Commands adding new devices to the devices file necessarily look outside
the existing devices file to find the devices to add. pvcreate, vgcreate,
and vgextend also look outside the devices file to create new PVs and add
them to the devices file.
.P
LVM records devices in the devices file using hardware-specific IDs, such
as the WWID, and attempts to use subsystem-specific IDs for virtual device
types (which also aim to be as unique and stable as possible.)
@@ -21,41 +21,42 @@ These device IDs are also written in the VG metadata. When no hardware or
virtual ID is available, lvm falls back using the unstable device name as
the device ID. When devnames are used, lvm performs extra scanning to
find devices if their devname changes, e.g. after reboot.
.P
When proper device IDs are used, an lvm command will not look at devices
outside the devices file, but when devnames are used as a fallback, lvm
will scan devices outside the devices file to locate PVs on renamed
devices. A config setting search_for_devnames can be used to control the
scanning for renamed devname entries.
.P
Related to the devices file, the new command option --devices <devnames>
allows a list of devices to be specified for the command to use,
overriding the devices file. The listed devices act as a sort of devices
file in terms of limiting which devices lvm will see and use. Devices
that are not listed will appear to be missing to the lvm command.
.P
Multiple devices files can be kept in \fI#DEFAULT_SYS_DIR#/devices\fP, which allows lvm
Multiple devices files can be kept in /etc/lvm/devices, which allows lvm
to be used with different sets of devices, e.g. system devices do not need
to be exposed to a specific application, and the application can use lvm on
its own devices that are not exposed to the system. The option
--devicesfile <filename> is used to select the devices file to use with the
command. Without the option set, the default system devices file is used.
.P
Setting --devicesfile "" causes lvm to not use a devices file.
.P
With no devices file, lvm will use any device on the system, and applies
the filter to limit the full set of system devices. With a devices file,
the regex filter is not used, and the filter settings in lvm.conf or the
command line are ignored. The vgimportdevices command is one exception
which does apply the regex filter when looking for a VG to import.
.P
If a devices file exists, lvm will use it, even if it's empty. An empty
devices file means lvm will see no devices.
.P
If the system devices file does not yet exist, the pvcreate or vgcreate
commands will create it if they see no existing VGs on the system.
lvmdevices --addev and vgimportdevices will always create a new devices file
if it does not yet exist.
.P
It is recommended to use lvm commands to make changes to the devices file to
ensure proper updates.

View File

@@ -1,11 +1,8 @@
.TH LVMDEVICES 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.SH NAME
.
lvmdevices \(em Manage the devices file
lvmdevices - Manage the devices file
.
.SH SYNOPSIS
.
\fBlvmdevices\fP \fIoption_args\fP
.br
[ \fIoption_args\fP ]
@@ -13,68 +10,108 @@ lvmdevices \(em Manage the devices file
.P
.ad l
\fB--adddev\fP \fIPV\fP
.ad b
.br
.ad l
\fB--addpvid\fP \fIString\fP
.ad b
.br
.ad l
\fB--check\fP
.ad b
.br
.ad l
\fB--commandprofile\fP \fIString\fP
.ad b
.br
.ad l
\fB--config\fP \fIString\fP
.ad b
.br
.ad l
\fB-d\fP|\fB--debug\fP
.ad b
.br
.ad l
\fB--deldev\fP \fIPV\fP
.ad b
.br
.ad l
\fB--delpvid\fP \fIString\fP
.ad b
.br
.ad l
\fB--devices\fP \fIPV\fP
.ad b
.br
.ad l
\fB--devicesfile\fP \fIString\fP
.ad b
.br
.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.ad b
.br
.ad l
\fB-h\fP|\fB--help\fP
.ad b
.br
.ad l
\fB--lockopt\fP \fIString\fP
.ad b
.br
.ad l
\fB--longhelp\fP
.ad b
.br
.ad l
\fB--nolocking\fP
.ad b
.br
.ad l
\fB--profile\fP \fIString\fP
.ad b
.br
.ad l
\fB-q\fP|\fB--quiet\fP
.ad b
.br
.ad l
\fB-t\fP|\fB--test\fP
.ad b
.br
.ad l
\fB--update\fP
.ad b
.br
.ad l
\fB-v\fP|\fB--verbose\fP
.ad b
.br
.ad l
\fB--version\fP
.ad b
.br
.ad l
\fB-y\fP|\fB--yes\fP
.ad b
.
.SH DESCRIPTION
.
The LVM devices file lists devices that lvm can use. The default file is
\fI#DEFAULT_SYS_DIR#/devices/system.devices\fP, and the \fBlvmdevices\fP(8) command is used to
/etc/lvm/devices/system.devices, and the lvmdevices(8) command is used to
add or remove device entries. If the file does not exist, or if lvm.conf
includes use_devicesfile=0, then lvm will not use a devices file.
.P
To use a device with lvm, add it to the devices file with the command
lvmdevices --adddev, and to prevent lvm from seeing or using a device,
remove it from the devices file with lvmdevices --deldev. The
vgimportdevices(8) command adds all PVs from a VG to the devices file,
and updates the VG metadata to include device IDs of the PVs.
.P
Commands adding new devices to the devices file necessarily look outside
the existing devices file to find the devices to add. pvcreate, vgcreate,
and vgextend also look outside the devices file to create new PVs and add
them to the devices file.
.P
LVM records devices in the devices file using hardware-specific IDs, such
as the WWID, and attempts to use subsystem-specific IDs for virtual device
types (which also aim to be as unique and stable as possible.)
@@ -82,287 +119,315 @@ These device IDs are also written in the VG metadata. When no hardware or
virtual ID is available, lvm falls back using the unstable device name as
the device ID. When devnames are used, lvm performs extra scanning to
find devices if their devname changes, e.g. after reboot.
.P
When proper device IDs are used, an lvm command will not look at devices
outside the devices file, but when devnames are used as a fallback, lvm
will scan devices outside the devices file to locate PVs on renamed
devices. A config setting search_for_devnames can be used to control the
scanning for renamed devname entries.
.P
Related to the devices file, the new command option --devices <devnames>
allows a list of devices to be specified for the command to use,
overriding the devices file. The listed devices act as a sort of devices
file in terms of limiting which devices lvm will see and use. Devices
that are not listed will appear to be missing to the lvm command.
.P
Multiple devices files can be kept in \fI#DEFAULT_SYS_DIR#/devices\fP, which allows lvm
Multiple devices files can be kept in /etc/lvm/devices, which allows lvm
to be used with different sets of devices, e.g. system devices do not need
to be exposed to a specific application, and the application can use lvm on
its own devices that are not exposed to the system. The option
--devicesfile <filename> is used to select the devices file to use with the
command. Without the option set, the default system devices file is used.
.P
Setting --devicesfile "" causes lvm to not use a devices file.
.P
With no devices file, lvm will use any device on the system, and applies
the filter to limit the full set of system devices. With a devices file,
the regex filter is not used, and the filter settings in lvm.conf or the
command line are ignored. The vgimportdevices command is one exception
which does apply the regex filter when looking for a VG to import.
.P
If a devices file exists, lvm will use it, even if it's empty. An empty
devices file means lvm will see no devices.
.P
If the system devices file does not yet exist, the pvcreate or vgcreate
commands will create it if they see no existing VGs on the system.
lvmdevices --addev and vgimportdevices will always create a new devices file
if it does not yet exist.
.P
It is recommended to use lvm commands to make changes to the devices file to
ensure proper updates.
.
.SH USAGE
.
Print devices in the devices file.
.br
.P
\fBlvmdevices\fP
.br
.RS 4
.ad l
[ COMMON_OPTIONS ]
.ad b
.RE
.P
\(em
.P
.br
-
Check the devices file and report incorrect values.
.br
.P
\fBlvmdevices\fP \fB--check\fP
.br
.RS 4
.ad l
[ COMMON_OPTIONS ]
.ad b
.RE
.P
\(em
.P
.br
-
Update the devices file to fix incorrect values.
.br
.P
\fBlvmdevices\fP \fB--update\fP
.br
.RS 4
.ad l
[ COMMON_OPTIONS ]
.ad b
.RE
.P
\(em
.P
.br
-
Add a device to the devices file.
.br
.P
\fBlvmdevices\fP \fB--adddev\fP \fIPV\fP
.br
.RS 4
.ad l
[ COMMON_OPTIONS ]
.ad b
.RE
.P
\(em
.P
.br
-
Remove a device from the devices file.
.br
.P
\fBlvmdevices\fP \fB--deldev\fP \fIPV\fP
.br
.RS 4
.ad l
[ COMMON_OPTIONS ]
.ad b
.RE
.P
\(em
.P
.br
-
Find the device with the given PVID and add it to the devices file.
.br
.P
\fBlvmdevices\fP \fB--addpvid\fP \fIString\fP
.br
.RS 4
.ad l
[ COMMON_OPTIONS ]
.ad b
.RE
.P
\(em
.P
.br
-
Remove the devices file entry for the given PVID.
.br
.P
\fBlvmdevices\fP \fB--delpvid\fP \fIString\fP
.br
.RS 4
.ad l
[ COMMON_OPTIONS ]
.ad b
.RE
.P
\(em
.P
.br
-
Common options for command:
.
.RS 4
.ad l
.ad b
.RE
.P
Common options for lvm:
.
.RS 4
.ad l
[ \fB-d\fP|\fB--debug\fP ]
.ad b
.br
.ad l
[ \fB-h\fP|\fB--help\fP ]
.ad b
.br
.ad l
[ \fB-q\fP|\fB--quiet\fP ]
.ad b
.br
.ad l
[ \fB-t\fP|\fB--test\fP ]
.ad b
.br
.ad l
[ \fB-v\fP|\fB--verbose\fP ]
.ad b
.br
.ad l
[ \fB-y\fP|\fB--yes\fP ]
.ad b
.br
.ad l
[ \fB--commandprofile\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--config\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--devices\fP \fIPV\fP ]
.ad b
.br
.ad l
[ \fB--devicesfile\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
.ad l
[ \fB--lockopt\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--longhelp\fP ]
.ad b
.br
.ad l
[ \fB--nolocking\fP ]
.ad b
.br
.ad l
[ \fB--profile\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--version\fP ]
.ad b
.RE
.
.SH OPTIONS
.
.
.HP
.ad l
\fB--adddev\fP \fIPV\fP
.br
Add a device to the devices file.
.
.ad b
.HP
.ad l
\fB--addpvid\fP \fIString\fP
.br
Find a device with the PVID and add the device to the devices file.
.
.ad b
.HP
.ad l
\fB--check\fP
.br
Check the content of the devices file.
.
.ad b
.HP
.ad l
\fB--commandprofile\fP \fIString\fP
.br
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.ad b
.HP
.ad l
\fB--config\fP \fIString\fP
.br
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
Config settings for the command. These override lvm.conf settings.
The String arg uses the same format as lvm.conf,
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.ad b
.HP
.ad l
\fB-d\fP|\fB--debug\fP ...
.br
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.ad b
.HP
.ad l
\fB--deldev\fP \fIPV\fP
.br
Remove a device from the devices file.
.
.ad b
.HP
.ad l
\fB--delpvid\fP \fIString\fP
.br
Remove a device with the PVID from the devices file.
.
.ad b
.HP
.ad l
\fB--devices\fP \fIPV\fP
.br
Devices that the command can use. This option can be repeated
or accepts a comma separated list of devices. This overrides
the devices file.
.
.ad b
.HP
.ad l
\fB--devicesfile\fP \fIString\fP
.br
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
The file must exist in /etc/lvm/devices/ and is managed
with the lvmdevices(8) command.
This overrides the lvm.conf devices/devicesfile and
devices/use_devicesfile settings.
.ad b
.HP
.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.ad b
.HP
.ad l
\fB-h\fP|\fB--help\fP
.br
Display help text.
.
.ad b
.HP
.ad l
\fB--lockopt\fP \fIString\fP
.br
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.ad b
.HP
.ad l
\fB--longhelp\fP
.br
Display long help text.
.
.ad b
.HP
.ad l
\fB--nolocking\fP
.br
Disable locking.
.
.ad b
.HP
.ad l
\fB--profile\fP \fIString\fP
.br
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.ad b
.HP
.ad l
\fB-q\fP|\fB--quiet\fP ...
.br
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.ad b
.HP
.ad l
\fB-t\fP|\fB--test\fP
.br
Run in test mode. Commands will not update metadata.
@@ -370,62 +435,119 @@ This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.ad b
.HP
.ad l
\fB--update\fP
.br
Update the content of the devices file.
.
.ad b
.HP
.ad l
\fB-v\fP|\fB--verbose\fP ...
.br
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.ad b
.HP
.ad l
\fB--version\fP
.br
Display version information.
.
.ad b
.HP
.ad l
\fB-y\fP|\fB--yes\fP
.br
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
.
.ad b
.SH VARIABLES
.
.TP
.I String
.HP
\fIString\fP
.br
See the option description for information about the string content.
.TP
.IR Size [UNIT]
.HP
\fISize\fP[UNIT]
.br
Size is an input number that accepts an optional unit.
Input units are always treated as base two values, regardless of
capitalization, e.g. 'k' and 'K' both refer to 1024.
The default input unit is specified by letter, followed by |UNIT.
UNIT represents other possible input units:
.BR b | B
is bytes,
.BR s | S
is sectors of 512 bytes,
.BR k | K
is KiB,
.BR m | M
is MiB,
.BR g | G
is GiB,
.BR t | T
is TiB,
.BR p | P
is PiB,
.BR e | E
is EiB.
UNIT represents other possible input units: \fBbBsSkKmMgGtTpPeE\fP.
b|B is bytes, s|S is sectors of 512 bytes, k|K is KiB,
m|M is MiB, g|G is GiB, t|T is TiB, p|P is PiB, e|E is EiB.
(This should not be confused with the output control --units, where
capital letters mean multiple of 1000.)
.
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
.SH SEE ALSO
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
.BR pvcreate (8)
.BR pvdisplay (8)
.BR pvmove (8)
.BR pvremove (8)
.BR pvresize (8)
.BR pvs (8)
.BR pvscan (8)
.BR vgcfgbackup (8)
.BR vgcfgrestore (8)
.BR vgchange (8)
.BR vgck (8)
.BR vgcreate (8)
.BR vgconvert (8)
.BR vgdisplay (8)
.BR vgexport (8)
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
.BR vgremove (8)
.BR vgrename (8)
.BR vgs (8)
.BR vgscan (8)
.BR vgsplit (8)
.BR lvcreate (8)
.BR lvchange (8)
.BR lvconvert (8)
.BR lvdisplay (8)
.BR lvextend (8)
.BR lvreduce (8)
.BR lvremove (8)
.BR lvrename (8)
.BR lvresize (8)
.BR lvs (8)
.BR lvscan (8)
.BR lvm-fullreport (8)
.BR lvm-lvpoll (8)
.BR lvm2-activation-generator (8)
.BR blkdeactivate (8)
.BR lvmdump (8)
.BR dmeventd (8)
.BR lvmpolld (8)
.BR lvmlockd (8)
.BR lvmlockctl (8)
.BR cmirrord (8)
.BR lvmdbusd (8)
.BR lvmsystemid (7)
.BR lvmreport (7)
.BR lvmraid (7)
.BR lvmthin (7)
.BR lvmcache (7)

View File

@@ -2,5 +2,6 @@ lvmdiskscan scans all SCSI, (E)IDE disks, multiple devices and a bunch of
other block devices in the system looking for LVM PVs. The size reported
is the real device size. Define a filter in \fBlvm.conf\fP(5) to restrict
the scan to avoid a CD ROM, for example.
.P
This command is deprecated, use \fBpvs\fP instead.

View File

@@ -1,161 +1,199 @@
.TH LVMDISKSCAN 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.SH NAME
.
lvmdiskscan \(em List devices that may be used as physical volumes
lvmdiskscan - List devices that may be used as physical volumes
.
.SH SYNOPSIS
.
\fBlvmdiskscan\fP
.br
[ \fIoption_args\fP ]
.br
.
.SH DESCRIPTION
.
lvmdiskscan scans all SCSI, (E)IDE disks, multiple devices and a bunch of
other block devices in the system looking for LVM PVs. The size reported
is the real device size. Define a filter in \fBlvm.conf\fP(5) to restrict
the scan to avoid a CD ROM, for example.
.P
This command is deprecated, use \fBpvs\fP instead.
.
.SH USAGE
.
\fBlvmdiskscan\fP
.br
.RS 4
.ad l
[ \fB-l\fP|\fB--lvmpartition\fP ]
.ad b
.br
.ad l
[ \fB--readonly\fP ]
.ad b
.br
[ COMMON_OPTIONS ]
.ad b
.RE
.P
.br
Common options for lvm:
.
.RS 4
.ad l
[ \fB-d\fP|\fB--debug\fP ]
.ad b
.br
.ad l
[ \fB-h\fP|\fB--help\fP ]
.ad b
.br
.ad l
[ \fB-q\fP|\fB--quiet\fP ]
.ad b
.br
.ad l
[ \fB-t\fP|\fB--test\fP ]
.ad b
.br
.ad l
[ \fB-v\fP|\fB--verbose\fP ]
.ad b
.br
.ad l
[ \fB-y\fP|\fB--yes\fP ]
.ad b
.br
.ad l
[ \fB--commandprofile\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--config\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--devices\fP \fIPV\fP ]
.ad b
.br
.ad l
[ \fB--devicesfile\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
.ad l
[ \fB--lockopt\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--longhelp\fP ]
.ad b
.br
.ad l
[ \fB--nolocking\fP ]
.ad b
.br
.ad l
[ \fB--profile\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--version\fP ]
.ad b
.RE
.
.SH OPTIONS
.
.
.HP
.ad l
\fB--commandprofile\fP \fIString\fP
.br
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.ad b
.HP
.ad l
\fB--config\fP \fIString\fP
.br
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
Config settings for the command. These override lvm.conf settings.
The String arg uses the same format as lvm.conf,
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.ad b
.HP
.ad l
\fB-d\fP|\fB--debug\fP ...
.br
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.ad b
.HP
.ad l
\fB--devices\fP \fIPV\fP
.br
Devices that the command can use. This option can be repeated
or accepts a comma separated list of devices. This overrides
the devices file.
.
.ad b
.HP
.ad l
\fB--devicesfile\fP \fIString\fP
.br
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
The file must exist in /etc/lvm/devices/ and is managed
with the lvmdevices(8) command.
This overrides the lvm.conf devices/devicesfile and
devices/use_devicesfile settings.
.ad b
.HP
.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.ad b
.HP
.ad l
\fB-h\fP|\fB--help\fP
.br
Display help text.
.
.ad b
.HP
.ad l
\fB--lockopt\fP \fIString\fP
.br
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.ad b
.HP
.ad l
\fB--longhelp\fP
.br
Display long help text.
.
.ad b
.HP
.ad l
\fB-l\fP|\fB--lvmpartition\fP
.br
Only report PVs.
.
.ad b
.HP
.ad l
\fB--nolocking\fP
.br
Disable locking.
.
.ad b
.HP
.ad l
\fB--profile\fP \fIString\fP
.br
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.ad b
.HP
.ad l
\fB-q\fP|\fB--quiet\fP ...
.br
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.ad b
.HP
.ad l
\fB--readonly\fP
.br
Run the command in a special read-only mode which will read on-disk
@@ -164,8 +202,9 @@ inside metadata used by a virtual machine image while the virtual
machine is running. No attempt will be made to communicate with the
device-mapper kernel driver, so this option is unable to report whether
or not LVs are actually in use.
.
.ad b
.HP
.ad l
\fB-t\fP|\fB--test\fP
.br
Run in test mode. Commands will not update metadata.
@@ -173,57 +212,113 @@ This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.ad b
.HP
.ad l
\fB-v\fP|\fB--verbose\fP ...
.br
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.ad b
.HP
.ad l
\fB--version\fP
.br
Display version information.
.
.ad b
.HP
.ad l
\fB-y\fP|\fB--yes\fP
.br
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
.
.ad b
.SH VARIABLES
.
.TP
.I String
.HP
\fIString\fP
.br
See the option description for information about the string content.
.TP
.IR Size [UNIT]
.HP
\fISize\fP[UNIT]
.br
Size is an input number that accepts an optional unit.
Input units are always treated as base two values, regardless of
capitalization, e.g. 'k' and 'K' both refer to 1024.
The default input unit is specified by letter, followed by |UNIT.
UNIT represents other possible input units:
.BR b | B
is bytes,
.BR s | S
is sectors of 512 bytes,
.BR k | K
is KiB,
.BR m | M
is MiB,
.BR g | G
is GiB,
.BR t | T
is TiB,
.BR p | P
is PiB,
.BR e | E
is EiB.
UNIT represents other possible input units: \fBbBsSkKmMgGtTpPeE\fP.
b|B is bytes, s|S is sectors of 512 bytes, k|K is KiB,
m|M is MiB, g|G is GiB, t|T is TiB, p|P is PiB, e|E is EiB.
(This should not be confused with the output control --units, where
capital letters mean multiple of 1000.)
.
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
.SH SEE ALSO
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
.BR pvcreate (8)
.BR pvdisplay (8)
.BR pvmove (8)
.BR pvremove (8)
.BR pvresize (8)
.BR pvs (8)
.BR pvscan (8)
.BR vgcfgbackup (8)
.BR vgcfgrestore (8)
.BR vgchange (8)
.BR vgck (8)
.BR vgcreate (8)
.BR vgconvert (8)
.BR vgdisplay (8)
.BR vgexport (8)
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
.BR vgremove (8)
.BR vgrename (8)
.BR vgs (8)
.BR vgscan (8)
.BR vgsplit (8)
.BR lvcreate (8)
.BR lvchange (8)
.BR lvconvert (8)
.BR lvdisplay (8)
.BR lvextend (8)
.BR lvreduce (8)
.BR lvremove (8)
.BR lvrename (8)
.BR lvresize (8)
.BR lvs (8)
.BR lvscan (8)
.BR lvm-fullreport (8)
.BR lvm-lvpoll (8)
.BR lvm2-activation-generator (8)
.BR blkdeactivate (8)
.BR lvmdump (8)
.BR dmeventd (8)
.BR lvmpolld (8)
.BR lvmlockd (8)
.BR lvmlockctl (8)
.BR cmirrord (8)
.BR lvmdbusd (8)
.BR lvmsystemid (7)
.BR lvmreport (7)
.BR lvmraid (7)
.BR lvmthin (7)
.BR lvmcache (7)

View File

@@ -1,11 +1,7 @@
.TH LVMDUMP 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.SH NAME
.
lvmdump \(em create lvm2 information dumps for diagnostic purposes
.
.SH SYNOPSIS
.
.B lvmdump
.RB [ -a ]
.RB [ -c ]
@@ -17,54 +13,46 @@ lvmdump \(em create lvm2 information dumps for diagnostic purposes
.RB [ -p ]
.RB [ -s ]
.RB [ -u ]
.
.SH DESCRIPTION
.
lvmdump is a tool to dump various information concerning LVM2.
By default, it creates a tarball suitable for submission along
with a problem report.
.P
.PP
The content of the tarball is as follows:
.ad l
.PD 0
.IP \[bu] 2
dmsetup info
.IP \[bu]
table of currently running processes
.IP \[bu]
recent entries from \fI/var/log/messages\fP (containing system messages)
.IP \[bu]
complete lvm configuration and cache (content of \fI#DEFAULT_SYS_DIR#\fP)
.IP \[bu]
list of device nodes present under \fI/dev\fP
.IP \[bu]
list of files present \fI/sys/block\fP
.IP \[bu]
list of files present \fI/sys/devices/virtual/block\fP
.IP \[bu]
if enabled with -m, metadata dump will be also included
.IP \[bu]
if enabled with -a, debug output of vgscan, pvscan and list of all available volume groups, physical volumes and logical volumes will be included
.IP \[bu]
if enabled with -l, lvmetad state if running
.IP \[bu]
if enabled with -p, lvmpolld state if running
.IP \[bu]
if enabled with -s, system info and context
.IP \[bu]
if enabled with -u, udev info and context
.PD
.ad b
.
.br
- dmsetup info
.br
- table of currently running processes
.br
- recent entries from /var/log/messages (containing system messages)
.br
- complete lvm configuration and cache (content of #DEFAULT_SYS_DIR#)
.br
- list of device nodes present under /dev
.br
- list of files present /sys/block
.br
- list of files present /sys/devices/virtual/block
.br
- if enabled with -m, metadata dump will be also included
.br
- if enabled with -a, debug output of vgscan, pvscan and list of all available volume groups, physical volumes and logical volumes will be included
.br
- if enabled with -l, lvmetad state if running
.br
- if enabled with -p, lvmpolld state if running
.br
- if enabled with -s, system info and context
.br
- if enabled with -u, udev info and context
.SH OPTIONS
.
.TP
.B -a
Advanced collection.
\fBWARNING\fR: if lvm is already hung, then this script may hang as well
if \fB-a\fR is used.
.TP
.B -d \fIdirectory
.B -d \fIdirectory
Dump into a directory instead of tarball
By default, lvmdump will produce a single compressed tarball containing
all the information. Using this option, it can be instructed to only
@@ -99,28 +87,21 @@ controlling LVM functionality and the content of systemd journal for
current boot.
.TP
.B -u
Gather udev info and context: \fI/etc/udev/udev.conf\fP file, udev daemon version
Gather udev info and context: /etc/udev/udev.conf file, udev daemon version
(output of 'udevadm info --version' command), udev rules currently used in the system
(content of \fI/lib/udev/rules.d\fP and \fI/etc/udev/rules.d\fP directory),
(content of /lib/udev/rules.d and /etc/udev/rules.d directory),
list of files in /lib/udev directory and dump of current udev
database content (the output of 'udevadm info --export-db' command).
.
.SH ENVIRONMENT VARIABLES
.
.TP
.B LVM_BINARY
\fBLVM_BINARY\fP
The LVM2 binary to use.
Defaults to "\fBlvm\fP".
Sometimes you might need to set this to "\fI#LVM_PATH#.static\fP", for example.
Defaults to "lvm".
Sometimes you might need to set this to "#LVM_PATH#/lvm.static", for example.
.TP
.B DMSETUP_BINARY
\fBDMSETUP_BINARY\fP
The dmsetup binary to use.
Defaults to "\fBdmsetup\fP".
.
Defaults to "dmsetup".
.PP
.SH SEE ALSO
.
.BR lvm (8),
.BR lvmpolld (8),
.P
.BR udev (8),
.BR udevadm (8)
.BR lvm (8)

View File

@@ -1,119 +1,106 @@
.TH "LVMLOCKCTL" "8" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
.
.SH NAME
.
lvmlockctl \(em Control for lvmlockd
.
.SH SYNOPSIS
.
.BR lvmlockctl " [" \fIoptions ]
.
lvmlockctl \(em Control for lvmlockd
.SH DESCRIPTION
.
This command interacts with
.BR lvmlockd (8).
.
.SH OPTIONS
.
.TP
.BR -h | --help
Show this help information.
.
.TP
.BR -q | --quit
Tell lvmlockd to quit.
.
.TP
.BR -i | --info
Print lock state information from lvmlockd.
.
.TP
.BR -d | --dump
Print log buffer from lvmlockd.
.
.TP
.BR -w | --wait\ 0 | 1
Wait option for other commands.
.
.TP
.BR -f | --force\ 0 | 1
Force option for other commands.
.
.TP
.BR -k | --kill " " \fIvgname
Kill access to the VG when sanlock cannot renew lease.
.
.TP
.BR -r | --drop " " \fIvgname
Clear locks for the VG when it is unused after kill (-k).
.
.TP
.BR -E | --gl-enable " " \fIvgname
Tell lvmlockd to enable the global lock in a sanlock VG.
.
.TP
.BR -D | --gl-disable " " \fIvgname
Tell lvmlockd to disable the global lock in a sanlock VG.
.
.TP
.BR -S | --stop-lockspaces
Stop all lockspaces.
.
lvmlockctl [options]
.B --help | -h
Show this help information.
.B --quit | -q
Tell lvmlockd to quit.
.B --info | -i
Print lock state information from lvmlockd.
.B --dump | -d
Print log buffer from lvmlockd.
.B --wait | -w 0|1
Wait option for other commands.
.B --force | -f 0|1
Force option for other commands.
.B --kill | -k
.I vgname
Kill access to the VG when sanlock cannot renew lease.
.B --drop | -r
.I vgname
Clear locks for the VG when it is unused after kill (-k).
.B --gl-enable | -E
.I vgname
Tell lvmlockd to enable the global lock in a sanlock VG.
.B --gl-disable | -D
.I vgname
Tell lvmlockd to disable the global lock in a sanlock VG.
.B --stop-lockspaces | -S
Stop all lockspaces.
.SH USAGE
.
.TP
.B --info
.SS info
This collects and displays lock state from lvmlockd. The display is
primitive, incomplete and will change in future version. To print the raw
lock state from lvmlockd, combine this option with --dump|-d.
.
.TP
.B --dump
.SS dump
This collects the circular log buffer of debug statements from lvmlockd
and prints it.
.
.TP
.B --kill
.SS kill
This is run by sanlock when it loses access to the storage holding leases
for a VG. It runs the command specified in lvm.conf
lvmlockctl_kill_command to deactivate LVs in the VG. If the specified
command is successful, locks will be dropped for the VG in lvmlockd
(the equivalent of \fBlvmlockctl --drop\fP will be run.) If no command
(the equivalent of lvmlockctl --drop will be run.) If no command
is specified, or the command fails, then the user must intervene
to forcefully deactivate LVs in the VG, and if successful, run
\fBlvmlockctl --drop\fP. For more, see
lvmlockctl --drop. For more, see
.BR lvmlockd (8).
.
.TP
.B --drop
.SS drop
This should only be run after a VG has been successfully deactivated
following an lvmlockctl --kill command. It clears the stale lockspace
from lvmlockd. When lvmlockctl_kill_command is used, the --kill
command may run drop automatically. For more, see
.BR lvmlockd (8).
.
.TP
.B --gl-enable
.SS gl-enable
This enables the global lock in a sanlock VG. This is necessary if the VG
that previously held the global lock is removed. For more, see
.BR lvmlockd (8).
.
.TP
.B --gl-disable
.SS gl-disable
This disables the global lock in a sanlock VG. This is necessary if the
global lock has mistakenly been enabled in more than one VG. The global
lock should be disabled in all but one sanlock VG. For more, see
.BR lvmlockd (8).
.
.TP
.B --stop-lockspaces
.SS stop-lockspaces
This tells lvmlockd to stop all lockspaces. It can be useful to stop
lockspaces for VGs that the \fBvgchange --lock-stop\fP command can no longer
lockspaces for VGs that the vgchange --lock-stop comand can no longer
see, or to stop the dlm global lockspace which is not directly stopped by
the vgchange command. The wait and force options can be used with this
command.
.
.SH SEE ALSO
.
.BR lvm (8),
.BR lvmlockd (8)

File diff suppressed because it is too large Load Diff

View File

@@ -1,16 +1,10 @@
.TH LVMPOLLD 8 "LVM TOOLS #VERSION#" "Red Hat Inc" \" -*- nroff -*-
.
.SH NAME
.
lvmpolld \(em LVM poll daemon
.
.SH SYNOPSIS
.
.B lvmpolld
.nh
.ad l
.RB [ -l | --log
.BR all | wire | debug ]
.RI { all | wire | debug }]
.RB [ -p | --pidfile
.IR pidfile_path ]
.RB [ -s | --socket
@@ -22,91 +16,75 @@ lvmpolld \(em LVM poll daemon
.RB [ -f | --foreground ]
.RB [ -h | --help ]
.RB [ -V | --version ]
.ad b
.hy
.P
.B lvmpolld
.RB [ --dump ]
.
.SH DESCRIPTION
.
lvmpolld is polling daemon for LVM. The daemon receives requests for polling
of already initialised operations originating in LVM2 command line tool.
The requests for polling originate in the \fBlvconvert\fP, \fBpvmove\fP,
\fBlvchange\fP or \fBvgchange\fP LVM2 commands.
.P
The purpose of lvmpolld is to reduce the number of spawned background processes
per otherwise unique polling operation. There should be only one. It also
eliminates the possibility of unsolicited termination of background process by
external factors.
.P
lvmpolld is used by LVM only if it is enabled in \fBlvm.conf\fP(5) by
specifying the \fBglobal/use_lvmpolld\fP setting. If this is not defined in the
LVM configuration explicitly then default setting is used instead (see the
output of \fBlvmconfig --type default global/use_lvmpolld\fP command).
.
.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
.BR -f | --foreground
.BR -f ", " --foreground
Don't fork, but run in the foreground.
.TP
.BR -h | --help
.BR -h ", " --help
Show help information.
.
.TP
.BR -l | --log " " all | wire | debug
.IR \fB-l\fP ", " \fB--log\fP " {" all | wire | debug }
Select the type of log messages to generate.
Messages are logged by syslog.
Additionally, when \fB-f\fP is given they are also sent to standard error.
There are two classes of messages: wire and debug. Selecting '\fBall\fP' supplies both
and is equivalent to a comma-separated list \fB-l wire,debug\fP.
.
Additionally, when -f is given they are also sent to standard error.
There are two classes of messages: wire and debug. Selecting 'all' supplies both
and is equivalent to a comma-separated list -l wire,debug.
.TP
.BR -p | --pidfile " " \fIpidfile_path
.BR -p ", " --pidfile " " \fIpidfile_path
Path to the pidfile. This overrides both the built-in default
(\fI#DEFAULT_PID_DIR#/lvmpolld.pid\fP) and the environment variable
(#DEFAULT_PID_DIR#/lvmpolld.pid) and the environment variable
\fBLVM_LVMPOLLD_PIDFILE\fP. This file is used to prevent more
than one instance of the daemon running simultaneously.
.
.TP
.BR -s | --socket " " \fIsocket_path
.BR -s ", " --socket " " \fIsocket_path
Path to the socket file. This overrides both the built-in default
(\fI#DEFAULT_RUN_DIR#/lvmpolld.socket\fP) and the environment variable
(#DEFAULT_RUN_DIR#/lvmpolld.socket) and the environment variable
\fBLVM_LVMPOLLD_SOCKET\fP.
.
.TP
.BR -t | --timeout " " \fItimeout_value
.BR -t ", " --timeout " " \fItimeout_value
The daemon may shutdown after being idle for the given time (in seconds). When the
option is omitted or the value given is zero the daemon never shutdowns on idle.
.
.TP
.BR -B | --binary " " \fIlvm_binary_path
Optional path to alternative LVM binary (default: \fI#LVM_PATH#\fP). Use for
.BR -B ", " --binary " " \fIlvm_binary_path
Optional path to alternative LVM binary (default: #LVM_PATH#). Use for
testing purposes only.
.
.TP
.BR -V | --version
.BR -V ", " --version
Display the version of lvmpolld daemon.
.TP
.B --dump
Contact the running lvmpolld daemon to obtain the complete state and print it
out in a raw format.
.
.SH ENVIRONMENT VARIABLES
.
.TP
.B LVM_LVMPOLLD_PIDFILE
Path for the pid file.
.
.TP
.B LVM_LVMPOLLD_SOCKET
Path for the socket file.
.
.SH SEE ALSO
.
.BR lvm (8),
.BR lvm.conf (5)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,20 +1,12 @@
.TH "LVMSADC" "8" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
.
.SH NAME
.
.SH "NAME"
lvmsadc \(em LVM system activity data collector
.
.SH SYNOPSIS
.
.SH "SYNOPSIS"
.B lvmsadc
.
.SH DESCRIPTION
.
.SH "DESCRIPTION"
lvmsadc is not supported under LVM2. The device-mapper statistics
facility provides similar performance metrics using the \fBdmstats(8)\fP
command.
.
.SH SEE ALSO
.
.BR dmstats (8),
.SH "SEE ALSO"
.BR dmstats (8)
.BR lvm (8)

View File

@@ -1,20 +1,12 @@
.TH "LVMSAR" "8" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
.
.SH NAME
.
.SH "NAME"
lvmsar \(em LVM system activity reporter
.
.SH SYNOPSIS
.
.SH "SYNOPSIS"
.B lvmsar
.
.SH DESCRIPTION
.
.SH "DESCRIPTION"
lvmsar is not supported under LVM2. The device-mapper statistics
facility provides similar performance metrics using the \fBdmstats(8)\fP
command.
.
.SH SEE ALSO
.
.BR dmstats (8),
.SH "SEE ALSO"
.BR dmstats (8)
.BR lvm (8)

View File

@@ -1,39 +1,38 @@
.TH "LVMSYSTEMID" "7" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
.
.SH NAME
.
lvmsystemid \(em LVM system ID
.
.SH DESCRIPTION
.
The \fBlvm\fP(8) system ID restricts Volume Group (VG) access to one host.
This is useful when a VG is placed on shared storage devices, or when
local devices are visible to both host and guest operating systems. In
cases like these, a VG can be visible to multiple hosts at once, and some
mechanism is needed to protect it from being used by more than one host at
a time.
.P
A VG's system ID identifies one host as the VG owner. The host with a
matching system ID can use the VG and its LVs, while LVM on other hosts
will ignore it. This protects the VG from being accidentally used from
other hosts.
.P
The system ID is a string that uniquely identifies a host. It can be
configured as a custom value, or it can be assigned automatically by LVM
using some unique identifier already available on the host, e.g.
machine-id or uname.
.P
When a new VG is created, the system ID of the local host is recorded in
the VG metadata. The creating host then owns the new VG, and LVM on other
hosts will ignore it. When an existing, exported VG is imported
(vgimport), the system ID of the local host is saved in the VG metadata,
and the importing host owns the VG.
.P
A VG without a system ID can be used by LVM on any host where the VG's
devices are visible. When system IDs are not used, device filters should
be configured on all hosts to exclude the VG's devices from all but one
host.
.P
A
.B foreign VG
is a VG seen by a host with an unmatching system ID, i.e. the system ID
@@ -41,194 +40,195 @@ in the VG metadata does not match the system ID configured on the host.
If the host has no system ID, and the VG does, the VG is foreign and LVM
will ignore it. If the VG has no system ID, access is unrestricted, and
LVM can access it from any host, whether the host has a system ID or not.
.P
Changes to a host's system ID and a VG's system ID can be made in limited
circumstances (see vgexport and vgimport). Improper changes can result in
a host losing access to its VG, or a VG being accidentally damaged by
access from an unintended host. Even limited changes to the VG system ID
may not be perfectly reflected across hosts. A more coherent view of
shared storage requires an inter-host locking system to coordinate access.
.P
Valid system ID characters are the same as valid VG name characters. If a
system ID contains invalid characters, those characters are omitted and
remaining characters are used. If a system ID is longer than the maximum
name length, the characters up to the maximum length are used. The
maximum length of a system ID is 128 characters.
.P
Print the system ID of a VG to check if it is set:
.P
.B vgs -o systemid
.I VG
.P
Print the system ID of the local host to check if it is configured:
.P
.B lvm systemid
.
.SS Limitations and warnings
.
To benefit fully from system ID, all hosts should have a system ID
configured, and all VGs should have a system ID set. Without any method
to restrict access, e.g. system ID or device filters, a VG that is visible
to multiple hosts can be accidentally damaged or destroyed.
.
.IP \[bu] 2
A VG without a system ID can be used without restriction from any host
where it is visible, even from hosts that have a system ID.
.
.IP \[bu]
.IP \[bu] 2
Many VGs will not have a system ID set because LVM has not enabled it by
default, and even when enabled, many VGs were created before the feature
was added to LVM or enabled. A system ID can be assigned to these VGs by
using vgchange --systemid (see below).
.
.IP \[bu]
.IP \[bu] 2
Two hosts should not be assigned the same system ID. Doing so defeats
the purpose of distinguishing different hosts with this value.
.
.IP \[bu]
.IP \[bu] 2
Orphan PVs (or unused devices) on shared storage are unprotected by the
system ID feature. Commands that use these PVs, such as vgcreate or
vgextend, are not prevented from performing conflicting operations and
corrupting the PVs. See the
.B orphans
section for more information.
.
.IP \[bu]
.IP \[bu] 2
The system ID does not protect devices in a VG from programs other than LVM.
.
.IP \[bu]
.IP \[bu] 2
A host using an old LVM version (without the system ID feature) will not
recognize a system ID set in VGs. The old LVM can read a VG with a
system ID, but is prevented from writing to the VG (or its LVs).
The system ID feature changes the write mode of a VG, making it appear
read-only to previous versions of LVM.
.sp
This also means that if a host downgrades to the old LVM version, it would
lose access to any VGs it had created with a system ID. To avoid this,
the system ID should be removed from local VGs before downgrading LVM to a
version without the system ID feature.
.
.SS Types of VG access
.
A local VG is meant to be used by a single host.
.P
A shared or clustered VG is meant to be used by multiple hosts.
.P
These can be further distinguished as:
.
.TP
.B Unrestricted:
A local VG that has no system ID. This VG type is unprotected and
accessible to any host.
.
.TP
.B Owned:
A local VG that has a system ID set, as viewed from the host with a
matching system ID (the owner). This VG type is accessible to the host.
.
.TP
.B Foreign:
A local VG that has a system ID set, as viewed from any host with an
unmatching system ID (or no system ID). It is owned by another host.
This VG type is not accessible to the host.
.
.TP
.B Exported:
A local VG that has been exported with vgexport and has no system ID.
This VG type can only be accessed by vgimport which will change it to
owned.
.
.TP
.B Shared:
A shared or "lockd" VG has the lock_type set and has no system ID.
A shared VG is meant to be used on shared storage from multiple hosts,
and is only accessible to hosts using lvmlockd. Applicable only if LVM
is compiled with lvmlockd support.
.
.TP
.B Clustered:
A clustered or "clvm" VG has the clustered flag set and has no system ID.
A clustered VG is meant to be used on shared storage from multiple hosts,
and is only accessible to hosts using clvmd. Applicable only if LVM
is compiled with clvm support.
.
.SS Host system ID configuration
.
.SS Host system ID configuration
A host's own system ID can be defined in a number of ways. lvm.conf
global/system_id_source defines the method LVM will use to find the local
system ID:
.
.TP
.B none
.br
LVM will not use a system ID. LVM is allowed to access VGs without a
system ID, and will create new VGs without a system ID. An undefined
system_id_source is equivalent to none.
.sp
.I lvm.conf
.nf
global {
system_id_source = "none"
}
.fi
.
.TP
.B machineid
.br
The content of /etc/machine-id is used as the system ID if available.
See
.BR machine-id (5)
and
.BR systemd-machine-id-setup (1)
to check if machine-id is available on the host.
.sp
.I lvm.conf
.nf
global {
system_id_source = "machineid"
}
.fi
.
.TP
.B uname
.br
The string utsname.nodename from
.BR uname (2)
is used as the system ID. A uname beginning with "localhost"
is ignored and equivalent to none.
.sp
.I lvm.conf
.nf
global {
system_id_source = "uname"
}
.fi
.
.TP
.B lvmlocal
.br
The system ID is defined in lvmlocal.conf local/system_id.
.sp
.I lvm.conf
.nf
global {
system_id_source = "lvmlocal"
}
.fi
.sp
.I lvmlocal.conf
.nf
local {
system_id = "example_name"
}
.fi
.
.TP
.B file
.br
The system ID is defined in a file specified by lvm.conf
global/system_id_file.
.sp
.I lvm.conf
.nf
global {
@@ -236,125 +236,132 @@ global {
system_id_file = "/path/to/file"
}
.fi
.LP
Changing system_id_source will likely cause the system ID of the host to
change, which will prevent the host from using VGs that it previously used
(see extra_system_ids below to handle this.)
.P
If a system_id_source other than none fails to produce a system ID value,
it is the equivalent of having none. The host will be allowed to access
VGs with no system ID, but will not be allowed to access VGs with a system
ID set.
.
.SS Overriding system ID
.
In some cases, it may be necessary for a host to access VGs with different
system IDs, e.g. if a host's system ID changes, and it wants to use VGs
that it created with its old system ID. To allow a host to access VGs
with other system IDs, those other system IDs can be listed in
lvmlocal.conf local/extra_system_ids.
.P
.I lvmlocal.conf
.nf
local {
extra_system_ids = [ "my_other_name" ]
}
.fi
.P
A safer option may be configuring the extra values as needed on the
command line as:
.br
\fB--config 'local/extra_system_ids=["\fP\fIid\fP\fB"]'\fP
.
.SS vgcreate
.
In vgcreate, the host running the command assigns its own system ID to the
new VG. To override this and set another system ID:
.P
.B vgcreate --systemid
.I SystemID VG PVs
.P
Overriding the host's system ID makes it possible for a host to create a
VG that it may not be able to use. Another host with a system ID matching
the one specified may not recognize the new VG without manually rescanning
devices.
.P
If the --systemid argument is an empty string (""), the VG is created with
no system ID, making it accessible to other hosts (see warnings above.)
.
.SS report/display
.
The system ID of a VG is displayed with the "systemid" reporting option.
.P
Report/display commands ignore foreign VGs by default. To report foreign
VGs, the --foreign option can be used. This causes the VGs to be read
from disk.
.P
.B vgs --foreign -o +systemid
.P
When a host with no system ID sees foreign VGs, it warns about them as
they are skipped. The host should be assigned a system ID, after which
standard reporting commands will silently ignore foreign VGs.
.
.SS vgexport/vgimport
.
vgexport clears the VG system ID when exporting the VG.
.P
vgimport sets the VG system ID to the system ID of the host doing the
import.
.
.SS vgchange
.
A host can change the system ID of its own VGs, but the command requires
confirmation because the host may lose access to the VG being changed:
.P
.B vgchange --systemid
.I SystemID VG
.P
The system ID can be removed from a VG by specifying an empty string ("")
as the new system ID. This makes the VG accessible to other hosts (see
warnings above.)
.P
A host cannot directly change the system ID of a foreign VG.
.P
To move a VG from one host to another, vgexport and vgimport should be
used.
.P
To forcibly gain ownership of a foreign VG, a host can temporarily add the
foreign system ID to its extra_system_ids list, and change the system ID
of the foreign VG to its own. See Overriding system ID above.
.
.SS shared VGs
.
A shared VG has no system ID set, allowing multiple hosts to use it
via lvmlockd. Changing a VG to shared will clear the existing
system ID. Applicable only if LVM is compiled with lvmlockd support.
.
.SS clustered VGs
.
A clustered/clvm VG has no system ID set, allowing multiple hosts to use
it via clvmd. Changing a VG to clustered will clear the existing system
ID. Changing a VG to not clustered will set the system ID to the host
running the vgchange command.
.
.SS creation_host
.
In vgcreate, the VG metadata field creation_host is set by default to the
host's uname. The creation_host cannot be changed, and is not used to
control access. When system_id_source is "uname", the system_id and
creation_host fields will be the same.
.
.SS orphans
.
Orphan PVs are unused devices; they are not currently used in any VG.
Because of this, they are not protected by a system ID, and any host can
use them. Coordination of changes to orphan PVs is beyond the scope of
system ID. The same is true of any block device that is not a PV.
.
.SH SEE ALSO
.
.nh
.ad l
.BR vgcreate (8),
.BR vgchange (8),
.BR vgimport (8),
@@ -364,3 +371,4 @@ system ID. The same is true of any block device that is not a PV.
.BR lvm.conf (5),
.BR machine-id (5),
.BR uname (2)

File diff suppressed because it is too large Load Diff

View File

@@ -1,23 +1,19 @@
.TH "LVMVDO" "7" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
.
.SH NAME
.
lvmvdo \(em Support for Virtual Data Optimizer in LVM
.
.SH DESCRIPTION
.
VDO is software that provides inline
block-level deduplication, compression, and thin provisioning capabilities
for primary storage.
.P
Deduplication is a technique for reducing the consumption of storage
resources by eliminating multiple copies of duplicate blocks. Compression
takes the individual unique blocks and shrinks them.
These reduced blocks are then efficiently packed together into
takes the individual unique blocks and shrinks them. These reduced blocks are then efficiently packed together into
physical blocks. Thin provisioning manages the mapping from logical blocks
presented by VDO to where the data has actually been physically stored,
and also eliminates any blocks of all zeroes.
.P
With deduplication, instead of writing the same data more than once, VDO detects and records each
duplicate block as a reference to the original
block. VDO maintains a mapping from Logical Block Addresses (LBA) (used by the
@@ -25,33 +21,31 @@ storage layer above VDO) to physical block addresses (used by the storage
layer under VDO). After deduplication, multiple logical block addresses
may be mapped to the same physical block address; these are called shared
blocks and are reference-counted by the software.
.P
With compression, VDO compresses multiple blocks (or shared blocks)
with the fast LZ4 algorithm, and bins them together where possible so that
multiple compressed blocks fit within a 4 KB block on the underlying
storage. Mapping from LBA is to a physical block address and index within
it for the desired compressed data. All compressed blocks are individually
reference counted for correctness.
.P
Block sharing and block compression are invisible to applications using
the storage, which read and write blocks as they would if VDO were not
present. When a shared block is overwritten, a new physical block is
allocated for storing the new block data to ensure that other logical
block addresses that are mapped to the shared physical block are not
modified.
.P
To use VDO with \fBlvm\fP(8), you must install the standard VDO user-space tools
\fBvdoformat\fP(8) and the currently non-standard kernel VDO module
"\fIkvdo\fP".
.P
The "\fIkvdo\fP" module implements fine-grained storage virtualization,
thin provisioning, block sharing, and compression.
The "\fIuds\fP" module provides memory-efficient duplicate
identification. The user-space tools include \fBvdostats\fP(8)
for extracting statistics from VDO volumes.
.
.SH VDO TERMS
.
.TP
VDODataLV
.br
@@ -60,7 +54,6 @@ VDO data LV
A large hidden LV with the _vdata suffix. It is created in a VG
.br
used by the VDO kernel target to store all data and metadata blocks.
.
.TP
VDOPoolLV
.br
@@ -69,7 +62,6 @@ VDO pool LV
A pool for virtual VDOLV(s), which are the size of used VDODataLV.
.br
Only a single VDOLV is currently supported.
.
.TP
VDOLV
.br
@@ -78,14 +70,9 @@ VDO LV
Created from VDOPoolLV.
.br
Appears blank after creation.
.
.SH VDO USAGE
.
The primary methods for using VDO with lvm2:
.nr step 1 1
.
.SS \n[step]. Create a VDOPoolLV and a VDOLV
.
.SS 1. Create a VDOPoolLV and a VDOLV
Create a VDOPoolLV that will hold VDO data, and a
virtual size VDOLV that the user can use. If you do not specify the virtual size,
then the VDOLV is created with the maximum size that
@@ -94,25 +81,23 @@ deduplication or compression can happen
(i.e. it can hold the incompressible content of /dev/urandom).
If you do not specify the name of VDOPoolLV, it is taken from
the sequence of vpool0, vpool1 ...
.P
Note: The performance of TRIM/Discard operations is slow for large
volumes of VDO type. Please try to avoid sending discard requests unless
necessary because it might take considerable amount of time to finish the discard
operation.
.P
.nf
.B lvcreate --type vdo -n VDOLV -L DataSize -V LargeVirtualSize VG/VDOPoolLV
.B lvcreate --vdo -L DataSize VG
.fi
.P
.I Example
.nf
# lvcreate --type vdo -n vdo0 -L 10G -V 100G vg/vdopool0
# mkfs.ext4 -E nodiscard /dev/vg/vdo0
.fi
.
.SS \n+[step]. Convert an existing LV into VDOPoolLV
.
.SS 2. Convert an existing LV into VDOPoolLV
Convert an already created or existing LV into a VDOPoolLV, which is a volume
that can hold data and metadata.
You will be prompted to confirm such conversion because it \fBIRREVERSIBLY
@@ -121,92 +106,86 @@ formatted by \fBvdoformat\fP(8) as a VDO pool data volume. You can
specify the virtual size of the VDOLV associated with this VDOPoolLV.
If you do not specify the virtual size, it will be set to the maximum size
that can keep 100% incompressible data there.
.P
.nf
.B lvconvert --type vdo-pool -n VDOLV -V VirtualSize VG/VDOPoolLV
.B lvconvert --vdopool VG/VDOPoolLV
.fi
.P
.I Example
.nf
# lvconvert --type vdo-pool -n vdo0 -V10G vg/ExistingLV
.fi
.
.SS \n+[step]. Change the default settings used for creating a VDOPoolLV
.
.SS 3. Change the default settings used for creating a VDOPoolLV
VDO allows to set a large variety of options. Lots of these settings
can be specified in lvm.conf or profile settings. You can prepare
a number of different profiles in the \fI#DEFAULT_SYS_DIR#/profile\fP directory
a number of different profiles in the #DEFAULT_SYS_DIR#/profile directory
and just specify the profile file name.
Check the output of \fBlvmconfig --type default --withcomments\fP
for a detailed description of all individual VDO settings.
.P
.I Example
.nf
# cat <<EOF > #DEFAULT_SYS_DIR#/profile/vdo_create.profile
allocation {
.RS
vdo_use_compression=1
vdo_use_deduplication=1
vdo_use_metadata_hints=1
vdo_minimum_io_size=4096
vdo_block_map_cache_size_mb=128
vdo_block_map_period=16380
vdo_check_point_frequency=0
vdo_use_sparse_index=0
vdo_index_memory_size_mb=256
vdo_slab_size_mb=2048
vdo_ack_threads=1
vdo_bio_threads=1
vdo_bio_rotation=64
vdo_cpu_threads=2
vdo_hash_zone_threads=1
vdo_logical_threads=1
vdo_physical_threads=1
vdo_write_policy="auto"
vdo_max_discard=1
.RE
vdo_use_compression=1
vdo_use_deduplication=1
vdo_use_metadata_hints=1
vdo_minimum_io_size=4096
vdo_block_map_cache_size_mb=128
vdo_block_map_period=16380
vdo_check_point_frequency=0
vdo_use_sparse_index=0
vdo_index_memory_size_mb=256
vdo_slab_size_mb=2048
vdo_ack_threads=1
vdo_bio_threads=1
vdo_bio_rotation=64
vdo_cpu_threads=2
vdo_hash_zone_threads=1
vdo_logical_threads=1
vdo_physical_threads=1
vdo_write_policy="auto"
vdo_max_discard=1
}
EOF
.P
# lvcreate --vdo -L10G --metadataprofile vdo_create vg/vdopool0
# lvcreate --vdo -L10G --config 'allocation/vdo_cpu_threads=4' vg/vdopool1
.fi
.
.SS \n+[step]. Change the compression and deduplication of a VDOPoolLV
.
.SS 4. Change the compression and deduplication of a VDOPoolLV
Disable or enable the compression and deduplication for VDOPoolLV
(the volume that maintains all VDO LV(s) associated with it).
.P
.B lvchange --compression y|n --deduplication y|n VG/VDOPoolLV
.P
.nf
.B lvchange --compression [y|n] --deduplication [y|n] VG/VDOPoolLV
.fi
.I Example
.nf
# lvchange --compression n vg/vdopool0
# lvchange --deduplication y vg/vdopool1
.fi
.
.SS \n+[step]. Checking the usage of VDOPoolLV
.
.SS 5. Checking the usage of VDOPoolLV
To quickly check how much data on a VDOPoolLV is already consumed,
use \fBlvs\fP(8). The Data% field reports how much data is occupied
in the content of the virtual data for the VDOLV and how much space is already
consumed with all the data and metadata blocks in the VDOPoolLV.
For a detailed description, use the \fBvdostats\fP(8) command.
.P
Note: \fBvdostats\fP(8) currently understands only \fI/dev/mapper\fP device names.
.P
Note: \fBvdostats\fP(8) currently understands only /dev/mapper device names.
.I Example
.nf
# lvcreate --type vdo -L10G -V20G -n vdo0 vg/vdopool0
# mkfs.ext4 -E nodiscard /dev/vg/vdo0
# lvs -a vg
.P
LV VG Attr LSize Pool Origin Data%
vdo0 vg vwi-a-v--- 20.00g vdopool0 0.01
vdopool0 vg dwi-ao---- 10.00g 30.16
[vdopool0_vdata] vg Dwi-ao---- 10.00g
.P
# vdostats --all /dev/mapper/vg-vdopool0-vpool
/dev/mapper/vg-vdopool0 :
version : 30
@@ -214,88 +193,76 @@ Note: \fBvdostats\fP(8) currently understands only \fI/dev/mapper\fP device name
data blocks used : 79
...
.fi
.
.SS \n+[step]. Extending the VDOPoolLV size
.
.SS 6. Extending the VDOPoolLV size
You can add more space to hold VDO data and metadata by
extending the VDODataLV using the commands
\fBlvresize\fP(8) and \fBlvextend\fP(8).
The extension needs to add at least one new VDO slab. You can configure
the slab size with the \fB\%allocation/\:vdo_slab_size_mb\fP setting.
.P
the slab size with the \fBallocation/vdo_slab_size_mb\fP setting.
You can also enable automatic size extension of a monitored VDOPoolLV
with the \fBactivation/vdo_pool_autoextend_percent\fP and
\fB\%activation/\:vdo_pool_autoextend_threshold\fP settings.
.P
\fBactivation/vdo_pool_autoextend_threshold\fP settings.
Note: You cannot reduce the size of a VDOPoolLV.
.P
.nf
.B lvextend -L+AddingSize VG/VDOPoolLV
.P
.fi
.I Example
.nf
# lvextend -L+50G vg/vdopool0
# lvresize -L300G vg/vdopool1
.fi
.
.SS \n+[step]. Extending or reducing the VDOLV size
.
.SS 7. Extending or reducing the VDOLV size
You can extend or reduce a virtual VDO LV as a standard LV with the
\fBlvresize\fP(8), \fBlvextend\fP(8), and \fBlvreduce\fP(8) commands.
.P
Note: The reduction needs to process TRIM for reduced disk area
to unmap used data blocks from the VDOPoolLV, which might take
a long time.
.P
.nf
.B lvextend -L+AddingSize VG/VDOLV
.br
.B lvreduce -L-ReducingSize VG/VDOLV
.P
.fi
.I Example
.nf
# lvextend -L+50G vg/vdo0
# lvreduce -L-50G vg/vdo1
# lvresize -L200G vg/vdo2
.fi
.
.SS \n+[step]. Component activation of a VDODataLV
.
.SS 8. Component activation of a VDODataLV
You can activate a VDODataLV separately as a component LV for examination
purposes. The activation of the VDODataLV activates the data LV in read-only mode,
and the data LV cannot be modified.
If the VDODataLV is active as a component, any upper LV using this volume CANNOT
be activated. You have to deactivate the VDODataLV first to continue to use the VDOPoolLV.
.P
.I Example
.nf
# lvchange -ay vg/vpool0_vdata
# lvchange -an vg/vpool0_vdata
.fi
.
.SH VDO TOPICS
.
.nr step 1 1
.
.SS \n[step]. Stacking VDO
.
.SS 1. Stacking VDO
You can convert or stack a VDOPooLV with these currently supported
volume types: linear, stripe, raid, and cache with cachepool.
.
.SS \n+[step]. VDOPoolLV on top of raid
.
.SS 2. VDOPoolLV on top of raid
Using a raid type LV for a VDODataLV.
.P
.I Example
.nf
# lvcreate --type raid1 -L 5G -n vdopool vg
# lvconvert --type vdo-pool -V 10G vg/vdopool
.fi
.
.SS \n+[step]. Caching a VDOPoolLV
.
VDOPoolLV (accepts also VDODataLV volume name) caching provides a mechanism
.SS 3. Caching a VDODataLV or a VDOPoolLV
VDODataLV (accepts also VDOPoolLV) caching provides a mechanism
to accelerate reads and writes of already compressed and deduplicated
data blocks together with VDO metadata.
.P
.I Example
.nf
# lvcreate --type vdo -L 5G -V 10G -n vdo1 vg/vdopool
@@ -303,12 +270,10 @@ data blocks together with VDO metadata.
# lvconvert --cache --cachepool vg/cachepool vg/vdopool
# lvconvert --uncache vg/vdopool
.fi
.
.SS \n+[step]. Caching a VDOLV
.
.SS 4. Caching a VDOLV
VDO LV cache allow you to 'cache' a device for better performance before
it hits the processing of the VDO Pool LV layer.
.P
.I Example
.nf
# lvcreate --type vdo -L 5G -V 10G -n vdo1 vg/vdopool
@@ -316,14 +281,12 @@ it hits the processing of the VDO Pool LV layer.
# lvconvert --cache --cachepool vg/cachepool vg/vdo1
# lvconvert --uncache vg/vdo1
.fi
.
.SS \n+[step]. Usage of Discard/TRIM with a VDOLV
.
.SS 5. Usage of Discard/TRIM with a VDOLV
You can discard data on a VDO LV and reduce used blocks on a VDOPoolLV.
However, the current performance of discard operations is still not optimal
and takes a considerable amount of time and CPU.
Unless you really need it, you should avoid using discard.
.P
When a block device is going to be rewritten,
its blocks will be automatically reused for new data.
Discard is useful in situations when user knows that the given portion of a VDO LV
@@ -332,59 +295,55 @@ provisioning in other regions of the VDO LV.
For the same reason, you should avoid using mkfs with discard for
a freshly created VDO LV to save a lot of time that this operation would
take otherwise as device is already expected to be empty.
.
.SS \n+[step]. Memory usage
.
.SS 6. Memory usage
The VDO target requires 370 MiB of RAM plus an additional 268 MiB
per each 1 TiB of physical storage managed by the volume.
.P
UDS requires a minimum of 250 MiB of RAM,
which is also the default amount that deduplication uses.
.P
The memory required for the UDS index is determined by the index type
and the required size of the deduplication window and
is controlled by the \fBallocation/vdo_use_sparse_index\fP setting.
.P
With enabled UDS sparse indexing, it relies on the temporal locality of data
and attempts to retain only the most relevant index entries in memory and
can maintain a deduplication window that is ten times larger
than with dense while using the same amount of memory.
.P
Although the sparse index provides the greatest coverage,
the dense index provides more deduplication advice.
For most workloads, given the same amount of memory,
the difference in deduplication rates between dense
and sparse indexes is negligible.
.P
A dense index with 1 GiB of RAM maintains a 1 TiB deduplication window,
while a sparse index with 1 GiB of RAM maintains a 10 TiB deduplication window.
In general, 1 GiB is sufficient for 4 TiB of physical space with
a dense index and 40 TiB with a sparse index.
.
.SS \n+[step]. Storage space requirements
.
.SS 7. Storage space requirements
You can configure a VDOPoolLV to use up to 256 TiB of physical storage.
Only a certain part of the physical storage is usable to store data.
This section provides the calculations to determine the usable size
of a VDO-managed volume.
.P
The VDO target requires storage for two types of VDO metadata and for the UDS index:
.IP \(bu 2
.TP
\(bu
The first type of VDO metadata uses approximately 1 MiB for each 4 GiB
of physical storage plus an additional 1 MiB per slab.
.IP \(bu
.TP
\(bu
The second type of VDO metadata consumes approximately 1.25 MiB
for each 1 GiB of logical storage, rounded up to the nearest slab.
.IP \(bu
.TP
\(bu
The amount of storage required for the UDS index depends on the type of index
and the amount of RAM allocated to the index. For each 1 GiB of RAM,
a dense UDS index uses 17 GiB of storage and a sparse UDS index will use
170 GiB of storage.
.
.SH SEE ALSO
.
.nh
.ad l
.BR lvm (8),
.BR lvm.conf (5),
.BR lvmconfig (8),
@@ -396,9 +355,7 @@ a dense UDS index uses 17 GiB of storage and a sparse UDS index will use
.BR lvresize (8),
.BR lvremove (8),
.BR lvs (8),
.P
.BR vdo (8),
.BR vdoformat (8),
.BR vdostats (8),
.P
.BR mkfs (8)

Some files were not shown because too many files have changed in this diff Show More