]> sourceware.org Git - lvm2.git/log
lvm2.git
7 years agoWHATS_NEW: add entry
Zdenek Kabelac [Wed, 22 Feb 2017 14:20:23 +0000 (15:20 +0100)]
WHATS_NEW: add entry

7 years agoman/help: enclose each option in brackets
David Teigland [Tue, 21 Feb 2017 20:59:52 +0000 (14:59 -0600)]
man/help: enclose each option in brackets

Placing [] around each individual option is the most
common style, and it improves the readability.

7 years agoman/help: use separate common option lists
David Teigland [Tue, 21 Feb 2017 20:32:54 +0000 (14:32 -0600)]
man/help: use separate common option lists

There are two kinds of common options:
1. options common to all variants of a given command name
2. options common to all lvm commands

Previously, both kinds of common options were listed together
under "Common options".  Now the first are printed under
"Common options for command" (when needed), and the second
are printed under "Common options for lvm" (always).

7 years agoman: teaking output format
David Teigland [Tue, 21 Feb 2017 18:05:36 +0000 (12:05 -0600)]
man: teaking output format

7 years agocommands: adjust default help output
David Teigland [Tue, 21 Feb 2017 17:40:51 +0000 (11:40 -0600)]
commands: adjust default help output

Remove the "usage notes" which should just
live in the man pages.

When there are 3 or more variants of a command,
print all the options produces a lot of output,
so require --longhelp to print all the options
in these cases.

7 years agoman lvm: update see also list
David Teigland [Tue, 21 Feb 2017 17:13:23 +0000 (11:13 -0600)]
man lvm: update see also list

add several missing references
remove references to lvmdiskscan lvmchange

7 years agoman: expand type option description
David Teigland [Tue, 21 Feb 2017 17:09:01 +0000 (11:09 -0600)]
man: expand type option description

7 years agodmsetup: Indicate device repetition in usage summaries.
Alasdair G Kergon [Tue, 21 Feb 2017 11:25:18 +0000 (11:25 +0000)]
dmsetup: Indicate device repetition in usage summaries.

7 years agotests: some debug code
Zdenek Kabelac [Tue, 21 Feb 2017 08:40:21 +0000 (09:40 +0100)]
tests: some debug code

Checking if --deferred would make it any faster - but it's as slow
as without this new optional flag anyway (4.10).

7 years agotests: ensure first call is version test
Zdenek Kabelac [Tue, 21 Feb 2017 08:38:49 +0000 (09:38 +0100)]
tests: ensure first call is version test

Check 'dmsetup version'  is called before starting any more
advanced logic in $DM_DEV_DIR.

Call also replaces mkdir as it creates needed path with control node.

7 years agotests: make sure which PV is used for allocation
Zdenek Kabelac [Tue, 21 Feb 2017 08:38:04 +0000 (09:38 +0100)]
tests: make sure which PV is used for allocation

7 years agotests: paralelize creation and teardown
Zdenek Kabelac [Mon, 20 Feb 2017 23:49:49 +0000 (00:49 +0100)]
tests: paralelize creation and teardown

To speedup initial construction and destruction of test devices
(mainly in case more then 1 is needed)  call dmsetup
in parallel.

7 years agotests: use exclusive activation for mirror
Zdenek Kabelac [Mon, 20 Feb 2017 22:50:27 +0000 (23:50 +0100)]
tests: use exclusive activation for mirror

Test suite does not support clustered mirroring.

7 years agoman: use .HP instead of .TP
David Teigland [Mon, 20 Feb 2017 23:10:11 +0000 (17:10 -0600)]
man: use .HP instead of .TP

7 years agoman/help: print general raid type as "raid"
David Teigland [Mon, 20 Feb 2017 21:41:24 +0000 (15:41 -0600)]
man/help: print general raid type as "raid"

Instead of printing "raid*".  There are already
notes mentioning that "raid" refers to "raid<N>"

7 years agoman vgchange/lvchange: note special option usage
David Teigland [Mon, 20 Feb 2017 21:26:24 +0000 (15:26 -0600)]
man vgchange/lvchange: note special option usage

7 years agoman lvcreate: add special option notes at the start
David Teigland [Mon, 20 Feb 2017 21:17:10 +0000 (15:17 -0600)]
man lvcreate: add special option notes at the start

The --name, --size, --extents options deserve a special
note at the start of the man page, before appearing in
the usage section.

7 years agoman: add variables descriptions
David Teigland [Mon, 20 Feb 2017 21:09:02 +0000 (15:09 -0600)]
man: add variables descriptions

Add a section describing variables.

In the full options list, include common
options in the alphabetical listing instead
of at the end.

7 years agolvresize/lvextend: accept type option
David Teigland [Mon, 20 Feb 2017 17:23:46 +0000 (11:23 -0600)]
lvresize/lvextend: accept type option

The --type option has previously been accepted for
lvresize/lvextend.  Using it did not affect the operation
of the command.  The value was simply verified as matching
the current seg type of the LV.

7 years agotests: update lvresize testing
Zdenek Kabelac [Sun, 19 Feb 2017 21:59:21 +0000 (22:59 +0100)]
tests: update lvresize testing

Add missing tests for some lvresize acceptable options.

7 years agocleanup: simplier code
Zdenek Kabelac [Sat, 18 Feb 2017 18:46:22 +0000 (19:46 +0100)]
cleanup: simplier code

Already know string is 'lvm-' so use name[3].

7 years agocleanup: same sign for compare
Zdenek Kabelac [Sat, 18 Feb 2017 18:45:17 +0000 (19:45 +0100)]
cleanup: same sign for compare

7 years agocleanup: use multiline string
Zdenek Kabelac [Sat, 18 Feb 2017 18:09:24 +0000 (19:09 +0100)]
cleanup: use multiline string

7 years agocleanup: use const
Zdenek Kabelac [Sat, 18 Feb 2017 17:50:22 +0000 (18:50 +0100)]
cleanup: use const

7 years agoman: thin dmeventd plugin update
Zdenek Kabelac [Sun, 19 Feb 2017 14:50:19 +0000 (15:50 +0100)]
man: thin dmeventd plugin update

Document new dmeventd/thin_command lvm.conf configurable.

7 years agoman: dmstats update
Zdenek Kabelac [Sun, 19 Feb 2017 14:51:06 +0000 (15:51 +0100)]
man: dmstats update

Fixing colorization bugs

7 years agoman: dmsetup update
Zdenek Kabelac [Sun, 19 Feb 2017 14:50:49 +0000 (15:50 +0100)]
man: dmsetup update

7 years agocommands: fix memleak
Zdenek Kabelac [Sat, 18 Feb 2017 17:49:19 +0000 (18:49 +0100)]
commands: fix memleak

Keep all allocations 'mempool' allocated for simple cleanup.

7 years agolvresize: fix regressiong on accepting args
Zdenek Kabelac [Sun, 19 Feb 2017 18:08:48 +0000 (19:08 +0100)]
lvresize: fix regressiong on accepting args

Commit f45b68940667563e1a8d3bbd5d30864c04381bdf caused regression
of lvresize -m and --type  parameter

After fix this sequence may work when we also fix syntax description:

lvcreate -l1 -m1 -n lv1 vg
lvextend --type mirror -m1 -l+1 vg/lv1

7 years agoman/help: fix description of r|R unit
David Teigland [Fri, 17 Feb 2017 21:44:26 +0000 (15:44 -0600)]
man/help: fix description of r|R unit

7 years agoman: print space before built-in name
David Teigland [Fri, 17 Feb 2017 21:33:04 +0000 (15:33 -0600)]
man: print space before built-in name

print 'lvm config' not 'lvm-config'

7 years agoman pvmove: move details to notes
David Teigland [Fri, 17 Feb 2017 21:28:00 +0000 (15:28 -0600)]
man pvmove: move details to notes

7 years agoman: mention force behavior in various places
David Teigland [Fri, 17 Feb 2017 21:11:19 +0000 (15:11 -0600)]
man: mention force behavior in various places

7 years agoman lvmconfig: refer to typeconfig option name
David Teigland [Fri, 17 Feb 2017 20:46:10 +0000 (14:46 -0600)]
man lvmconfig: refer to typeconfig option name

7 years agoman/help: show recently added r|R unit
David Teigland [Fri, 17 Feb 2017 20:02:13 +0000 (14:02 -0600)]
man/help: show recently added r|R unit

7 years agoargs: in yes option mention qq for auto-no
David Teigland [Fri, 17 Feb 2017 20:42:13 +0000 (14:42 -0600)]
args: in yes option mention qq for auto-no

7 years agolvconvert: include swap behavior in generic pool syntax
David Teigland [Fri, 17 Feb 2017 17:45:13 +0000 (11:45 -0600)]
lvconvert: include swap behavior in generic pool syntax

For this syntax:
lvconvert --thinpool LV1 --poolmetadata LV2
lvconvert --cachepool LV1 --poolmetadata LV2

Restore the metadata swapping behavior in addition to
the pool creation behavior.  When LV1 is already a pool,
the metadata LV will be swapped with LV2.
When LV1 is not a pool, it will be converted to a
pool using the specified LV for metadata.

This syntax is no longer advertised because of the
ambiguous behavior.  The primary syntaxes for pool
creation and metadata swapping will be the advertised
methods.

7 years agocommands: compensate --uuid
Zdenek Kabelac [Fri, 17 Feb 2017 12:57:59 +0000 (13:57 +0100)]
commands: compensate --uuid

As we now user binary search - it's nondeterministict
which of the same 'args' will be give - so duplicates
need 'extra' care.

So provide same hack for output for --uuidstr_ARG as
for input.

Solves 'pvscan -u'.

7 years agocommands: some more dm wrappers
Zdenek Kabelac [Fri, 17 Feb 2017 12:36:57 +0000 (13:36 +0100)]
commands: some more dm wrappers

As man-generator is not liked with libdm as of now - some more wrappers.

7 years agocleanup: unused uninit vars
Zdenek Kabelac [Fri, 17 Feb 2017 12:16:27 +0000 (13:16 +0100)]
cleanup: unused uninit vars

7 years agocleanup: use strchr for 1-byte lookup
Zdenek Kabelac [Fri, 17 Feb 2017 12:09:06 +0000 (13:09 +0100)]
cleanup: use strchr for 1-byte lookup

7 years agocleanup: add comment for longer macro
Zdenek Kabelac [Fri, 17 Feb 2017 10:51:24 +0000 (11:51 +0100)]
cleanup: add comment for longer macro

7 years agocommands: optimize binary search
Zdenek Kabelac [Fri, 17 Feb 2017 09:00:43 +0000 (10:00 +0100)]
commands: optimize binary search

Since there is a lot of options and lot of searches,
use binary search to keep strcmp at minimum.

The interesting part is - alphabetically sorted array contains
duplicates and some of them are not the 'right anwer', so
after we find matching string but not matching long_ARG,
we may need to check if the surrouding strings are the right matching
one.

The single loops is used also for strictly define --foo_long
(i.e. --stripes)  and just differs at final part.

TODO1: replace strstr call with some flag (just like short_opt).
TODO2: drop '--' from being stored and tests by strcmp.

7 years agocommands: use dm_strncpy
Zdenek Kabelac [Fri, 17 Feb 2017 08:59:29 +0000 (09:59 +0100)]
commands: use dm_strncpy

Easier code using dm_strncpy() an dm_snprintf().

7 years agocommands: cheap optimisation for parser
Zdenek Kabelac [Fri, 17 Feb 2017 10:52:37 +0000 (11:52 +0100)]
commands: cheap optimisation for parser

Some low-hanging fruits to cut of signification number of strcmp calls.

7 years agocommands: track errors in command def parsing
David Teigland [Thu, 16 Feb 2017 21:26:42 +0000 (15:26 -0600)]
commands: track errors in command def parsing

When parsing command defs, track and report all
errors that are found.  Add an error return case
from define_commands so the standard error exit
path is used.

7 years agocommands: initialize commands[] once
David Teigland [Thu, 16 Feb 2017 19:59:52 +0000 (13:59 -0600)]
commands: initialize commands[] once

When using liblvm2cmd, a process can do multiple
init/exit calls, i.e.

lvm2_init(); lvm2_run(); lvm2_exit();
lvm2_init(); lvm2_run(); lvm2_exit();
...

define_commands() needs to set up the global commands[]
definitions only the first time.

7 years agocommands: avoid factoring options until needed
David Teigland [Thu, 16 Feb 2017 15:36:55 +0000 (09:36 -0600)]
commands: avoid factoring options until needed

7 years agohelp/man: remove commas from list of options
David Teigland [Wed, 15 Feb 2017 20:00:09 +0000 (14:00 -0600)]
help/man: remove commas from list of options

Using commas between options does not seem to
be done anywhere else, so remove them.

7 years agocommands: use dm wrappers for malloc/free
David Teigland [Wed, 15 Feb 2017 21:49:18 +0000 (15:49 -0600)]
commands: use dm wrappers for malloc/free

7 years agocommands: use existing vg/lv name parsing functions
David Teigland [Wed, 15 Feb 2017 21:06:52 +0000 (15:06 -0600)]
commands: use existing vg/lv name parsing functions

inside the new lv arg parsing function.

This includes getting the VG name from the env var,
and some added checks on the format of the vg/lv string.

7 years agolvcreate: fix LVM_VG_NAME detection
David Teigland [Wed, 15 Feb 2017 20:09:45 +0000 (14:09 -0600)]
lvcreate: fix LVM_VG_NAME detection

Commit d3af0e7528dbba30824379fc98cb4db437559ad5 was
not quite right in testing if the env var was set.

7 years agotoollib: skip dev prefix from lv names
David Teigland [Wed, 15 Feb 2017 19:42:35 +0000 (13:42 -0600)]
toollib: skip dev prefix from lv names

_get_arg_lvnames_using_options() was missing skip_dev_dir()

7 years agolvconvert: handle old arg quirk when combining snapshot
David Teigland [Wed, 15 Feb 2017 18:40:35 +0000 (12:40 -0600)]
lvconvert: handle old arg quirk when combining snapshot

The old ad hoc arg parsing when combining a split snapshot
allowed the first lv to have a vgname, but not the second.
Since lvconvert now uses the standard arg parsing in
process_each_lv(), the old one-off behavior requires a
work around.

7 years agolvcreate: LVM_VG_NAME applies even without name arg
David Teigland [Wed, 15 Feb 2017 18:07:51 +0000 (12:07 -0600)]
lvcreate: LVM_VG_NAME applies even without name arg

There was a small flaw in the logic regarding when LVM_VG_NAME
can replace a VG position arg.

7 years agoRevert "lvconvert: enable previous syntax to swap metadata"
David Teigland [Tue, 14 Feb 2017 22:02:54 +0000 (16:02 -0600)]
Revert "lvconvert: enable previous syntax to swap metadata"

This reverts commit 717363bb9427c02addeb22ef77396132cb30c782.

These alternate forms for swapping metadata cannot be
distinguished from the command for creating a pool.
If we were to add these alternate forms for swapping
metadata, we would need to overload the pool creation
command defs, making those definitions ambiguous.

7 years agocoverity cleanups
David Teigland [Tue, 14 Feb 2017 21:53:29 +0000 (15:53 -0600)]
coverity cleanups

7 years agoman-generator: fix compiler warnings
David Teigland [Tue, 14 Feb 2017 16:28:52 +0000 (10:28 -0600)]
man-generator: fix compiler warnings

7 years agoman/help: use separator in units list
David Teigland [Tue, 14 Feb 2017 16:20:38 +0000 (10:20 -0600)]
man/help: use separator in units list

h|H|b|B|... instead of hHbB...

7 years agocommands: skip parsing command defs for other command names
David Teigland [Tue, 14 Feb 2017 16:16:13 +0000 (10:16 -0600)]
commands: skip parsing command defs for other command names

The base command name can be used to skip parsing
command defs that will not be needed.

7 years agocommands: improve help/usage output
David Teigland [Tue, 14 Feb 2017 15:49:26 +0000 (09:49 -0600)]
commands: improve help/usage output

Replace --help --help with --long-help.
Some blank lines were needed.
Add 'lvm help all' to print help for all commands.

7 years agoMakefile: all_man also requires man-generator now
Alasdair G Kergon [Tue, 14 Feb 2017 13:24:31 +0000 (13:24 +0000)]
Makefile: all_man also requires man-generator now

7 years agomakefiles: missing deps
Zdenek Kabelac [Tue, 14 Feb 2017 09:24:25 +0000 (10:24 +0100)]
makefiles: missing deps

7 years agomakefiles: use configure vars
Zdenek Kabelac [Tue, 14 Feb 2017 08:48:24 +0000 (09:48 +0100)]
makefiles: use configure vars

Use binaries found in configure.

7 years agolibdm: move code for _stats_resize_group
Zdenek Kabelac [Tue, 14 Feb 2017 08:53:13 +0000 (09:53 +0100)]
libdm: move code for _stats_resize_group

Code is only needed when "fiemap.h" so keep it under single #ifdef.

7 years agoconfigure: update
Zdenek Kabelac [Mon, 13 Feb 2017 21:55:30 +0000 (22:55 +0100)]
configure: update

7 years agoactivation: trust 'pending' status reported by dmeventd
Zdenek Kabelac [Mon, 13 Feb 2017 21:50:19 +0000 (22:50 +0100)]
activation: trust 'pending' status reported by dmeventd

Only usleep when dmeventd reports 'pending' otherwise trust reported
state.

7 years agodmeventd: unify error handling
Zdenek Kabelac [Mon, 13 Feb 2017 18:00:59 +0000 (19:00 +0100)]
dmeventd: unify error handling

Always make sure the 'status' is release on 'error' path (thin pluging missed)
Make code looking same across all plugins.

7 years agocoverity cleanups for recent command defs commits
David Teigland [Mon, 13 Feb 2017 22:11:04 +0000 (16:11 -0600)]
coverity cleanups for recent command defs commits

7 years agoWHATS_NEW: changes for recent command defs
David Teigland [Mon, 13 Feb 2017 21:36:17 +0000 (15:36 -0600)]
WHATS_NEW: changes for recent command defs

7 years agoWHATS_NEW: items from command definitions patch set
David Teigland [Mon, 13 Feb 2017 21:22:26 +0000 (15:22 -0600)]
WHATS_NEW: items from command definitions patch set

7 years agolvconvert: enable previous syntax to swap metadata
David Teigland [Mon, 13 Feb 2017 20:40:53 +0000 (14:40 -0600)]
lvconvert: enable previous syntax to swap metadata

7 years agocommands: suggest --help if command doesn't match
David Teigland [Mon, 13 Feb 2017 19:46:17 +0000 (13:46 -0600)]
commands: suggest --help if command doesn't match

7 years agogenerate man pages
David Teigland [Fri, 10 Feb 2017 22:20:19 +0000 (16:20 -0600)]
generate man pages

7 years agoargs: use arg parsing function for region size
David Teigland [Tue, 7 Feb 2017 21:12:24 +0000 (15:12 -0600)]
args: use arg parsing function for region size

Consolidate the validation of the region size arg
in a new arg parsing function.

7 years agolvconvert: remove code for changing region size
David Teigland [Tue, 7 Feb 2017 21:01:30 +0000 (15:01 -0600)]
lvconvert: remove code for changing region size

from the generic raid type conversion code.

7 years agolvconvert: add command to change region size of a raid LV
David Teigland [Tue, 7 Feb 2017 17:52:13 +0000 (11:52 -0600)]
lvconvert: add command to change region size of a raid LV

7 years agovgchange: fix uint32 parsing of logicalvolume arg
David Teigland [Mon, 6 Feb 2017 22:10:09 +0000 (16:10 -0600)]
vgchange: fix uint32 parsing of logicalvolume arg

7 years agocommands: recognize raid variations
David Teigland [Mon, 6 Feb 2017 17:51:06 +0000 (11:51 -0600)]
commands: recognize raid variations

7 years agocommands: move command def parsing into lvm binary
David Teigland [Fri, 10 Feb 2017 17:36:11 +0000 (11:36 -0600)]
commands: move command def parsing into lvm binary

It was previously done at build time by the ccmd binary.

7 years agolvconvert: remove unused code
David Teigland [Fri, 10 Feb 2017 17:34:12 +0000 (11:34 -0600)]
lvconvert: remove unused code

For "split" which is not an alias for splitmirrors.

7 years agoargs: split is a synonym for splitcache
David Teigland [Thu, 19 Jan 2017 19:47:24 +0000 (13:47 -0600)]
args: split is a synonym for splitcache

also tidy the other synonyms

7 years agoman: lvmthin updates
David Teigland [Mon, 16 Jan 2017 22:26:14 +0000 (16:26 -0600)]
man: lvmthin updates

Some minor changes to some of the command syntaxes
to use more standard forms.

7 years agoccmd: split into multiple files
David Teigland [Thu, 12 Jan 2017 20:44:58 +0000 (14:44 -0600)]
ccmd: split into multiple files

7 years agocommand struct: remove command name refs
David Teigland [Fri, 13 Jan 2017 21:08:51 +0000 (15:08 -0600)]
command struct: remove command name refs

Change run time access to the command_name struct
cmd->cname instead of indirectly through
cmd->command->cname. This removes the two run time
fields from struct command.

7 years agocommand.h comment tidying
David Teigland [Fri, 13 Jan 2017 20:51:50 +0000 (14:51 -0600)]
command.h comment tidying

7 years agolvm shell: clear argv for each command
David Teigland [Fri, 13 Jan 2017 18:02:06 +0000 (12:02 -0600)]
lvm shell: clear argv for each command

7 years agohelp: accept positional args
David Teigland [Fri, 13 Jan 2017 17:31:49 +0000 (11:31 -0600)]
help: accept positional args

lvm help <commandname> ...

7 years agofix lvmcmdline warning
David Teigland [Thu, 12 Jan 2017 20:36:31 +0000 (14:36 -0600)]
fix lvmcmdline warning

declaration of ‘usage’ shadows a globa

7 years agoman lvm: remove options
David Teigland [Thu, 12 Jan 2017 22:08:53 +0000 (16:08 -0600)]
man lvm: remove options

all options are now included in commands

7 years agoargs: add man page descriptions
David Teigland [Fri, 6 Jan 2017 22:56:59 +0000 (16:56 -0600)]
args: add man page descriptions

7 years agoargs: use uint32 arg for maxphysicalvolumes
David Teigland [Tue, 3 Jan 2017 21:52:27 +0000 (15:52 -0600)]
args: use uint32 arg for maxphysicalvolumes

7 years agolvconvert: remove unused code
David Teigland [Tue, 20 Dec 2016 21:17:48 +0000 (15:17 -0600)]
lvconvert: remove unused code

7 years agolvconvert: use command defs for raid/mirror types
David Teigland [Mon, 19 Dec 2016 21:53:21 +0000 (15:53 -0600)]
lvconvert: use command defs for raid/mirror types

All lvconvert functionality has been moved out of the
previous monolithic lvconvert code, except conversions
related to raid/mirror/striped/linear.  This switches
that remaining code to be based on command defs, and
standard process_each_lv arg processing.  This final
switch results in quite a bit of dead code that is
also removed.

7 years agotests: use swapmetadata
David Teigland [Fri, 9 Dec 2016 21:54:59 +0000 (15:54 -0600)]
tests: use swapmetadata

and some other pool/cache/thin related changes

7 years agolvconvert: use command defs for mergemirrors
David Teigland [Fri, 9 Dec 2016 20:39:57 +0000 (14:39 -0600)]
lvconvert: use command defs for mergemirrors

and route the generic --merge to one of the
specific merge functions

7 years agotoollib: find VG name in option values when needed
David Teigland [Fri, 9 Dec 2016 19:30:42 +0000 (13:30 -0600)]
toollib: find VG name in option values when needed

7 years agolvconvert: use command defs for thin/cache/pool creation
David Teigland [Wed, 7 Dec 2016 20:30:57 +0000 (14:30 -0600)]
lvconvert: use command defs for thin/cache/pool creation

Everything related to thin and cache.

7 years agolvconvert: add startpoll command using command def
David Teigland [Mon, 19 Dec 2016 21:38:03 +0000 (15:38 -0600)]
lvconvert: add startpoll command using command def

This is a new explicit version of 'lvconvert LV'
which has been an obscure way of triggering polling
to be restarted on an LV that was previously converted.

7 years agolvconvert: snapshot: use command definitions
David Teigland [Fri, 18 Nov 2016 19:16:04 +0000 (13:16 -0600)]
lvconvert: snapshot: use command definitions

Lift all the snapshot utilities (merge, split, combine)
out of the monolithic lvconvert implementation, using
the command definitions.  The old code associated with
these commands is now unused and will be removed separately.

This page took 0.071225 seconds and 5 git commands to generate.