1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 01:55:10 +03:00
Commit Graph

117 Commits

Author SHA1 Message Date
Zdenek Kabelac
679116a9b8 man: with internal build install cache, thin, vdo
Do not install .7 man pages when building --without internal segtype
support for types: cache, thin, vdo.
2021-04-19 14:37:08 +02:00
Zdenek Kabelac
dc934b13b9 man: use editline reference
When compiled with editline, refer this in man page as well
instead of readline.
2021-04-19 14:37:07 +02:00
Zdenek Kabelac
54f98c94b4 makefiles: generate only needed text
Avoid storing see_also & _end parts in  generated doc,
since these we can easily 'cat' while making man pages.
2021-04-19 14:37:07 +02:00
Zdenek Kabelac
adfdfd9c58 makefiles: improved hyphenation replacement
Sed replacements script missed to properly replace several '-' to '\-'.
Replace it with simpler set of regexes.

Also add new target 'make checksed' for testing with examples,
where the replacement should or should not occure for easier testing.
2021-04-19 14:37:07 +02:00
Zdenek Kabelac
0004ffa73a makefiles: fix replacing path for LVM_PATH
Man pages were generated with incorrect LVM_PATH.
2021-04-14 10:53:34 +02:00
Zdenek Kabelac
f5efe1beb5 makefiles: no need for double Q
We already use $(Q) while calling macros
2021-04-12 09:54:16 +02:00
Zdenek Kabelac
39eee85fff makefiles: better logging
Show only filename instead of full path name when building
in builddir != srcdir
2021-03-02 22:54:40 +01:00
Zdenek Kabelac
520bd9356e makefiles: simplify and cleanup
Print all installed man pages with INSTALL
Simplify distclean handling.
2021-03-02 22:54:40 +01:00
David Teigland
83fe6e720f device usage based on devices file
The LVM devices file lists devices that lvm can use.  The default
file is /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.  When the devices file is in use,
the regex filter is not used, and the filter settings in lvm.conf
or on the command line are ignored.

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.  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.

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.

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.

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 set of 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.

Setting --devicesfile "" causes lvm to not use a devices file.

An existing, empty devices file means lvm will see no devices.

The new command vgimportdevices adds PVs from a VG to the devices
file and updates the VG metadata to include the device IDs.
vgimportdevices -a will import all VGs into the system devices file.

LVM commands run by dmeventd not use a devices file by default,
and will look at all devices on the system.  A devices file can
be created for dmeventd (/etc/lvm/devices/dmeventd.devices)  If
this file exists, lvm commands run by dmeventd will use it.

Internal implementaion:

- device_ids_read - read the devices file
  . add struct dev_use (du) to cmd->use_devices for each devices file entry
- dev_cache_scan - get /dev entries
  . add struct device (dev) to dev_cache for each device on the system
- device_ids_match - match devices file entries to /dev entries
  . match each du on cmd->use_devices to a dev in dev_cache, using device ID
  . on match, set du->dev, dev->id, dev->flags MATCHED_USE_ID
- label_scan - read lvm headers and metadata from devices
  . filters are applied, those that do not need data from the device
  . filter-deviceid skips devs without MATCHED_USE_ID, i.e.
    skips /dev entries that are not listed in the devices file
  . read lvm label from dev
  . filters are applied, those that use data from the device
  . read lvm metadata from dev
  . add info/vginfo structs for PVs/VGs (info is "lvmcache")
- device_ids_find_renamed_devs - handle devices with unstable devname ID
  where devname changed
  . this step only needed when devs do not have proper device IDs,
    and their dev names change, e.g. after reboot sdb becomes sdc.
  . detect incorrect match because PVID in the devices file entry
    does not match the PVID found when the device was read above
  . undo incorrect match between du and dev above
  . search system devices for new location of PVID
  . update devices file with new devnames for PVIDs on renamed devices
  . label_scan the renamed devs
- continue with command processing
2021-02-23 16:43:32 -06:00
Zdenek Kabelac
21742c3f3d man: initial man page for VDO support
Basic lvm2 command support for VDO.
2019-01-21 12:39:23 +01:00
David Teigland
1c0b02e367 man: remove lvmetad 2018-11-13 16:22:34 -06:00
David Teigland
c203ce7f86 man: remove clvmd man page 2018-11-13 16:17:17 -06:00
David Teigland
19a59cc53c More cleanup needed for dropped scripts
and drop the lvm2 prefix from lvmlockd service
2018-09-13 11:09:25 -05:00
Zdenek Kabelac
9d2b9e5bc6 man: stop installing clvmd man page 2018-06-15 00:46:08 +02:00
Joe Thornber
2bc896f2a3 build: remove --with-{snapshots,mirrors,raid,thin,cache} options from ./configure
It now behaves as if the were all set as 'internal'
2018-04-30 10:11:23 +01:00
Joe Thornber
7a475bef32 [build] Quieten the build down
It was hard to see warnings with the long command lines scrolling by so
quickly.

Use 'make V=1' if you need to see all the gritty details.
2018-04-20 11:10:45 -05:00
Zdenek Kabelac
0c68c19c32 man: Makefiles with V=1 support
Generation of man pages is generating lot of barely readable output.
For normal build quietize this a bit.

For original verbose build start to use  'make V=1'
(just like i.e. linux kernel does)

TODO: apply at more places...
2017-10-27 17:05:15 +02:00
Zdenek Kabelac
95dd5bc7fb configure: tune BUILD_DMEVENTD
Drop 'DMEVENT' make variable and use  BUILD_DMEVENTD like with other daemons.
NOTE: by default we do not build dmeventd - maybe time to change
as lot of build targets basically do need dmeventd...

Switch to use SYSTEMD_LIBS and avoid linking systemd library with
every linked tool when dbus notification are enabled.
(TODO  add missing testing for lib presence)
2017-08-01 18:17:06 +02:00
Zdenek Kabelac
2232e82d25 makefiles: fixing linking
Avoid adding -g more then once for debug builds.
Avoid enabling  DEBUG_MEM when we build multithreaded tools.
Link executables with -fPIE -pie and --export-dynamic LDFLAGS
Introduce PROGS_FLAGS to add option to pass flags for external libs.
Link  lvm2 internally library only when really used.
Link DAEMON_LIBS with daemons.
Pass VALGRIND_CFLAGS internally
Set shell failure mode on couple places.
2017-08-01 11:53:30 +02:00
Zdenek Kabelac
c1b5f38bbe man: fix generated paths
Use user configured paths instead of some developers paths ;)
2017-08-01 11:53:11 +02:00
Alasdair G Kergon
658d524d26 configure: Fix notify-dbus and dmfilemapd options. 2017-04-18 20:37:53 +01:00
Heinz Mauelshagen
e7ec9aab8a man: '-pool' regexp 2017-04-04 23:53:28 +02:00
Heinz Mauelshagen
99dc49c7dd man: add minor regexp 2017-03-30 17:54:02 +02:00
Heinz Mauelshagen
e9921ffd33 man: use variable in Makefile / regexp 2017-03-30 00:44:35 +02:00
Zdenek Kabelac
a66411bd7a man: fix type
With commit 4af09a94bd unwanted rename  of
target happened - restore it.
2017-03-30 00:38:41 +02:00
Heinz Mauelshagen
5012be326d man: ranges/LV names/symbolic use regexp 2017-03-29 02:27:10 +02:00
Heinz Mauelshagen
4af09a94bd man: simplify by avoiding different headers on de-duplication of lvmconfig, lvm-config and lvm-dumpconfig 2017-03-29 01:44:09 +02:00
Heinz Mauelshagen
6742137964 man: de-duplicate lvmconfig, lvm-config and lvm-dumpconfig manuals 2017-03-29 00:22:15 +02:00
Heinz Mauelshagen
3aab873199 man: regexp readability / use $(SED) 2017-03-28 17:51:22 +02:00
Heinz Mauelshagen
7f31261844 man: enhance man postprocessing regexp 2017-03-28 00:17:43 +02:00
Heinz Mauelshagen
36cac41115 man-generator/man/help: simplify hyphen escaping
Commits a29bb6a14b
    ... 5c199d99f4
narrowed down on addressing the escaping of hyphens
in the dynamic creation of manuals whilst avoiding
them in creating help texts.  This lead to a sequence
of slipping through hyphens adrressed by additional
patches in aforementioned commit series.

On the other hand, postprocessing dynamically man-generator
created and statically provided manuals catches all hyphens
in need of escaping.

Changes:
- revert the above commits whilst keeping man-generator
  streamlining and the detection of any '\' when generating
  help texts in order to avoid escapes to slip in

- Dynamically escape hyphens in manaual pages using sed(1)
  in the respective Makefile targets

- remove any manually added escaping on hyphens from any
  static manual sources or headers
2017-03-27 16:49:39 +02:00
Heinz Mauelshagen
93467f0d9f man: revert erouneous '-' escapes in Makefine.in 2017-03-24 01:39:50 +01:00
Heinz Mauelshagen
a29bb6a14b man: escape all double '-' 2017-03-24 01:03:58 +01:00
Alasdair G Kergon
5e7bc8d854 man: Build man-generator in tools dir.
Use ln to make a copy of command.c for compilation with different DEFS
then handle dependencies the normal way.
2017-03-16 23:10:40 +00:00
Alasdair G Kergon
270ed9bc90 man: Preserve template variables in pre-generated pages. 2017-03-16 23:08:59 +00:00
Marian Csontos
a4a6a7a526 man: Make dmfilemapd.8 optional 2017-03-16 12:26:51 +01:00
Marian Csontos
affe055462 man: Handle empty MAN8GENERATED 2017-03-16 11:35:08 +01:00
Alasdair G Kergon
8ef93c756e man: Include lvmchange/lvmsar/lvmsadc content in lvm.8
Remove separate lvmchange man page as the external command has also been
removed.
2017-03-16 02:09:51 +00:00
Alasdair G Kergon
f536c53aee man: specify man-generator path 2017-03-15 01:36:12 +00:00
Alasdair G Kergon
ca905681cc man: Revise internal man page generation process.
For each section 8 man page, a .8_gen file is created from one of:
  .8_main            - Old-style man page - content used directly
  .8_des and .8_end  - Description and end section of a generated page
  .8_pregen	     - Pre-generated page used if the generator fails

Other man sections are not generated and use the suffix .5_main or .7_main.

Developers should use 'make generate' to regenerate the .8_pregen files.
2017-03-14 00:47:46 +00:00
Bryn M. Reeves
044f92e466 man: add dmfilemapd.8 2017-03-09 18:50:15 +00:00
David Teigland
62abae1525 man: put some commands into advanced usage section
and separate commands with --
2017-03-01 10:22:48 -06:00
David Teigland
698abdde16 generate man pages 2017-02-13 10:31:23 -06:00
Peter Rajnoha
06c7220f78 man: add lvmreport man page 2016-09-12 14:11:39 +02:00
Alasdair G Kergon
1768ca599b man: Only install lvmraid when needed. 2016-09-12 13:03:09 +01:00
David Teigland
a54f073af8 man lvmraid: install 2016-09-06 15:20:43 -05:00
Peter Rajnoha
6fcfa2855b man: add lvm fullreport man page 2016-08-09 18:49:11 +02:00
Alasdair G Kergon
5987562cf9 lvmdbus: Add new daemon. 2016-02-17 23:53:35 +00:00
Zdenek Kabelac
fcbef05aae doc: change fsf address
Hmm rpmlint suggest fsf is using a different address these days,
so lets keep it up-to-date
2016-01-21 12:11:37 +01:00
Alasdair G Kergon
548c09acfc man: Add all_man Makefile target.
Use 'make all_man' to generate all man pages (regardless of
configuration options) or 'make install_all_man' to install them.
2015-09-15 13:14:16 +01:00