]> sourceware.org Git - lvm2.git/log
lvm2.git
9 years agopools: workaround hints
Zdenek Kabelac [Sun, 26 Oct 2014 18:45:17 +0000 (19:45 +0100)]
pools: workaround hints

Missing code for stacked hint estimation

9 years agotests: update cache creation tests
Zdenek Kabelac [Sun, 26 Oct 2014 15:19:30 +0000 (16:19 +0100)]
tests: update cache creation tests

9 years agotests: lvcreate-update
Zdenek Kabelac [Sun, 26 Oct 2014 06:29:25 +0000 (07:29 +0100)]
tests: lvcreate-update

Test with old mirror type.

9 years agotests: pytest update
Zdenek Kabelac [Sun, 26 Oct 2014 06:27:23 +0000 (07:27 +0100)]
tests: pytest update

9 years agolvcreate: delay check for free extents
Zdenek Kabelac [Sun, 26 Oct 2014 15:18:53 +0000 (16:18 +0100)]
lvcreate: delay check for free extents

As the rounding for cache creation may change the value of extents
postpone check for free extents.

9 years agocache: support more args
Zdenek Kabelac [Sun, 26 Oct 2014 15:17:14 +0000 (16:17 +0100)]
cache: support more args

Unlike with thin-pool - with cache we support all args also
directly when create cache volume.

So the result of 'separate' cache-pool creation and setting its
options should give same result as specifying those args
during cache creation.

Cache-pool values are used as defaults if the params are
not specified with cache creation.

9 years agothin: simplify thin volume creation
Zdenek Kabelac [Sun, 26 Oct 2014 07:13:59 +0000 (08:13 +0100)]
thin: simplify thin volume creation

Move code for creation of thin volume into a single place
out of lv_extend().  This allows to drop extra pool arg
for alloc_lv_segment() && lv_extend() and makes code
more easier to read and follow.

9 years agocache: apply chunk rounding also for cache creation.
Zdenek Kabelac [Sun, 26 Oct 2014 17:17:59 +0000 (18:17 +0100)]
cache: apply chunk rounding also for cache creation.

When we create volumes with chunk size bigger then extent size
we try to round up to some nearest chunk boundary.
Until now we did this for thins - use same logic for
cache volumes.

9 years agopools: prefetch pool_lv and origin_lv
Zdenek Kabelac [Sun, 26 Oct 2014 17:17:40 +0000 (18:17 +0100)]
pools: prefetch pool_lv and origin_lv

Load pool_lv and origin_lv at a single place and
use it for more types as they need them.

9 years agolvm2app: update to new lv_create_single API
Zdenek Kabelac [Sun, 26 Oct 2014 06:25:30 +0000 (07:25 +0100)]
lvm2app: update to new lv_create_single API

lv_create_single is more type based.

9 years agovg_read: Remove unused READ_WITHOUT_LOCK.
David Teigland [Fri, 24 Oct 2014 20:54:04 +0000 (21:54 +0100)]
vg_read: Remove unused READ_WITHOUT_LOCK.

Unused since 67a7b7a87da65b2350f975272e581be5f41976e0:
  report: Iterate over labels instead of PVs for label-only reports.
(included in 2.02.105).

9 years agotests: syncaction needs kernel fix
Zdenek Kabelac [Tue, 21 Oct 2014 08:52:57 +0000 (10:52 +0200)]
tests: syncaction needs kernel fix

Add 'should' as we currently cannot pass this test.

FIXME:
Add properly wrapper to not use 'should' with fixed kernel.

9 years agotests: new lvcreate functionality
Zdenek Kabelac [Mon, 20 Oct 2014 12:56:55 +0000 (14:56 +0200)]
tests: new lvcreate functionality

Fixed syntax parsing means that some commands that used to work are now
failing. Particullary this case:

$ invalid lvcreate -l1 --type thin vg/pool
> Needs to fail becase thin type LV needs  --virtualsize

$ invalid lvcreate --type snapshot vg/lv1
> Needs to fail because old-snapshot segment type needs --size

Some reported error messages have been also updated.

9 years agotests: lvcreate usage
Zdenek Kabelac [Sat, 11 Oct 2014 07:12:56 +0000 (09:12 +0200)]
tests: lvcreate usage

9 years agomirror: extra parsing for mirrorlog arg
Zdenek Kabelac [Wed, 22 Oct 2014 19:02:29 +0000 (21:02 +0200)]
mirror: extra parsing for mirrorlog arg

Put validation of mirrorlog arg into a separate function.

9 years agoman: lvconvert/create updates
Zdenek Kabelac [Tue, 7 Oct 2014 12:48:38 +0000 (14:48 +0200)]
man: lvconvert/create updates

More description for cache support.
Introduce --pooldatasize option.

9 years agocache: separate func for pool/origin validation
Zdenek Kabelac [Wed, 22 Oct 2014 19:01:03 +0000 (21:01 +0200)]
cache: separate func for pool/origin validation

Split validate_lv_cache_create() into 2 function
once is called for pool validation other for origin.

It's less misleading the accepting NULLs.

9 years agosegments: mark more of them unzeroable
Zdenek Kabelac [Mon, 20 Oct 2014 12:57:24 +0000 (14:57 +0200)]
segments: mark more of them unzeroable

Use segment flags to avoid zeroing of cache, cache pool
snapshot and thin pool segments.

We never want to zero these segment types.

Note:
Snapshot COW and Cache origin are created as stripes
thus are then properly zeroed.

9 years agolvcreate: check for conflicting -Zy -Wy
Zdenek Kabelac [Tue, 21 Oct 2014 18:50:26 +0000 (20:50 +0200)]
lvcreate: check for conflicting -Zy -Wy

Let the finaly state of zero & wipe_signature to be
resolved later together with all the types.

Don't play with zero assigment and segtype flag
(i.e. thin-pool -Z  has different meaning).

Check if the passed options do allow requested zeroing/wiping.

lvcreate without -Z or -W will fallback to warning if the device
cannot be zeroed, however if user requested them explicitely
it will give user error.

9 years agotoollib: persistent major minor
Zdenek Kabelac [Thu, 23 Oct 2014 12:26:16 +0000 (14:26 +0200)]
toollib: persistent major minor

Deduce -M from presence of --minor, --major option if
not specified on command line.

9 years agolvcreate: new validation code
Zdenek Kabelac [Fri, 24 Oct 2014 13:26:41 +0000 (15:26 +0200)]
lvcreate: new validation code

Refactor lvcreate code.

Prefer to use arg_outside_list_is_set() so we get automatic 'white-list'
validation of supported options with different segment types.

Drop used lp->cache, lp->cache and use seg_is_cache(), seg_is_thin()

Draw clear border where is the last moment we could change create
segment type.

When segment type is given with --type - do not allow it to be changed
later.

Put together tests related to individual segment types.

Finish cache conversion at proper part of lv_manip code after
the vg_metadata are written - so we could correcly clean-up created
stripe LV for cache volume.

9 years agopools: error path removes metadata
Zdenek Kabelac [Fri, 24 Oct 2014 13:21:48 +0000 (15:21 +0200)]
pools: error path removes metadata

When pool volume is create - it has already managed to update metadata
once within lv_extend - so revert new created LV here.

9 years agolvcreate: handle linear segment
Zdenek Kabelac [Sat, 11 Oct 2014 16:36:40 +0000 (18:36 +0200)]
lvcreate: handle linear segment

Put in code to accept 'linear' segment type
(when specified stripes cannot be used)

Also report 'error' when unknown type is specified.

9 years agopool: better error path handling
Zdenek Kabelac [Fri, 24 Oct 2014 12:22:25 +0000 (14:22 +0200)]
pool: better error path handling

Move test for size of new LV names in front before
any creation of LV.

Properly check striped  segtype kernel presence,
since passed 'segtype' is already tested.

Keep deactivation error path local to wiping part of the function.

Create metadata with temporary flag (it's activated, zeroed
and deactivated).

9 years agocleanup: code move
Zdenek Kabelac [Wed, 22 Oct 2014 11:53:36 +0000 (13:53 +0200)]
cleanup: code move

Update comment and move code to new place.
Gets updated with next commit.

9 years agocleanup: function embeded
Zdenek Kabelac [Wed, 22 Oct 2014 11:40:16 +0000 (13:40 +0200)]
cleanup: function embeded

It's used just in one place now.

9 years agocleanup: better stack tracing
Zdenek Kabelac [Wed, 22 Oct 2014 11:38:47 +0000 (13:38 +0200)]
cleanup: better stack tracing

Show proper backtrace on error path.

9 years agooptions: introduce pooldatasize option
Zdenek Kabelac [Sat, 18 Oct 2014 08:58:30 +0000 (10:58 +0200)]
options: introduce pooldatasize option

Introduce new option to specify pool data size.
This will be user to create i.e.  cache & cachepool at once.
And possible for thin external origin snapshot.

This is only very basic patch to enable options, the
real working code will come later.

9 years agocleanup: use matching flags for permissions
Zdenek Kabelac [Fri, 24 Oct 2014 11:07:02 +0000 (13:07 +0200)]
cleanup: use matching flags for permissions

Since our status bits are 64b - use uint64_t for permissions.

9 years agocleanup: lv_manip drops duplicated internal error
Zdenek Kabelac [Thu, 23 Oct 2014 10:40:15 +0000 (12:40 +0200)]
cleanup: lv_manip drops duplicated internal error

No reason to check the same condition twice with internal error.

9 years agocleanup: use arg_is_set
Zdenek Kabelac [Tue, 21 Oct 2014 10:03:07 +0000 (12:03 +0200)]
cleanup: use arg_is_set

9 years agocleanup: don't backup twice
Zdenek Kabelac [Mon, 20 Oct 2014 19:49:07 +0000 (21:49 +0200)]
cleanup: don't backup twice

9 years agocleanup: move code for checking vg features
Zdenek Kabelac [Tue, 21 Oct 2014 09:23:33 +0000 (11:23 +0200)]
cleanup: move code for checking vg features

Move code that checks for needed VG features into separate
smaller function.

9 years agocleanup: simplier lv name construction
Zdenek Kabelac [Fri, 24 Oct 2014 12:22:13 +0000 (14:22 +0200)]
cleanup: simplier lv name construction

Using NAME_LEN max lv name size.

9 years agocleanup: sort args alphabetically
Zdenek Kabelac [Sun, 19 Oct 2014 11:00:48 +0000 (13:00 +0200)]
cleanup: sort args alphabetically

Give it some order for easier human lookup for options we do support.

9 years agocleanup: move code
Zdenek Kabelac [Sat, 18 Oct 2014 09:01:34 +0000 (11:01 +0200)]
cleanup: move code

9 years agocleanup: indent
Zdenek Kabelac [Sat, 18 Oct 2014 09:01:29 +0000 (11:01 +0200)]
cleanup: indent

Various indents and tiny error message improvements.

9 years agocleanup: commands.h update descriptions
Zdenek Kabelac [Wed, 22 Oct 2014 20:43:42 +0000 (22:43 +0200)]
cleanup: commands.h update descriptions

9 years agocleanup: commands.h shorted string
Zdenek Kabelac [Sat, 18 Oct 2014 08:58:23 +0000 (10:58 +0200)]
cleanup: commands.h shorted string

Replace  " "\n"  with simplier  \n"

9 years agolv_manip: preserve read-only status in layered volume
Zdenek Kabelac [Thu, 23 Oct 2014 12:27:05 +0000 (14:27 +0200)]
lv_manip: preserve read-only status in layered volume

9 years agolv_manip: improve should_wipe reporting
Zdenek Kabelac [Wed, 22 Oct 2014 11:29:25 +0000 (13:29 +0200)]
lv_manip: improve should_wipe reporting

We want to print smarter warning message only when
the zeroing was not provided on the first zeroable segment
of newly created LV.

Put warning within _should_wipe_lv function to avoid reevaluation
of same conditions twice.

9 years agotoollib: new arg list functions
Zdenek Kabelac [Wed, 15 Oct 2014 13:06:42 +0000 (15:06 +0200)]
toollib: new arg list functions

Check for negative arg list:
arg_from_list_is_negative()

Check for zero arg in list:
arg_from_list_is_zero()

9 years agosegments: disable init of free segment
Zdenek Kabelac [Sat, 11 Oct 2014 07:10:07 +0000 (09:10 +0200)]
segments: disable init of free segment

Since it is not needed and would require separate
code for validation disable its initialization.

9 years agolvconvert: external detects more conflicts
Zdenek Kabelac [Sun, 19 Oct 2014 20:04:02 +0000 (22:04 +0200)]
lvconvert: external detects more conflicts

Check for more prohibited types for external origin conversion.
TODO: Move this function to separate validation code.
(Continuing in release fixes.)

9 years agolvcreate: move tests that requires activation
Zdenek Kabelac [Tue, 21 Oct 2014 10:12:45 +0000 (12:12 +0200)]
lvcreate: move tests that requires activation

Tests that needs active kernel driver put in single place.

9 years agolvcreate: better logging for temporary device
Zdenek Kabelac [Mon, 20 Oct 2014 19:53:48 +0000 (21:53 +0200)]
lvcreate: better logging for temporary device

Hide creation of temporary LVs and print them only in verbose mode.

e.g. hides confusing message about creation of _pmspare
device during creation of pool.

9 years agosegtypes: macro segtype_is_unknown
Zdenek Kabelac [Fri, 10 Oct 2014 20:22:43 +0000 (22:22 +0200)]
segtypes: macro segtype_is_unknown

9 years agotools: read yes_no_arg via int_value
Zdenek Kabelac [Sat, 11 Oct 2014 16:17:46 +0000 (18:17 +0200)]
tools: read yes_no_arg via int_value

yes_no_arg is already parsed so read parsed value as int.

9 years agotools: refactor reporter code
Zdenek Kabelac [Wed, 22 Oct 2014 12:30:33 +0000 (14:30 +0200)]
tools: refactor reporter code

Use new libdm macro DM_LIST_HEAD_INIT().
Embeded 'free' segment type (so it's not needed in the list)
Drop assignments of 0,NULL since they are defaults.

9 years agolibdm: add DM_LIST_HEAD_INIT macro
Zdenek Kabelac [Wed, 22 Oct 2014 12:30:19 +0000 (14:30 +0200)]
libdm: add DM_LIST_HEAD_INIT macro

Support to initialize dm_list struct members.

9 years agopool: better error message
Zdenek Kabelac [Mon, 20 Oct 2014 13:02:59 +0000 (15:02 +0200)]
pool: better error message

9 years agopool: fix testmode support with pools
Zdenek Kabelac [Mon, 20 Oct 2014 13:03:24 +0000 (15:03 +0200)]
pool: fix testmode support with pools

Allow the --test mode to proceed further.

9 years agoraid: query lock holder
Zdenek Kabelac [Tue, 21 Oct 2014 08:53:56 +0000 (10:53 +0200)]
raid: query lock holder

Ask for lock the proper LV.
Use the top-most LV to query for locally exclusive lock.

The rest of operations are then using 'lv_info()'

TODO:
  Check all devices are reloaded from proper level.
  In general any query on lv_is_active is supposed to be running
  ona lv_lock_holder() volume.

9 years agocache: better error message
Zdenek Kabelac [Mon, 20 Oct 2014 12:53:48 +0000 (14:53 +0200)]
cache: better error message

9 years agocache: validate for locked
Zdenek Kabelac [Mon, 20 Oct 2014 12:58:29 +0000 (14:58 +0200)]
cache: validate for locked

Add extra safety.

9 years agocleanup: drop default implementation
Zdenek Kabelac [Mon, 20 Oct 2014 18:09:42 +0000 (20:09 +0200)]
cleanup: drop default implementation

Now we reference segment name via  lvseg_name() and
we can drop default implementation and leave its
function pointer to be NULL.

Default give us 'return seg->segtype->name'.

9 years agosegments: introduce lvseg_name
Zdenek Kabelac [Mon, 20 Oct 2014 16:40:39 +0000 (18:40 +0200)]
segments: introduce lvseg_name

Instead of segtype->ops->name()  introduce lvseg_name().

This also allows us to leave name() function 'empty' for default
return of segtype->name.

TODO: add functions for rest of ops->

9 years agofile-locking: skip locking of VG_SYNC_NAMES
Zdenek Kabelac [Tue, 21 Oct 2014 12:47:46 +0000 (14:47 +0200)]
file-locking: skip locking of VG_SYNC_NAMES

VG_SYNC_NAMES is internal name with different meaning,
there is no point to search it in cache.

9 years agoreport: fix selection on {vg,lv}_permissions fields to properly match selection criteria
Peter Rajnoha [Thu, 23 Oct 2014 13:03:04 +0000 (15:03 +0200)]
report: fix selection on {vg,lv}_permissions fields to properly match selection criteria

There was a bug in value and their synonym definition for these two fields
causing selections on these fields to not work correctly - nothing matched
against vg/lv_permissions fields even if selection criteria should have
matched.

Scenario:
$ lvs -o name,lv_permissions vg
  LV    LPerms
  lvol0 read-only
  lvol1 writeable

Before this patch:

$ lvs -o name,lv_permissions vg -S 'permissions=read-only'
(blank)
$ lvs -o name,lv_permissions vg -S 'permissions=writeable
(blank)

With this patch applied:

$ lvs -o name,lv_permissions vg -S 'permissions=read-only'
  LV    LPerms
  lvol0 read-only
$ lvs -o name,lv_permissions vg -S 'permissions=writeable'
  LV    LPerms
  lvol1 writeable

Also synonyms match correctly now:
$ lvs -o name,lv_permissions vg -S 'permissions=rw'
  LV    LPerms
  lvol1 writeable

9 years agoreport: lv_permissions: display read-only/read-only-override instead of blank when...
Peter Rajnoha [Thu, 23 Oct 2014 08:18:29 +0000 (10:18 +0200)]
report: lv_permissions: display read-only/read-only-override instead of blank when LV is not writeable

Before this patch:
$ lvs -o name,lv_attr,lv_permissions
  LV    Attr       LPerms
  root  -wi-ao---- writeable
  swap  -wi-ao---- writeable
  lvol0 -Ri-a-----
  lvol1 -ri-a-----
  lvol2 -wi-a----- writeable
  lvol3 -ri-------

With this patch applied:
$ lvs -o name,lv_attr,lv_permissions
  LV    Attr       LPerms
  root  -wi-ao---- writeable
  swap  -wi-ao---- writeable
  lvol0 -Ri-a----- read-only-override
  lvol1 -ri-a----- read-only
  lvol2 -wi-a----- writeable
  lvol3 -ri------- read-only

("read-only-override" is displayed if the "writeable" permission
is overriden based on "activation/read_only_volume_list" lvm.conf
setting)

9 years agoNIX: Fix 32b builds (2G of RAM is 1M too much for 32b QEMU).
Petr Rockai [Wed, 22 Oct 2014 07:02:17 +0000 (09:02 +0200)]
NIX: Fix 32b builds (2G of RAM is 1M too much for 32b QEMU).

9 years agoliblvm2cmd: recognize quotes properly when splitting cmd line string into argv array...
Peter Rajnoha [Fri, 17 Oct 2014 11:55:06 +0000 (13:55 +0200)]
liblvm2cmd: recognize quotes properly when splitting cmd line string into argv array fields

Fix lvm_split that is called when cmd line string is separated into
argv fields to recognize quote chars ('\'" and '"') properly and
when these quotes are used, consider the text within quotes as one
argument, do not separate it based on space characters inside.

The lvm_split is used during processing lvm shell command line or
when calling lvm commands through cmdlib (e.g. dmeventd plugins).

For example, the lvm shell scenario:

Before this patch:
$lvm
lvm> lvs --config 'global{ suffix=0 }'
  Parse error at byte 9 (line 1): unexpected token
  Failed to set overridden configuration entries.

With this patch applied:
$lvm
lvm> lvs --config 'global{ suffix=0 }'
  LV    VG     Attr       LSize   Pool Origin Data%  Meta%  Move Log  Cpy%Sync Convert
  root  fedora -wi-ao----   9.00g
  swap  fedora -wi-ao---- 512.00m

(Exactly the same problem is hit when calling LVM commands with
quoted arguments via lvm2cmd lib in dmeventd plugins.)

9 years agotoollib: remove unsed variable in process_each_segment_in_pv
David Teigland [Thu, 16 Oct 2014 20:15:36 +0000 (15:15 -0500)]
toollib: remove unsed variable in process_each_segment_in_pv

Was left unused from the last change to this function.

9 years agotoollib: remove dead code
David Teigland [Wed, 15 Oct 2014 20:45:38 +0000 (15:45 -0500)]
toollib: remove dead code

Because of the recent change to process_each_pv(), the vg is always
provided when the pv is in a vg.  is_pv(pv) means the pv is in a vg,
which means that the vg arg will not be NULL, which means the removed
block of code is not needed.

9 years agoNIX: Give the VMs 2G of RAM (for tmpfs) until the new runner is merged.
Petr Rockai [Tue, 14 Oct 2014 17:06:26 +0000 (19:06 +0200)]
NIX: Give the VMs 2G of RAM (for tmpfs) until the new runner is merged.

9 years agovgcreate: Permit non-power-of-2 extent sizes.
Alasdair G Kergon [Tue, 14 Oct 2014 17:12:15 +0000 (18:12 +0100)]
vgcreate: Permit non-power-of-2 extent sizes.

Relax validation to permit extent sizes > 128KB that are not powers of 2
with lvm2 format.  Existing code was already capable of handling this.

9 years agosystemd: remove workaround for lvm2-monitor.service's ExecStop line
Peter Rajnoha [Tue, 14 Oct 2014 07:56:58 +0000 (09:56 +0200)]
systemd: remove workaround for lvm2-monitor.service's ExecStop line

Bug https://bugzilla.redhat.com/show_bug.cgi?id=843587 is handled better
now - the hang does not occur anymore. There are still error messages
issued though during shutdown if someone stops lvm2-lvmetad.service
manually that lvm2-monitor.service depends on (even during shutdown).
These errors are correct though and will point to incorrect
configuration (still having use_lvmetad=1 in lvm.conf and stopping
lvm2-lvmetad.service manually).

The workaround to prevent the hang is not needed now. So the
'--config "global{use_lvmetad=0}"' is now removed from the
lvm2-monitor.service's ExecStop line.

9 years agodevice: Fix BLKSSZGET definition check.
Alasdair G Kergon [Mon, 13 Oct 2014 17:15:41 +0000 (18:15 +0100)]
device: Fix BLKSSZGET definition check.

9 years agolvchange: Allow appropriate actions on cache (in addition to thin) pools.
Petr Rockai [Mon, 13 Oct 2014 14:21:41 +0000 (16:21 +0200)]
lvchange: Allow appropriate actions on cache (in addition to thin) pools.

9 years agotoollib: validate_restricted_lvname_param
Zdenek Kabelac [Wed, 8 Oct 2014 09:14:33 +0000 (11:14 +0200)]
toollib: validate_restricted_lvname_param

Lets make a separate new function to validate names that has
to follow up restriction rules.

9 years agofilter-usable: filter out blocked and suspended devices firmly when scanning for...
Peter Rajnoha [Wed, 8 Oct 2014 08:57:44 +0000 (10:57 +0200)]
filter-usable: filter out blocked and suspended devices firmly when scanning for lvmetad

We can't hang on blocked or suspended devices when the scan is done
for lvmetad update - when the device gets unblocked or resumed, there's
always CHANGE event generated which will fire the udev rule to run
extra pvscan --cache for that device which makes sure that lvmetad
is up-to-date.

9 years agovgremove: Use process_each_lv_in_vg.
Alasdair G Kergon [Tue, 7 Oct 2014 15:45:45 +0000 (16:45 +0100)]
vgremove: Use process_each_lv_in_vg.

9 years agotest: Fix lvconvert-raid-allocation's use of lvconvert --repair.
Petr Rockai [Tue, 7 Oct 2014 14:09:43 +0000 (16:09 +0200)]
test: Fix lvconvert-raid-allocation's use of lvconvert --repair.

9 years agometadata: Fix find_pv_in_vg for missing PVs/filtered devices.
Petr Rockai [Tue, 7 Oct 2014 14:06:21 +0000 (16:06 +0200)]
metadata: Fix find_pv_in_vg for missing PVs/filtered devices.

9 years agolvcreate: regression fix on lv name limits
Zdenek Kabelac [Tue, 7 Oct 2014 13:41:54 +0000 (15:41 +0200)]
lvcreate: regression fix on lv name limits

When we are given an existing LV name - it needs to be allowed
to pass in even restricted name as the LV could have existed
long before we introduced some new restriction on prefix/suffix.i

Fix the regression on name limits and drop restriction to be applied
on any existing LVs - only the new created LV names have to be
complient with current name restrictions.

FIXME: we are currently using restricted names incorrectly in few
other places - device_is_usable() skips restricted names,
and udev flags are also incorrectly set for restricted names
so these LVs are not getting links properly.

9 years agocleanup: rename _name, _lv and _size
Zdenek Kabelac [Tue, 7 Oct 2014 08:43:47 +0000 (10:43 +0200)]
cleanup: rename _name, _lv and _size

Use some standard names for lv char * names, logical_volume * lv
and sizes internally.

9 years agotests: typos
Zdenek Kabelac [Mon, 6 Oct 2014 21:25:49 +0000 (23:25 +0200)]
tests: typos

9 years agotests: put devs into ""
Zdenek Kabelac [Tue, 7 Oct 2014 07:54:47 +0000 (09:54 +0200)]
tests: put devs into ""

9 years agotests: check for cache and raid
Zdenek Kabelac [Tue, 7 Oct 2014 08:12:49 +0000 (10:12 +0200)]
tests: check for cache and raid

Skip some tests on systems without cache or raid.

9 years agotests: move cache raid to separate file
Zdenek Kabelac [Tue, 7 Oct 2014 08:12:39 +0000 (10:12 +0200)]
tests: move cache raid to separate file

9 years agocleanup: dont hide pv_dev declaration from pv
Zdenek Kabelac [Tue, 7 Oct 2014 08:17:34 +0000 (10:17 +0200)]
cleanup: dont hide pv_dev declaration from pv

Just skip using local vars here...

9 years agotest: Creating a cache on top of active RAID works now.
Petr Rockai [Tue, 7 Oct 2014 07:31:21 +0000 (09:31 +0200)]
test: Creating a cache on top of active RAID works now.

9 years agometadata: add internal error if PV has no existing device attached during find_pv_in_vg
Peter Rajnoha [Tue, 7 Oct 2014 06:58:51 +0000 (08:58 +0200)]
metadata: add internal error if PV has no existing device attached during find_pv_in_vg

find_pv_in_vg fn iterates over the list of PVs covered by the VG and
each PV's pvl->pv->dev is compared with device acquired from device
cache. However, in case pvl->pv->dev is NULL as well as device cache
returns NULL (e.g. when device is filtered), we'll get incorrect match
and the code calling find_pv_in_vg uses incorrect PV (as it thinks
it's the exact PV with the pv_name). The INTERNAL_ERROR covers this
situation and errors out immediately.

9 years agolvconvert: Allow --repair and --splitmirrors on reserved-name LVs.
Petr Rockai [Tue, 7 Oct 2014 06:55:09 +0000 (08:55 +0200)]
lvconvert: Allow --repair and --splitmirrors on reserved-name LVs.

9 years agotest: Add process-each toollib tests.
David Teigland [Tue, 7 Oct 2014 00:08:03 +0000 (01:08 +0100)]
test: Add process-each toollib tests.

9 years agometadata: Use flags to control warnings.
David Teigland [Tue, 7 Oct 2014 00:04:09 +0000 (01:04 +0100)]
metadata: Use flags to control warnings.

The warnings arg was used to enable logging of warnings
when reading a PV.  This arg is turned into a set of flags
with the WARN_PV_READ flag matching the existing behavior.

A new flag WARN_INCONSISTENT is added that will cause
vg_read_internal() to log the "VG is not consistent"
warning so the various callers do not need to log
this warning themselves.

A new vg_read flag READ_WARN_INCONSISTENT is used from
reporting to enable the WARN_INCONSISTENT flag in
vg_read_internal.

[Committed by agk with cosmetic changes and tweaks.]

9 years agovgreduce: Use process_each_pv.
David Teigland [Mon, 6 Oct 2014 23:53:56 +0000 (00:53 +0100)]
vgreduce: Use process_each_pv.

Adapt process_each_pv for use by vgreduce in the non-repair case.

[Committed by agk with cosmetic changes and tweaks.]

9 years agotoollib: Rewrite process_each_pv.
David Teigland [Mon, 6 Oct 2014 23:34:04 +0000 (00:34 +0100)]
toollib: Rewrite process_each_pv.

Process PVs by iterating through VGs, then iterating through
devices if the command needs to process non-PV devices.
The process_single function can always use the VG and PV args.

[Committed by agk with cosmetic changes and tweaks.]

9 years agolvmcache: Skip VG_GLOBAL cache lock state update.
Alasdair G Kergon [Mon, 6 Oct 2014 23:30:28 +0000 (00:30 +0100)]
lvmcache: Skip VG_GLOBAL cache lock state update.

Avoids message:
  Metadata cache has no info for vgname: "#global"

9 years agoman: lvmcache mention automatic pool conversion
David Teigland [Mon, 6 Oct 2014 21:12:51 +0000 (16:12 -0500)]
man: lvmcache mention automatic pool conversion

When converting an origin to a cache lv, lvm will automatically convert
the specified cache pool into a cache pool if it is not already a cache
pool.

9 years agotoollib: Shuffle PV functions.
Alasdair G Kergon [Mon, 6 Oct 2014 21:02:00 +0000 (22:02 +0100)]
toollib: Shuffle PV functions.

9 years agoman: lvmcache changes related to removal and splitting
David Teigland [Mon, 6 Oct 2014 19:04:09 +0000 (14:04 -0500)]
man: lvmcache changes related to removal and splitting

9 years agoman: lvmthin show the lvcreate -n option for pools
David Teigland [Mon, 6 Oct 2014 18:29:18 +0000 (13:29 -0500)]
man: lvmthin show the lvcreate -n option for pools

lvcreate of thin pools can now use '-n lv vg' like other lv types,
or it can name the new thin pool in the free arg as 'vg/lv', which
is not allowed with other lv types.

9 years agotoollib: Remove unused functions from header file.
Alasdair G Kergon [Mon, 6 Oct 2014 14:22:01 +0000 (15:22 +0100)]
toollib: Remove unused functions from header file.

9 years agotests: lvconvert cache usage of thin pool
Zdenek Kabelac [Mon, 6 Oct 2014 13:30:19 +0000 (15:30 +0200)]
tests: lvconvert cache usage of thin pool

Checked stacking usage of thin pool data volume being cached.

9 years agotests: lvconvert thin pool
Zdenek Kabelac [Mon, 6 Oct 2014 09:56:09 +0000 (11:56 +0200)]
tests: lvconvert thin pool

More tests.

9 years agotests: lvconvert cache
Zdenek Kabelac [Mon, 6 Oct 2014 09:49:49 +0000 (11:49 +0200)]
tests: lvconvert cache

Many new tests

9 years agotests: lvcreate external origin
Zdenek Kabelac [Mon, 6 Oct 2014 09:52:40 +0000 (11:52 +0200)]
tests: lvcreate external origin

Fix unsupportable case.
We cannot create thinpool and snapshot at the same time.
(-L could not have 2 meanings).

9 years agotests: lvcreate thin-pool support --name
Zdenek Kabelac [Sun, 5 Oct 2014 18:00:39 +0000 (20:00 +0200)]
tests: lvcreate thin-pool support --name

9 years agotests: lvcreate cache interface updates
Zdenek Kabelac [Fri, 3 Oct 2014 17:02:37 +0000 (19:02 +0200)]
tests: lvcreate cache interface updates

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