1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-11-30 04:23:48 +03:00
Commit Graph

1214 Commits

Author SHA1 Message Date
Zdenek Kabelac
0ebea8ec6a make: generate 2025-11-14 11:19:15 +01:00
Zdenek Kabelac
e2cf605037 man: update pvmove for pvmove_max_segment_size_mb 2025-11-14 10:14:28 +01:00
David Teigland
9cccfe9c69 man: update lvmdevices refresh info 2025-11-12 15:25:53 -06:00
Zdenek Kabelac
704ed0cdcd make: generate 2025-11-12 13:47:47 +01:00
David Teigland
91d9178c0e man: update lvmdevices 2025-11-11 11:50:24 -06:00
Zdenek Kabelac
9578b3129c make: generate 2025-11-06 16:36:30 +01:00
David Teigland
721db42a12 vgs: add VG attr character for persistent reservations
Expand VG attr string from 6 to 7 characters.  The new
character 7 is related to persistent reservations:

 P: PR is required, but is not started
 p: PR is required, and is started
2025-11-05 10:49:28 -06:00
David Teigland
b60ae7b9fe lvmlockd: use persistent reservations for recovery with sanlock
The process of using persistent reservations for recovery:

host A owns a lock
host A fails
host B requests the lock
host B request fails because A owns the lock
host A enters the FAIL state in sanlock
host B retries the lock, and sees owner A is failed
host B runs lvmpersist to remove the PR key of host A
host B tells sanlock that host A is dead
host B retries the lock, which is now granted by sanlock

The new option: --setlockargs persist,notimeout
adds "persist" and "notimeout" components to the
lock_args string in the VG metadata, viewable with
vgs -o+lockargs.  The option is available in vgcreate
or vgchange.

. "persist" tells lvmlockd to remove the PR key of
  a failed host, by running lvmpersist, and set the
  sanlock host state to "dead".

. "notimeout" tells lvmlockd to configure sanlock
  leases to not time out.  sanlock does not use the
  watchdog to protect leases that do not time out.

With this combination, PR removal replaces the watchdog
for fencing hosts with expired leases that are blocking
other hosts.

The lock_args version component is "2.0.0" when
these new settings are used, otherwise remains
"1.0.0".  Previous lvm versions will not start a
VG with lockargs version 2.

Requires sanlock version 4.2.0 or later.
2025-11-05 10:49:22 -06:00
Zdenek Kabelac
11bdb60cb4 make: generate 2025-11-03 17:25:57 +01:00
David Teigland
accd281403 lvmlockd: vgsplit is not supported
The shared VG restriction was mistakenly removed in
commit 550536474f.
2025-10-28 13:29:30 -05:00
Zdenek Kabelac
c96312fe02 man: remove spaces at eol 2025-10-26 22:15:52 +01:00
Zdenek Kabelac
7a18fc86ce man: keep page ascii
Drop utf8 characters.  Can be captured with:

$ grep -r -P '[^\x00-\x7f]'

Converted with:

$ iconv -f utf-8 -t ascii//TRANSLIT file > file_ascii
2025-10-26 22:10:55 +01:00
David Teigland
64fad1d1da persist: do not use pr_key config setting for sanlock VGs v2
Use only hostid-based PR keys for sanlock VGs.
This will be required for PR-based recovery with sanlock.

Changes how persist_start() is used to update an existing key.
Previously, the updated key was passed to persist_start as if
it was the local pr_key setting.  It's now passed as a separate
parameter.

This also fixes an incorrect warning in vgchange --persist check
when checking a hostid-based key while the lockspace is stopped.
2025-10-06 13:13:11 -05:00
David Teigland
5893794a19 Revert "persist: do not use pr_key config setting for sanlock VGs"
This reverts commit 038af21fa1.
2025-10-06 12:48:00 -05:00
David Teigland
038af21fa1 persist: do not use pr_key config setting for sanlock VGs
Use only hostid-based PR keys for sanlock VGs.
This will be required for PR-based recovery with sanlock.
2025-10-06 09:46:03 -05:00
David Teigland
f15d948720 man lvmlockd: updates
Major rewrite of the beginning description/setup/introduction.
2025-09-23 11:19:13 -05:00
Zdenek Kabelac
d73b1ecf4b make: generate 2025-09-20 14:37:58 +02:00
Zdenek Kabelac
622d222b1f make: generate 2025-09-19 14:49:41 +02:00
David Teigland
687b1a780f persist: support --setpersist in vgcreate
Previously, setpersist was only supported in vgchange
on an existing VG.  The PR is acquired exclusively before
the devices are modified, and in the case of a shared
VG the PR is subsequently changed to a shared mode.
2025-09-17 15:46:54 -05:00
Arnout Engelen
6013977043 man: simplify vmautoactivation(7)
Previously this was hard-coded to: "Autoactivation commands use a number
of temp files in /run/lvm (with the expectation that /run is cleared
between boots.)"

Since c1bfc8737f it was made more generic,
but on some systems this logic leads to "Autoactivation commands use a
number of temp files in /run/lvm (with the expectation that /var/run
is cleared between boots)." which I'd say adds more confusion than it
solves.
2025-09-16 15:31:26 +00:00
Zdenek Kabelac
09ceb425b7 make: generate 2025-09-12 14:23:35 +02:00
Zdenek Kabelac
b9e6337f04 codespell: typos 2025-09-11 16:18:19 +02:00
David Teigland
47118a45bd man lvmpersist: shared VGs with locktype dlm work with PR 2025-08-25 12:39:39 -05:00
David Teigland
8dcdcc54b4 man lvmpersist: improve description 2025-08-25 10:55:09 -05:00
Peter Rajnoha
881df5e071 tools: allow --reportformat for pv/vg/lvdisplay log report
The pv/vg/lvdisplay (without -C|--columns) does not use the reporting
mode for the output. However, we can still allow the --reportformat
option for these commands, but it will affect only the log report,
like we have for other non-reporting lvm commands
(e.g. lvchange,vgchange...).
2025-08-19 10:54:21 +02:00
Peter Rajnoha
e04e784575 make: generate 2025-08-13 13:10:11 +02:00
Zdenek Kabelac
d9063048cb dmeventd: add thread grace period for monitoring
Add thread reuse mechanism to reduce overhead when devices are frequently
registered/unregistered by introducing a configurable grace period where
monitoring threads wait for potential reuse before termination.

Key changes:
- Add -g option to configure grace period (0-300 seconds, default: 10s)
- Introduce DM_THREAD_GRACE_PERIOD state for threads awaiting reuse
- Implement thread reuse for matching device/dso combinations
- Add pthread condition variables and mutexes for grace period synchronization
- Add thread usage counter and enhanced debug logging
- Add _reset_pending_signal() to handle SIGALRM cleanup on thread reuse
- Refactor _monitor_thread() to support grace period workflow
- Update timeout thread to skip non-running threads
- Simplify thin plugin logging

This optimization significantly reduces thread creation/destruction overhead
in scenarios with rapid device registration/unregistration cycles, such as
creating snapshots of thin volumes, while maintaining proper cleanup and
thread safety.
2025-07-31 00:46:38 +02:00
David Teigland
c705eda4ad vgextend: fix dev_read_reservation message
Common vgextend commands were logging a message about
dev_read_reservation when PR was not being used.

Only attempt PR work from vgextend when either the
PR require or autostart settings are enabled on the VG.
2025-07-28 13:35:16 -05:00
Peter Rajnoha
f4398897a8 man: add note about return codes for LV resize with and without FS resize 2025-07-24 10:52:53 +02:00
Zdenek Kabelac
04d75d7a63 make: generate 2025-07-13 20:55:43 +02:00
Zdenek Kabelac
296fcd4c79 man: fix some typos and grammar issues
Drop misplaced letter 'I'.
Missing articles (a, an, the)
Incorrect prepositions (in/into, to/in)
Subject-verb agreement errors.
Awkward phrasing that needs smoothing.
Fixed prepositions ("prior to" instead of "prior the")
Corrected subject-verb agreement ("are becoming" instead of "is becoming")
Fixed word choices ("represents" instead of "presents")
Used consistent terminology ("environment" instead of "environmental")
Fixed pronoun references ("them" instead of "it" when referring to plural subjects)

Originated-by: warp-terminal
2025-07-13 20:55:43 +02:00
Zdenek Kabelac
c2cca24ff0 make: generate 2025-06-27 10:26:00 +02:00
Zdenek Kabelac
6e0fa754be man: install lvmpersist page 2025-06-27 10:26:00 +02:00
David Teigland
e3871db279 persistent reservations
Enable lvm to use persistent reservations on a VG, which
are applied to each PV in the VG.

. lvmpersist is a low level script, which uses commands
  sg_persist, mpathpersist, and nvme to do PR operations
  on devices. This script is used by higher level lvm
  commands, and would not often be run by users.

. vgchange --setpersist is a VG metadata configuration command
  that specifies how PR should be started and enforced for a VG
  relative to other lvm commands.

. vgchange --persist is a command to change PR state of PVs in
  the VG, e.g. start PR to register and reserve.

The lvmpersist man page contains a complete description.
2025-06-27 10:26:00 +02:00
Zdenek Kabelac
63c6a2629a man: fix ellipsis formatting
(use \&... instead of ... for proper troff rendering)
in lvmlockd, lvmreport, lvmvdo man pages
2025-06-25 22:48:42 +02:00
Zdenek Kabelac
c117dde67a man: remove quotes from section headers
Remove unnecessary quotes from section headers in man pages:
- lvm_import_vdo.8_main: .SH "NAME" -> .SH NAME
- fsadm.8_main: .SH "NAME" -> .SH NAME

This improves consistency and follows man page conventions.

Originated-by: Cursor AI
2025-06-25 22:48:42 +02:00
Zdenek Kabelac
26154af9e4 man: fix company name formatting (missing comma)
Fix company name format in .TH headers by adding missing comma:
- dmeventd.8_main: 'Red Hat Inc' -> 'Red Hat, Inc.'
- cmirrord.8_main: 'Red Hat Inc' -> 'Red Hat, Inc.'
- lvmpolld.8_main: 'Red Hat Inc' -> 'Red Hat, Inc.'
- lvmdbusd.8_main: 'Red Hat Inc' -> 'Red Hat, Inc.'
- lvm_import_vdo.8_main: 'Red Hat, Inc' -> 'Red Hat, Inc.'
- lvmlockctl.8_main: 'Red Hat, Inc' -> 'Red Hat, Inc.'
- lvmcache.7_main: 'Red Hat, Inc' -> 'Red Hat, Inc.'
- lvmvdo.7_main: 'Red Hat, Inc' -> 'Red Hat, Inc.'
- blkdeactivate.8_main: 'Red Hat, Inc' -> 'Red Hat, Inc.'
- lvmthin.7_main: 'Red Hat, Inc' -> 'Red Hat, Inc.'
- lvmreport.7_main: 'Red Hat, Inc' -> 'Red Hat, Inc.'
- lvmsadc.8_main: 'Red Hat, Inc' -> 'Red Hat, Inc.'
- lvmautoactivation.7_main: 'Red Hat, Inc' -> 'Red Hat, Inc.'
- lvmlockd.8_main: 'Red Hat, Inc' -> 'Red Hat, Inc.'
- fsadm.8_main: 'Red Hat, Inc' -> 'Red Hat, Inc.'
- lvmraid.7_main: 'Red Hat, Inc' -> 'Red Hat, Inc.'
- lvmsystemid.7_main: 'Red Hat, Inc' -> 'Red Hat, Inc.'
- lvmsar.8_main: 'Red Hat, Inc' -> 'Red Hat, Inc.'

This ensures consistent company name formatting across all man pages.

Originated-by: Cursor AI
2025-06-25 22:48:42 +02:00
Zdenek Kabelac
6b61dea9bb man: fix English grammar and style issues
- cmirrord.8_main: Remove unnecessary article 'the' before 'corosync'
- dmsetup.8_main: Fix multiple grammar and punctuation issues
  * Add missing 'to' in 'Set this to zero to continue'
  * Fix 'eg,' -> 'e.g.,' and add missing comma
  * Add missing 'the' in 'for the live device'
  * Fix 'customised by following options' -> 'customised by the following options'
  * Fix 'comma-separate' -> 'comma-separated'
- fsadm.8_main: Improve sentence structure for dm-crypt description
- lvm.8_main: Fix capitalization 'volume Groups' -> 'Volume Groups'
- lvm_import_vdo.8_main: Fix header title and multiple grammar issues
  * Fix header title 'FSADM' -> 'LVM_IMPORT_VDO'
  * Fix 'LV a backend device' -> 'LV as a backend device'
  * Fix 'the of volume group' -> 'the name of the volume group'
  * Remove extra 'with' in 'with within volume group'
- lvmsystemid.7_main: Fix punctuation 'e.g.' -> 'e.g.,' and 'i.e.' -> 'i.e.,'

These changes improve grammatical correctness, consistency, and readability.

Originated-by: Cursor AI
2025-06-25 22:48:42 +02:00
Zdenek Kabelac
95585bc2fa man: fix grammar and spelling issues
- dmeventd.8_main: Fix verb form 'present' -> 'presents' and spelling
  'free recover' -> 'recover free'
- dmfilemapd.8_main: Fix missing preposition
  'mode the daemon' -> 'mode of the daemon'
- dmstats.8_main: Fix American spelling 'Capitalise' -> 'Capitalize'
- lvmcache.7_main: Fix missing article
  'writecache block size' -> 'a writecache block size'

These changes improve grammatical correctness and consistency.

Originated-by: Cursor AI
2025-06-25 22:48:42 +02:00
Zdenek Kabelac
22364ce9b6 man: update raid man
Mention repair of transiently lost devices.
2025-05-12 15:07:49 +02:00
Zdenek Kabelac
480bf01936 make: generate 2025-04-28 14:19:18 +02:00
Zdenek Kabelac
c1bfc8737f man: updates and typography
Manually enhance pages for thin, cache, raid, vdo.

Replace usage of .HP with .TP when it makes sense (but keep .HP
where so far we don't have replacement giving same visual results).

Use .CMS, .CME  macros in dmsetup/dmstats so it easy to switch
But keep using .HP when the rendering looks simply better in terminal
although HTML output does not looks that well - so we may eventually
switch here to .TP.

For basic command synopsis use .NSY macro that will
use .SY for graphical rendering (postscript/pdf) but keep
using .TP for ASCII terminal output, as here many HTML renderers
are emitting unreadable pages.

For options use '\ ' (non-breakable space) between option and
its argument and option are not across line.

Reformat lines to fit in 80 columns.

Use  .EX .. .EE  for example output - this improves
character alignment for poststrict/pdf rendering as
it use monospace fonts (unlike .nf .. .fi).
Also with Example section never let the line being with space
and use '\' for such line.
If the Example line should being with '.' it needs to be
prefix with \&.
Add .nf/.fi macros for cases where .EX & .EE are undefined
(this happens i.e. with man2html)

Avoid use of tables (.TS .. .TE) as HTML renderers often use
images (.png) files for such tables and this does not scale well
when user changes font size in browser.
(and the large/long table were split into 2 pieces
so it does fit to 80 columns).

Use .MT .ME for emails.

Use .UR .UE. for URL.

Use  .\|.\|.\& as sequence of 3 dots and add \& to not create end of
sentence and possibly wrong alignment.

On lines starting with .BR & .IR avoid using \fB \fI as this
can cause problem when i.e. html rendered may keep use
italic bold when just italic was really wanted.

When using series of .TP/.IP - set the size only with the
first tag - and let renderer align others to match the column.

Correct some small typographical rendering issues.

Rendering was evaluated for readable results with:
- mandoc -T html  (-O style=mandoc.css)
- groff  -Thtml -mman
- man2html
- man -Thtml
- man -Tps
- man

Unfortunatelly various g/troff troubles are with each of them,
so we need to select usage of macros in a way, that is not mangling
results for above engines.
2025-04-28 14:19:18 +02:00
Zdenek Kabelac
26e86f9da9 make: generate 2025-04-01 15:37:36 +02:00
Peter Rajnoha
0c970d8ec7 man: lvmreport: update parts about string list selection 2025-03-25 10:25:08 +01:00
Zdenek Kabelac
06baec439e make: generate 2025-03-17 13:52:03 +01:00
Zdenek Kabelac
fe1cf7174f makefile: rebuild man when see_also changes
Missed rebuild dependency, when see_also file changes.
2025-03-17 13:48:58 +01:00
Eric Blake
a853649565 misc: Typo fix s/more then/more than/
Also a few instances of s/less then/less than/.

Signed-off-by: Eric Blake <eblake@redhat.com>
2025-02-26 10:32:19 +00:00
Zdenek Kabelac
9197880050 make: generate 2025-02-26 01:31:50 +01:00
Zdenek Kabelac
ba9c4368f4 man: updates
Updates for 'mandot -T lint'
Fit lines into 80 characters.
Use  .na .ad   instead of  .ad l  .ad b
Remove some misplaced  .P  & .br
Trim spaces for EOL.
2025-02-26 01:27:15 +01:00
Salvatore Bonaccorso
36bdffb6a4 man: clarify --stripes number of device
The current manpage is unclear in the example of a raid10 type LV RAID
with --mirrors 1 --stripes 4. The number of devices in each raid1 mirror
is NumberStripes/(NumberMirrors+1). Thus the example should read:

e.g. mirrors 1 and stripes 4 will stripe data across two raid1
mirrors, where each mirror contains two devices.

Fixes: https://gitlab.com/lvmteam/lvm2/-/issues/26
Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
2025-02-25 01:10:04 +01:00