]> sourceware.org Git - lvm2.git/log
lvm2.git
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.

7 years agolvconvert: remove unused calls for repair and replace
David Teigland [Thu, 17 Nov 2016 22:04:59 +0000 (16:04 -0600)]
lvconvert: remove unused calls for repair and replace

repair and replace are no longer called from the
monolithic lvconvert code, so remove the unused code.

7 years agolvconvert: repair and replace: use command definitions
David Teigland [Thu, 17 Nov 2016 21:38:52 +0000 (15:38 -0600)]
lvconvert: repair and replace: use command definitions

This lifts the lvconvert --repair and --replace commands
out of the monolithic lvconvert implementation.  The
previous calls into repair/replace can no longer be
reached and will be removed in a separate commit.

7 years agolvchange: make use of command definitions
David Teigland [Wed, 16 Nov 2016 22:05:47 +0000 (16:05 -0600)]
lvchange: make use of command definitions

Reorganize the lvchange code to take advantage of
the command definition, and remove the validation
that is done by the command definintion rules.

7 years agoprocess_each_lv: add check_single_lv function
David Teigland [Tue, 29 Nov 2016 18:00:15 +0000 (12:00 -0600)]
process_each_lv: add check_single_lv function

The new check_single_lv() function is called prior to the
existing process_single_lv().  If the check function returns 0,
the LV will not be processed.

The check_single_lv function is meant to be a standard method
to validate the combination of specific command + specific LV,
and decide if the combination is allowed.  The check_single
function can be used by anything that calls process_each_lv.

As commands are migrated to take advantage of command
definitions, each command definition gets its own entry
point which calls process_each for itself, passing a
pair of check_single/process_single functions which can
be specific to the narrowly defined command def.

7 years agocommands: new method for defining commands
David Teigland [Fri, 12 Aug 2016 20:52:18 +0000 (15:52 -0500)]
commands: new method for defining commands

. Define a prototype for every lvm command.
. Match every user command with one definition.
. Generate help text and man pages from them.

The new file command-lines.in defines a prototype for every
unique lvm command.  A unique lvm command is a unique
combination of: command name + required option args +
required positional args.  Each of these prototypes also
includes the optional option args and optional positional
args that the command will accept, a description, and a
unique string ID for the definition.  Any valid command
will match one of the prototypes.

Here's an example of the lvresize command definitions from
command-lines.in, there are three unique lvresize commands:

lvresize --size SizeMB LV
OO: --alloc Alloc, --autobackup Bool, --force,
--nofsck, --nosync, --noudevsync, --reportformat String, --resizefs,
--stripes Number, --stripesize SizeKB, --poolmetadatasize SizeMB
OP: PV ...
ID: lvresize_by_size
DESC: Resize an LV by a specified size.

lvresize LV PV ...
OO: --alloc Alloc, --autobackup Bool, --force,
--nofsck, --nosync, --noudevsync,
--reportformat String, --resizefs, --stripes Number, --stripesize SizeKB
ID: lvresize_by_pv
DESC: Resize an LV by specified PV extents.
FLAGS: SECONDARY_SYNTAX

lvresize --poolmetadatasize SizeMB LV_thinpool
OO: --alloc Alloc, --autobackup Bool, --force,
--nofsck, --nosync, --noudevsync,
--reportformat String, --stripes Number, --stripesize SizeKB
OP: PV ...
ID: lvresize_pool_metadata_by_size
DESC: Resize a pool metadata SubLV by a specified size.

The three commands have separate definitions because they have
different required parameters.  Required parameters are specified
on the first line of the definition.  Optional options are
listed after OO, and optional positional args are listed after OP.

This data is used to generate corresponding command definition
structures for lvm in command-lines.h.  usage/help output is also
auto generated, so it is always in sync with the definitions.

Every user-entered command is compared against the set of
command structures, and matched with one.  An error is
reported if an entered command does not have the required
parameters for any definition.  The closest match is printed
as a suggestion, and running lvresize --help will display
the usage for each possible lvresize command.

The prototype syntax used for help/man output includes
required --option and positional args on the first line,
and optional --option and positional args enclosed in [ ]
on subsequent lines.

  command_name <required_opt_args> <required_pos_args>
          [ <optional_opt_args> ]
          [ <optional_pos_args> ]

Command definitions that are not to be advertised/suggested
have the flag SECONDARY_SYNTAX.  These commands will not be
printed in the normal help output.

Man page prototypes are also generated from the same original
command definitions, and are always in sync with the code
and help text.

Very early in command execution, a matching command definition
is found.  lvm then knows the operation being done, and that
the provided args conform to the definition.  This will allow
lots of ad hoc checking/validation to be removed throughout
the code.

Each command definition can also be routed to a specific
function to implement it.  The function is associated with
an enum value for the command definition (generated from
the ID string.)  These per-command-definition implementation
functions have not yet been created, so all commands
currently fall back to the existing per-command-name
implementation functions.

Using per-command-definition functions will allow lots of
code to be removed which tries to figure out what the
command is meant to do.  This is currently based on ad hoc
and complicated option analysis.  When using the new
functions, what the command is doing is already known
from the associated command definition.

7 years agolvmlockd: test mode doesn't work
David Teigland [Thu, 15 Dec 2016 17:49:19 +0000 (11:49 -0600)]
lvmlockd: test mode doesn't work

The --test option is not yet compatible with shared VGs
because changes are made in lvmlockd that cannot be
reversed or faked.

7 years agotests: update
Zdenek Kabelac [Mon, 13 Feb 2017 08:32:28 +0000 (09:32 +0100)]
tests: update

7 years agotests: fix dev path
Zdenek Kabelac [Sun, 12 Feb 2017 21:28:40 +0000 (22:28 +0100)]
tests: fix dev path

Use proper device path for test devices.
Use mkfs.ext4 and drop  'echo y|' to it.
Use smaller device size to consume less memory and CPU time.

7 years agocleanup: use matching signed number comparation
Zdenek Kabelac [Sun, 12 Feb 2017 17:18:54 +0000 (18:18 +0100)]
cleanup: use matching signed number comparation

7 years agocleanup: use matching const type
Zdenek Kabelac [Sun, 12 Feb 2017 17:18:32 +0000 (18:18 +0100)]
cleanup: use matching const type

7 years agocleanup: use fall through
Zdenek Kabelac [Sun, 12 Feb 2017 17:17:07 +0000 (18:17 +0100)]
cleanup: use fall through

gcc gets 'selective' on having commented fall through case.

7 years agocleanup: fix warning about shadowed declaration
Zdenek Kabelac [Sun, 12 Feb 2017 16:47:35 +0000 (17:47 +0100)]
cleanup: fix warning about shadowed declaration

Avoid shadowing lv_size as lv_size() is already defined function in lv.h

7 years agocleanup: use proper printf specifier
Zdenek Kabelac [Sun, 12 Feb 2017 16:43:52 +0000 (17:43 +0100)]
cleanup: use proper printf specifier

7 years agoconfig: update doc
Zdenek Kabelac [Mon, 13 Feb 2017 08:58:46 +0000 (09:58 +0100)]
config: update doc

7 years agodmeventd: limit thin_command usage
Zdenek Kabelac [Sun, 12 Feb 2017 21:07:23 +0000 (22:07 +0100)]
dmeventd: limit thin_command usage

Require usable command string to begining with '/'
So 'thin_command = "/some/path/command"' is the only supported variant
to internal 'lvm' command.

7 years agocoverity: fix double free
Zdenek Kabelac [Sat, 11 Feb 2017 20:20:12 +0000 (21:20 +0100)]
coverity: fix double free

Do not try to free hist_arg twice.

7 years agocoverity: fix mem leak on error path in dm stats
Zdenek Kabelac [Sat, 11 Feb 2017 20:17:41 +0000 (21:17 +0100)]
coverity: fix mem leak on error path in dm stats

Free allocated resouces on error path.

7 years agocoverity: remove unneeded header files
Zdenek Kabelac [Sat, 11 Feb 2017 20:17:27 +0000 (21:17 +0100)]
coverity: remove unneeded header files

7 years agocleanup: drop double const specifier
Zdenek Kabelac [Sat, 11 Feb 2017 19:30:16 +0000 (20:30 +0100)]
cleanup: drop double const specifier

Remove duplicated 'const' specifier.
Reindent.

7 years agomem: add extra mem pages for pthread stack
Zdenek Kabelac [Sat, 11 Feb 2017 17:14:00 +0000 (18:14 +0100)]
mem: add extra mem pages for pthread stack

Some archs can use even 64K pages and then lvm2 runs into trouble if
the stack is 'too small' to fit extra page capturing stack overwrite.

So when lvm2 limits stack - add extra mem page - be it 4K or 64K.

Relates to ppc64le bug: https://bugzilla.redhat.com/1387279

7 years agolvconvert: remove test code
Heinz Mauelshagen [Fri, 10 Feb 2017 22:43:56 +0000 (23:43 +0100)]
lvconvert: remove test code

Remove allocate_pvs from raid_manip.c:_region_size_change_request() API
and lv_extend() using it added for temporary test purpose.

Related: rhbz1366296

7 years agolvconvert: add region size checks
Heinz Mauelshagen [Fri, 10 Feb 2017 22:35:53 +0000 (23:35 +0100)]
lvconvert: add region size checks

Add:
- region size checks to raid_manip.c types array and supporting functions
- tests to lvconvert-raid-takeover.sh to check bogus
  "lvconvert --type  --regionsize N " requests

Related: rhbz1366296

7 years agotest: lvresize-raid.sh missing conditional
Heinz Mauelshagen [Fri, 10 Feb 2017 20:19:03 +0000 (21:19 +0100)]
test: lvresize-raid.sh missing conditional

Test missed to check for raid0 present in the kernel.

Related: rhbz1366296

7 years agolibdm: avoid resume if preloaded device is smaller
Zdenek Kabelac [Fri, 10 Feb 2017 18:57:04 +0000 (19:57 +0100)]
libdm: avoid resume if preloaded device is smaller

When we preload device with smaller size, we avoid its resume,
so later suspend/resume of full device tree my process all
existing in flight bios.

Also update comment and avoid using confusing opposite meaning.

7 years agodmsetup: do not suppress kernel key descriptions in tables
Ondrej Kozina [Fri, 10 Feb 2017 12:19:22 +0000 (13:19 +0100)]
dmsetup: do not suppress kernel key descriptions in tables

Kernel 4.10 (dm-crypt v1.15.0) and later supports loading device
tables with crypt segment having key in kernel keyring retention
service.

dmsetup hid key section of tables output. With this patch dmsetup
no longer hides key section if it detects kernel key description
instead of hex byte representation of key itself.

7 years agolvconvert: add conversion from/to raid10
Heinz Mauelshagen [Fri, 10 Feb 2017 18:10:05 +0000 (19:10 +0100)]
lvconvert: add conversion from/to raid10

Add:
- conversion support from striped/raid0/raid0_meta to/from raid10;
  raid10 goes by the near format (same as used in creation of
  raid10 LVs), which groups data copies together with their original
  blocks (e.g. 3-way striped, 2 data copies resulting in 112233 in the
  first stripe followed by 445566 in the second etc.) and is limited
  to even numbers of legs for now
- related tests to lvconvert-raid-takeover.sh
- typo

Related: rhbz1366296

7 years agoman: mention dmstats in lvmsar and lvmsadc man pages
Bryn M. Reeves [Fri, 10 Feb 2017 17:07:39 +0000 (17:07 +0000)]
man: mention dmstats in lvmsar and lvmsadc man pages

7 years agolvreduce/lvresize: add ability to reduce the size of a RaidLV
Heinz Mauelshagen [Thu, 9 Feb 2017 21:41:28 +0000 (22:41 +0100)]
lvreduce/lvresize: add ability to reduce the size of a RaidLV

- support shrinking of raid0/1/4/5/6/10 LVs
- enhance lvresize-raid.sh tests: add raid0* and raid10
- fix have_raid4 in aux.sh to allow lv_resize-raid.sh
  and other scripts to test raid4

Resolves: rhbz1394048

7 years agolvconvert: add support to change RAID region size (fixup)
Heinz Mauelshagen [Tue, 7 Feb 2017 18:01:02 +0000 (19:01 +0100)]
lvconvert: add support to change RAID region size (fixup)

Commit cfb6ef654d3d1f1dd02569a1d5bd2fc252ae2494 introduced
support to change RAID region size.

Fix:
- don't change region_size until after prompting the user
- use log_print_unless_silent() instead of log_warn()
- avoid superfluous sigint() calls which are already
  covered in yes_no_prompt()
- typo

Related: rhbz1392947

7 years agolvconvert: avoid setting segment flag
Heinz Mauelshagen [Tue, 7 Feb 2017 16:48:17 +0000 (17:48 +0100)]
lvconvert: avoid setting segment flag

Fix:
- don't set SEG_RAID in _convert_mirror_to_raid1() errounously

Related: rhbz1366296

7 years agolvconvert: add support to change RAID region size (fixup)
Heinz Mauelshagen [Tue, 7 Feb 2017 15:52:04 +0000 (16:52 +0100)]
lvconvert: add support to change RAID region size (fixup)

Commit cfb6ef654d3d1f1dd02569a1d5bd2fc252ae2494 introduced
support to change RAID region size.

Add:
- missing conditions to support any types to function with
  it in lv_raid_convert();  temporary workaround used until
  cli validation patches get merged
- tests requesting "-R " to lvconvert-raid-takeover.sh
  involving a cleanup of the script

Related: rhbz1392947

7 years agolvconvert: add segtype raid5_n and conversions to/from it (cleanup)
Heinz Mauelshagen [Tue, 7 Feb 2017 11:25:26 +0000 (12:25 +0100)]
lvconvert: add segtype raid5_n and conversions to/from it (cleanup)

Cleanups as of Jons review:
- enhance comment about mandatory raid4 <-> raid5_n activation w/o metadata SubLVs
- remove bogus segment flag setting
- fix to sync related comments on conversions to raid0/striped and amongst raid4/5
- add missing error message for non-synced conversion to raid0/striped

Related: rhbz1366296

7 years agolvconvert: add support to change RAID region size
Heinz Mauelshagen [Mon, 6 Feb 2017 21:09:26 +0000 (22:09 +0100)]
lvconvert: add support to change RAID region size

Add:
- support to change region size of existing RaidLVs
  (all RAID LV types but raid0/raid0_meta)
- lvconvert-raid-regionsize.sh with test variations
  for different RAID types and region sizes

Resolves: rhbz1392947

7 years agotests: drop zeroing
Zdenek Kabelac [Mon, 6 Feb 2017 12:15:39 +0000 (13:15 +0100)]
tests: drop zeroing

Well waiting for zeroing may take enough time to finish 'raid' sync.
So make the test running faster without zeroing and better avoid race
to have chance to happen (i.e. lvcreate is finished after array
gets already in sync).

7 years agotests: drop /tmp polution
Zdenek Kabelac [Mon, 6 Feb 2017 08:48:19 +0000 (09:48 +0100)]
tests: drop /tmp polution

Drop forgotten extra metadata debug.

7 years agocleanup: hide gcc warning
Zdenek Kabelac [Mon, 6 Feb 2017 10:41:22 +0000 (11:41 +0100)]
cleanup: hide gcc warning

Gcc is not clever enough to see these vars are actually initialize in
given code path so let's just make sure it has a value.

7 years agodebug: add space before uuid
Zdenek Kabelac [Sun, 5 Feb 2017 16:30:23 +0000 (17:30 +0100)]
debug: add space before uuid

With commit 88534625282e8d533ae439ed308a285da10e3ef0 we added
uuid right after device name. Add space between them.
(Also fix some indenting)

7 years agocomment: update
Zdenek Kabelac [Sat, 4 Feb 2017 14:44:25 +0000 (15:44 +0100)]
comment: update

Fix can -> cannot.

7 years agocleanup: rename to use track_ prefix
Zdenek Kabelac [Sat, 4 Feb 2017 14:02:34 +0000 (15:02 +0100)]
cleanup: rename to use track_  prefix

Since we use 'track_' prefix for other deps tracking,
convert skip_external_lv to use same logical meaning.
(just converts  1->0  0->1)

7 years agoclvmd: add mutex protection for cpg_ call
Zdenek Kabelac [Sat, 4 Feb 2017 13:47:27 +0000 (14:47 +0100)]
clvmd: add mutex protection for cpg_ call

The library for corosync multicasting is not supporting multithread
usage - add local mutex to avoid parallel call of cpg_mcast_joined().

7 years agolvconvert: add segtypes raid6_{ls,rs,la,ra}_6 and conversions to/from it
Heinz Mauelshagen [Sat, 4 Feb 2017 23:53:36 +0000 (00:53 +0100)]
lvconvert: add segtypes raid6_{ls,rs,la,ra}_6 and conversions to/from it

Add:
- support for segment types raid6_{ls,rs,la,ra}_6
  (striped raid with dedicated last Q-Syndrome SubLVs)
- conversion support from raid5_{ls,rs,la,ra} to/from raid6_{ls,rs,la,ra}_6
- setting convenient segtypes on conversions from/to raid4/5/6
- related tests to lvconvert-raid-takeover.sh factoring
  out _lvcreate,_lvconvert funxtions

Related: rhbz1366296

7 years agoWHATS_NEW: New segment type raid6_n_6
Heinz Mauelshagen [Sat, 4 Feb 2017 13:09:26 +0000 (14:09 +0100)]
WHATS_NEW: New segment type raid6_n_6

7 years agolvconvert: add segtype raid6_n_6 and conversions to/from it
Heinz Mauelshagen [Sat, 4 Feb 2017 00:40:58 +0000 (01:40 +0100)]
lvconvert: add segtype raid6_n_6 and conversions to/from it

Add:
- support for segment type raid6_n_6 (striped raid with dedicated last parity/Q-Syndrome SubLVs)
- conversion support from striped/raid0/raid0_meta/raid4 to/from raid6_n_6
- related tests to lvconvert-raid-takeover.sh

Related: rhbz1366296

7 years agoWHATS_NEW: New segment type raid5_n
Heinz Mauelshagen [Fri, 3 Feb 2017 22:41:48 +0000 (23:41 +0100)]
WHATS_NEW: New segment type raid5_n

7 years agolvconvert: add segtype raid5_n and conversions to/from it
Heinz Mauelshagen [Fri, 3 Feb 2017 21:16:00 +0000 (22:16 +0100)]
lvconvert: add segtype raid5_n and conversions to/from it

Change:
- missed a return_0
- use lvseg_name() rather than my own function

Related: rhbz1366296

7 years agolvconvert: add segtype raid5_n and conversions to/from it
Heinz Mauelshagen [Fri, 3 Feb 2017 19:39:40 +0000 (20:39 +0100)]
lvconvert: add segtype raid5_n and conversions to/from it

Add:
- support for segment type raid5_n (striped raid with dedicated last parity SubLVs)
- conversion support from striped/raid0/raid0_meta/raid4 to/from raid5_n
- related tests to lvconvert-raid-takeover.sh

Related: rhbz1366296

7 years agolvmdbusd: cmdhandler.py, remove duplicate code
Tony Asleson [Thu, 2 Feb 2017 01:05:41 +0000 (19:05 -0600)]
lvmdbusd: cmdhandler.py, remove duplicate code

Move similar code to common functions, less is more!

7 years agolvmdbusd: manager.py, remove duplicate code
Tony Asleson [Thu, 2 Feb 2017 00:57:01 +0000 (18:57 -0600)]
lvmdbusd: manager.py, remove duplicate code

Move similar code to common functions, less is more!

7 years agolvmdbusd: lvmdb.py, remove duplicate code
Tony Asleson [Thu, 2 Feb 2017 00:56:39 +0000 (18:56 -0600)]
lvmdbusd: lvmdb.py, remove duplicate code

Move similar code to common functions, less is more!

7 years agolvmdbusd: pv.py, remove duplicate code
Tony Asleson [Wed, 1 Feb 2017 22:51:00 +0000 (16:51 -0600)]
lvmdbusd: pv.py, remove duplicate code

Move similar code to common functions, less is more!

7 years agolvmdbusd: vg.py, remove duplicate code
Tony Asleson [Wed, 1 Feb 2017 22:37:03 +0000 (16:37 -0600)]
lvmdbusd: vg.py, remove duplicate code

Move similar code to common functions, less is more!

7 years agolvmdbusd: lv.py, remove duplicate code
Tony Asleson [Wed, 1 Feb 2017 21:38:55 +0000 (15:38 -0600)]
lvmdbusd: lv.py, remove duplicate code

Move similar code to common functions, less is more!

7 years agoman: add update_filemap to dmstats.8.in dev-bmr-dmstats-filemap-update
Bryn M. Reeves [Sat, 17 Dec 2016 16:36:26 +0000 (16:36 +0000)]
man: add update_filemap to dmstats.8.in

7 years agodmstats: allow --filemap groups to be updated
Bryn M. Reeves [Sun, 11 Dec 2016 13:26:34 +0000 (13:26 +0000)]
dmstats: allow --filemap groups to be updated

Add a new update_filemap command to dmstats that allows a filemap
group to be updated:

  # dmstats update_filemap --groupid 0 vm.img
  /var/lib/libvirt/images/vm.img: Updated group ID 0 with 137 region(s).

This will update the set of regions mapped to the file to reflect
the current file system allocation.

Currently this needs to be run manually - a future update will add
support for monitoring file maps via a daemon, allowing them to be
automatically updated when the underlying file is modified.

7 years agolibdm: add dm_stats_update_regions_from_fd()
Bryn M. Reeves [Sun, 11 Dec 2016 12:53:04 +0000 (12:53 +0000)]
libdm: add dm_stats_update_regions_from_fd()

Add a call to update the regions corresponding to a file mapped
group of regions. The regions to be updated must be grouped, to
allow us to correctly identify extents that have been deallocated
since the map was created.

Tables are built of the file extents, and the extents currently
mapped to dmstats regions: if a region no longer has a matching
file extent, it is deleted, and new regions are created for any
file extents without a matching region.

The FIEMAP call returns extents that are currently in-memory (or
journaled) and awaiting allocation in the file system. These have
the FIEMAP_EXTENT_UNKNOWN | FIEMAP_EXTENT_DELALLOC flag bits set
in the fe_flags field - these extents are skipped until they
have a known disk location.

Since it is possile for the 0th extent of the file to have been
deallocated this must also handle the possible deletion and
re-creation of the group leader: if no other region allocation
is taking place the group identifier will not change.

7 years agolibdm: test for DM_STATS_GROUP_NOT_PRESENT in _stats_group_id_present
Bryn M. Reeves [Wed, 25 Jan 2017 15:10:59 +0000 (15:10 +0000)]
libdm: test for DM_STATS_GROUP_NOT_PRESENT in _stats_group_id_present

If the group_id passed to _stats_group_id_present is equal to the
special value DM_STATS_GROUP_NOT_PRESENT there is no need to perform
any further tests: return false immediately.

7 years agolibdm: fix stats comment formatting in libdevmapper.h
Bryn M. Reeves [Tue, 24 Jan 2017 09:29:08 +0000 (09:29 +0000)]
libdm: fix stats comment formatting in libdevmapper.h

7 years agotoolcontext: action for LVM_RUN_BY_DMEVENTD env var
Zdenek Kabelac [Mon, 23 Jan 2017 13:24:27 +0000 (14:24 +0100)]
toolcontext: action for LVM_RUN_BY_DMEVENTD env var

When LVM_RUN_BY_DMEVENTD is set to 1, ensure there will
be no interaction with dmeventd.

7 years agodmeventd_thind: set LVM_RUN_BY_DMEVENTD
Zdenek Kabelac [Mon, 23 Jan 2017 13:23:24 +0000 (14:23 +0100)]
dmeventd_thind: set LVM_RUN_BY_DMEVENTD

Set LVM_RUN_BY_DMEVENTD envvar to expose the command is runing from
dmeventd environment.

7 years agoclean: move code to lib part
Zdenek Kabelac [Mon, 23 Jan 2017 13:21:56 +0000 (14:21 +0100)]
clean: move code to lib part

Move actual processing part of the lvm2_disable_dmeventd_monitoring()
into a /lib part so we can reuse the code later for other cases.

7 years agotests: umount when above 95
Zdenek Kabelac [Sat, 21 Jan 2017 21:53:57 +0000 (22:53 +0100)]
tests: umount when above 95

Add code to check if resulting data or metadata remained over 95%
and in such case invoke umount.

7 years agotests: properly quote heredoc
Zdenek Kabelac [Sat, 21 Jan 2017 18:21:08 +0000 (19:21 +0100)]
tests: properly quote heredoc

Prepend \$ for vars which should remain in script.
Also drop --lazy umount.
Move inittest call up, so mntdir and mntusedir have proper full path.

7 years agotests: implement umount in script
Zdenek Kabelac [Sat, 21 Jan 2017 16:37:53 +0000 (17:37 +0100)]
tests: implement umount in script

Since dmeventd no longer umounts thin devices, such logic
needs to be implemented by external script.
Add some very simple one for the start.

7 years agotests: enusure units in TiB
Zdenek Kabelac [Sat, 21 Jan 2017 15:20:41 +0000 (16:20 +0100)]
tests: enusure units in TiB

7 years agodmeventd_thin: internal command without lvm prefix
Zdenek Kabelac [Sat, 21 Jan 2017 16:37:01 +0000 (17:37 +0100)]
dmeventd_thin: internal command without lvm prefix

Internal command processing needs to go without 'lvm ' prefix.

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