]> sourceware.org Git - lvm2.git/log
lvm2.git
12 years agoFix the last fix (t-XXX -> shell/XXX).
Petr Rockai [Mon, 21 Nov 2011 11:36:53 +0000 (11:36 +0000)]
Fix the last fix (t-XXX -> shell/XXX).

12 years agoFix the fallout in shell tests from the t-XXX -> shell/XXX move.
Petr Rockai [Mon, 21 Nov 2011 11:25:35 +0000 (11:25 +0000)]
Fix the fallout in shell tests from the t-XXX -> shell/XXX move.

12 years agoAdd CUnit testing support
Zdenek Kabelac [Mon, 21 Nov 2011 10:40:21 +0000 (10:40 +0000)]
Add CUnit testing support

Regenerate configure for unit test support.

12 years agoTidy the shell tests into their own subdir. We now have:
Petr Rockai [Mon, 21 Nov 2011 00:15:42 +0000 (00:15 +0000)]
Tidy the shell tests into their own subdir. We now have:
- test/lib -- infrastructure and helper code
- test/api -- liblvm2app API tests
- test/unit -- C-based unit tests
- test/shell -- shell-based functional tests

12 years agoFix a syntax error.
Petr Rockai [Sun, 20 Nov 2011 21:55:24 +0000 (21:55 +0000)]
Fix a syntax error.

12 years agoImplement a CUnit-based runner for unit tests. Copy and adapt (actual unit)
Petr Rockai [Sun, 20 Nov 2011 21:43:20 +0000 (21:43 +0000)]
Implement a CUnit-based runner for unit tests. Copy and adapt (actual unit)
tests from unit-tests/*/*_t.c (now under test/unit). The valgrind/pool test is
missing, since it's not really a unit test and probably not too valuable
either. Available via "make unit" (and if --enable-testing was passed to
configure, also executed by make check).

12 years agoDon't ignore configure --mandir and --infodir.
Alasdair Kergon [Sun, 20 Nov 2011 20:52:09 +0000 (20:52 +0000)]
Don't ignore configure --mandir and --infodir.

12 years agoDrop pool memory allocated in lv_has_target_type
Zdenek Kabelac [Fri, 18 Nov 2011 19:42:03 +0000 (19:42 +0000)]
Drop pool memory allocated in lv_has_target_type

Remove FIXMES - there should not be any pool free call since
the memory pool is from device manager, and pool is detroyed
after the operation, so doing extra free here would not help here.

However lv_has_target_type() is using cmd mempool so here the extra
call for dm_pool_free makes sence.

12 years agoRemove constant expression check
Zdenek Kabelac [Fri, 18 Nov 2011 19:36:10 +0000 (19:36 +0000)]
Remove constant expression check

"result_independent_of_operands: ((dev->dev & 0xfff00UL) >> 8) ==
18446744073709551615UL /* -1 */ is always false regardless of the values
of its operands (logical operand of if)."

'dev->dev' is set in dev-cache.c _insert() and it's not expectable
st_rdev would have '-1'

This code has been introduced with drbd support commit and code never
worked - so eliminated.

12 years agoCheck target type name for DM_MAX_TYPE_NAME length
Zdenek Kabelac [Fri, 18 Nov 2011 19:34:02 +0000 (19:34 +0000)]
Check target type name for DM_MAX_TYPE_NAME length

Avoid creation of target type name when it's longer then
DM_MAX_TYPE_NAME (noticed by static analyzer where the
sp.target_type might be missing '\0' at the end.)

Before patch:

$> dmsetup create long
0 1000 looooooooooooooooooooooooooong
^D
device-mapper: reload ioctl failed: Invalid argument

After patch:

$> dmsetup create xxx
0 1000 looooooooooooooooooooooooooong
Target type name looooooooooooooooooooooooooong is too long.
Command failed

12 years agoReplace dynamic buffer allocations for PATH_MAX
Zdenek Kabelac [Fri, 18 Nov 2011 19:31:09 +0000 (19:31 +0000)]
Replace dynamic buffer allocations for PATH_MAX

Use static buffer instead of stack allocated buffer.
This reduces stack size usage of lvm tool and the
change is very simple.

Since the whole library is not thread safe - it should not
add any new problems - and if there will be some conversion
it's easy to convert this to use some preallocated buffer.

12 years agoUnlock memory for vg_write
Zdenek Kabelac [Fri, 18 Nov 2011 19:28:00 +0000 (19:28 +0000)]
Unlock memory for vg_write

For write we do not need to hold memory locked.
This relaxes many conditions and avoid problems when allocating
a lot of memory for writting metadata buffers.
(In case of huge MDA size this would lead to mismatch between
locked and unlocked memory region size).

Add also internal check we are not writing in critical section.

12 years agoQuery before removing inactive snapshots
Zdenek Kabelac [Fri, 18 Nov 2011 19:25:20 +0000 (19:25 +0000)]
Query before removing inactive snapshots

Removal of an inactive origin removes also all related snapshots.

When we now support 'old' external snapshots with thin volumes,
removal of pool will not only drop all thin volumes, but as
a consequence also all snapshots - which might be seen a bit
unexpected for the user - so add a query to confirm such action.

lvremove -f will skip the prompt.

12 years agoAllow to activate snapshot
Zdenek Kabelac [Fri, 18 Nov 2011 19:22:49 +0000 (19:22 +0000)]
Allow to activate snapshot

Add extra code to active and deactivate related
snapshots and origin when user specifies snapshot
logical volume as lvchange parameter.

Before patch:

$> lvs -a
  LV    VG   Attr     LSize  Pool Origin Snap%  Move Log Copy%  Convert
  lvol0 mvg  owi-a-s-  1.00k
  lvol1 mvg  swi-a-s- 16.00k      lvol0    0.00
  lvol2 mvg  swi-a-s- 16.00k      lvol0    0.00

$> lvchange -an mvg/lvol2; echo $?
  Can't change snapshot logical volume "lvol2".
5

After patch:

$> lvchange -an mvg/lvol2
Change of snapshot lvol2 will also change its origin lvol0 and 1 other
snapshot(s). Proceed? [y/n]: n
  Logical volume lvol2 not changed.

$> lvchange -y -an mvg/lvol2; echo $?
0

$> lvs -a
  LV    VG   Attr     LSize  Pool Origin Snap%  Move Log Copy%  Convert
  lvol0 mvg  owi---s-  1.00k
  lvol1 mvg  swi---s- 16.00k      lvol0
  lvol2 mvg  swi---s- 16.00k      lvol0

12 years agoSkip non-virtual snapshots for availability
Zdenek Kabelac [Fri, 18 Nov 2011 19:19:22 +0000 (19:19 +0000)]
Skip non-virtual snapshots for availability

Change the behavior of availability change.
With this patch the lvgchange returns success
when VG is properly changed.

It skips non-virtual origins from being changes when
only 'vg' is specified as lvchange -a parameter.

Before this change we had this:

$> lvs -a
  LV    VG   Attr     LSize   Pool Origin
  lvol0 mvg  owi-a-s- 128.00k
  lvol1 mvg  owi-a-s- 128.00k
  lvol2 mvg  swi-a-s-   1.25m      lvol0
  lvol3 mvg  swi-a-s-   1.25m      lvol1

$> lvchange -an mvg ; echo $?
  Can't change snapshot logical volume "lvol2".
  Can't change snapshot logical volume "lvol3".
5

$> lvs -a
  LV    VG   Attr     LSize   Pool Origin
  lvol0 mvg  owi---s- 128.00k
  lvol1 mvg  owi---s- 128.00k
  lvol2 mvg  swi---s-   1.25m      lvol0
  lvol3 mvg  swi---s-   1.25m      lvol1

$> lvchange -ay mvg ; echo $?
  Can't change snapshot logical volume "lvol2".
  Can't change snapshot logical volume "lvol3".
5

$> lvs
  LV    VG   Attr     LSize   Pool Origin
  lvol0 mvg  owi-a-s- 128.00k
  lvol1 mvg  owi-a-s- 128.00k
  lvol2 mvg  swi-a-s-   1.25m      lvol0
  lvol3 mvg  swi-a-s-   1.25m      lvol1

After commit:

$> lvs -a
  LV    VG   Attr     LSize   Pool Origin
  lvol0 mvg  owi-a-s- 128.00k
  lvol1 mvg  owi-a-s- 128.00k
  lvol2 mvg  swi-a-s-   1.25m      lvol0
  lvol3 mvg  swi-a-s-   1.25m      lvol1

$> lvchange -an mvg ; echo $?
0

$> lvs -a
  LV    VG   Attr     LSize   Pool Origin
  lvol0 mvg  owi---s- 128.00k
  lvol1 mvg  owi---s- 128.00k
  lvol2 mvg  swi---s-   1.25m      lvol0
  lvol3 mvg  swi---s-   1.25m      lvol1

$> lvchange -ay mvg ; echo $?
0

$> lvs -a
  LV    VG   Attr     LSize   Pool Origin
  lvol0 mvg  owi-a-s- 128.00k
  lvol1 mvg  owi-a-s- 128.00k
  lvol2 mvg  swi-a-s-   1.25m      lvol0
  lvol3 mvg  swi-a-s-   1.25m      lvol1

12 years agoAdjusted mirror region size only for mirrors and raids
Zdenek Kabelac [Tue, 15 Nov 2011 17:32:12 +0000 (17:32 +0000)]
Adjusted mirror region size only for mirrors and raids

Update region_size only for mirror and raid targets.
This fixes warning messages when vg is using small
extent size like 1KiB and no mirror/raid is created,
but the user still got the message:

$> vgcreate -s 1K vg  <pvs>
$> lvcreate -L10K vg
Using reduced mirror region size of 4 sectors

12 years agoThin update prompt message
Zdenek Kabelac [Tue, 15 Nov 2011 17:29:52 +0000 (17:29 +0000)]
Thin update prompt message

Enhance message with info about how many thin volumes are going to
be removed with thin pool removal.

12 years agoReorder AND test condition
Zdenek Kabelac [Tue, 15 Nov 2011 17:27:41 +0000 (17:27 +0000)]
Reorder AND test condition

Take the easiest condition for checking first since they must
apply all together, check local conditions first before doing
more expensive tests.

12 years agoThin clean
Zdenek Kabelac [Tue, 15 Nov 2011 17:25:05 +0000 (17:25 +0000)]
Thin clean

Reuse seg pointer already set in _add_lv_to_dtree to have the
value of first_seg(lv) (and is used in other parts of this function).

12 years agoThin supports only thin volumes as snapshot origins
Zdenek Kabelac [Tue, 15 Nov 2011 17:23:51 +0000 (17:23 +0000)]
Thin supports only thin volumes as snapshot origins

It's currently of the scope to properly solve the snapshoting
of internal thin devs so prevent non-toplevel snapshots here.

12 years agoSimplify iteration
Zdenek Kabelac [Tue, 15 Nov 2011 17:21:02 +0000 (17:21 +0000)]
Simplify iteration

Since nothing is removed in dm_list snapshot_segs during the loop,
there is no reason to use _safe iteration, so switch to simplier
dm_list_iterate().

12 years agoThin fix tpool layer
Zdenek Kabelac [Tue, 15 Nov 2011 17:15:03 +0000 (17:15 +0000)]
Thin fix tpool layer

Since we support snapshots of thin volumes, we could have more layers,
so we have to check whether tpool layer is going to be inserted.

As the _add_segment_to_dtree() is the only place that adds tpool
segment, we may just check pointer (no strcmp for layer).

Switch to use  seg_is_  function instead of lv_is_.

12 years agoInclude a copy of kernel DM documentation in doc/kernel
Alasdair Kergon [Tue, 15 Nov 2011 13:54:20 +0000 (13:54 +0000)]
Include a copy of kernel DM documentation in doc/kernel

12 years agoAvoid 'mda inconsistency' by properly registering UNLABELLED_PV flag (2.02.86).
Peter Rajnoha [Tue, 15 Nov 2011 11:54:15 +0000 (11:54 +0000)]
Avoid 'mda inconsistency' by properly registering UNLABELLED_PV flag (2.02.86).

When a PV label write is deferred to a vg_write call (as introduced by a patch
in 2.02.86), the PV is flagged with the internal UNLABELLED_PV flag. However,
when calling vg_archive before vg_write, we still have the PV labelled with the
UNLABELLED_PV flag which was not recognised as a proper flag while exporting
VG metadata:

  # vgcreate vg /dev/sda
  No physical volume label read from /dev/sda
  Metadata inconsistency: Not all flags successfully exported.
  Metadata inconsistency: Not all flags successfully exported.
  Writing physical volume data to disk "/dev/sda"
  Physical volume "/dev/sda" successfully created
  Volume group "vg" successfully created

12 years agoMake dmsetup.static and lvm.static build when dmeventd is disabled.
Alasdair Kergon [Mon, 14 Nov 2011 21:30:35 +0000 (21:30 +0000)]
Make dmsetup.static and lvm.static build when dmeventd is disabled.
udev may also need to be disabled if you didn't build it statically too.

dmeventd.static could be fixed with some more work but I don't really see the
point: without dlopen() it's useless, and if you have dlopen(), why not support
normal shared libraries too?

12 years agoIncomplete documentation is worse than no documentation.
Alasdair Kergon [Sun, 13 Nov 2011 01:41:57 +0000 (01:41 +0000)]
Incomplete documentation is worse than no documentation.
Any documentation less-detailed than Documentation/device-mapper is
dangerous for the non-trivial ctr lines.  And anyway, this should be in s4
not here.

12 years agoAdd missing stack reporting
Zdenek Kabelac [Sat, 12 Nov 2011 22:53:23 +0000 (22:53 +0000)]
Add missing stack reporting

also remove unneeded {}

12 years agoThin use items iterator and stack reporting
Zdenek Kabelac [Sat, 12 Nov 2011 22:52:18 +0000 (22:52 +0000)]
Thin use items iterator and stack reporting

12 years agoMissing stack printing
Zdenek Kabelac [Sat, 12 Nov 2011 22:51:20 +0000 (22:51 +0000)]
Missing stack printing

12 years agoUpdate dmsetup man page
Zdenek Kabelac [Sat, 12 Nov 2011 22:48:44 +0000 (22:48 +0000)]
Update dmsetup man page

Use standard manpage style.
Keep options and commands in alphabetic order.
Added at least a very simply info about some other targets.
TODO: documenting targest needs far more work...

12 years agoThin remove unused define
Zdenek Kabelac [Sat, 12 Nov 2011 22:44:10 +0000 (22:44 +0000)]
Thin remove unused define

Remove DM_THIN_ERROR_DEVICE_ID from API.
Remove API warning.
Drop code that was using DM_THIN_ERROR_DEVICE_ID (already commented)
Remove debug message which slipped in through some previous commit.

12 years agoMove gentoo MAKEDEV to /sbin in lvm2create_initrd. (James Le Cuirot)
Alasdair Kergon [Sat, 12 Nov 2011 17:03:53 +0000 (17:03 +0000)]
Move gentoo MAKEDEV to /sbin in lvm2create_initrd. (James Le Cuirot)

12 years agoFix major number filter structure boundary test.
Milan Broz [Fri, 11 Nov 2011 16:59:30 +0000 (16:59 +0000)]
Fix major number filter structure boundary test.

12 years agoRemove unneeded parameter.
Milan Broz [Fri, 11 Nov 2011 16:41:37 +0000 (16:41 +0000)]
Remove unneeded parameter.

12 years agoAnd now add files for real.
Milan Broz [Fri, 11 Nov 2011 15:24:48 +0000 (15:24 +0000)]
And now add files for real.

12 years agoFix function name in previous patch.
Milan Broz [Fri, 11 Nov 2011 15:14:05 +0000 (15:14 +0000)]
Fix function name in previous patch.

12 years agoDo not scan device if it is part of active multipath.
Milan Broz [Fri, 11 Nov 2011 15:11:08 +0000 (15:11 +0000)]
Do not scan device if it is part of active multipath.

Add filter which tries to check if scanned device is part
of active multipath.

Firstly, only SCSI major number devices are handled in filter.

Then it checks if device has exactly one holder (in sysfs) and
if it is device-mapper device and DM-UUID is prefixed by "MPATH-".

If so, this device is filtered out.

The whole filter can be switched off by setting
mpath_component_detection in lvm.conf.

https://bugzilla.redhat.com/show_bug.cgi?id=597010

Signed-off-by: Milan Broz <mbroz@redhat.com>
12 years agoThin send create_snap message
Zdenek Kabelac [Thu, 10 Nov 2011 15:30:59 +0000 (15:30 +0000)]
Thin send create_snap message

Start creating snapshots for real.
Update test suite to check it happens.

12 years agoThin update testing script
Zdenek Kabelac [Thu, 10 Nov 2011 12:44:33 +0000 (12:44 +0000)]
Thin update testing script

12 years agoAdd generic function to check for target version
Zdenek Kabelac [Thu, 10 Nov 2011 12:44:00 +0000 (12:44 +0000)]
Add generic function to check for target version

So the test script may use a simple line like i.e.:

aux target_at_least dm-thin-pool 1 0 0 || skip
aux target_at_least snapshot-origin 1 6 || skip

12 years agoSmall comment and indent updates
Zdenek Kabelac [Thu, 10 Nov 2011 12:43:05 +0000 (12:43 +0000)]
Small comment and indent updates

12 years agoThin test min thin_pool size for at least 1 chunk
Zdenek Kabelac [Thu, 10 Nov 2011 12:42:36 +0000 (12:42 +0000)]
Thin test min thin_pool size for at least 1 chunk

12 years agoThin align volume size on chunk boundary size
Zdenek Kabelac [Thu, 10 Nov 2011 12:42:15 +0000 (12:42 +0000)]
Thin align volume size on chunk boundary size

If the extent_size is smaller then the chunk_size we may try
to find better aligment (wasting less space).

i.e. using  4KB extent_size and  64KB chunk size will
lead to creation of 64KB aligned thin volume.

12 years agoThin lvcreate manpage
Zdenek Kabelac [Thu, 10 Nov 2011 12:41:39 +0000 (12:41 +0000)]
Thin lvcreate manpage

Merge thin creation into standard 1st. lvcreate.
Update snapshot for thin support.

12 years agoThin move _read_activation_params check
Zdenek Kabelac [Thu, 10 Nov 2011 12:40:29 +0000 (12:40 +0000)]
Thin move _read_activation_params check

Since we finaly recognize thin creation only after
_determine_snapshot_type() - move _read_activation_params()
after it - so we can support  lvcreate -an thin snapshot.

12 years agoThin create normal (old) snapshot when size is specified
Zdenek Kabelac [Thu, 10 Nov 2011 12:39:46 +0000 (12:39 +0000)]
Thin create normal (old) snapshot when size is specified

12 years agoThin disable pool create without activation
Zdenek Kabelac [Thu, 10 Nov 2011 12:39:01 +0000 (12:39 +0000)]
Thin disable pool create without activation

12 years agoAdd missing free() for line that is malloc()'d by getline().
Mike Snitzer [Tue, 8 Nov 2011 19:02:21 +0000 (19:02 +0000)]
Add missing free() for line that is malloc()'d by getline().

12 years agoFix _get_proc_number to be tolerant of malformed /proc/misc entries.
Mike Snitzer [Tue, 8 Nov 2011 17:32:10 +0000 (17:32 +0000)]
Fix _get_proc_number to be tolerant of malformed /proc/misc entries.

Fixes issue reported here: http://lkml.org/lkml/2011/11/8/190

12 years agoThin ensure pool table is update after resize
Zdenek Kabelac [Tue, 8 Nov 2011 12:19:53 +0000 (12:19 +0000)]
Thin ensure pool table is update after resize

Always make sure table gets reloaded.
For now activate and deactivate pool volume if it's not active.

FIXME: we could do this only if we are sure some thin volume is alive.

12 years agoUpdate lvs man page style.
Zdenek Kabelac [Tue, 8 Nov 2011 12:16:53 +0000 (12:16 +0000)]
Update  lvs man page style.

12 years agoMore lvcreate man updates
Zdenek Kabelac [Tue, 8 Nov 2011 12:12:31 +0000 (12:12 +0000)]
More lvcreate man updates

Use  { Name | Path } consistently like elsewhere.
Move --thin alphabetically before --type.

12 years agoCorrectly handle concurrent read (CR) locks in singlenode clvmd. This means
Petr Rockai [Mon, 7 Nov 2011 17:11:23 +0000 (17:11 +0000)]
Correctly handle concurrent read (CR) locks in singlenode clvmd. This means
that we can also test clustered volume groups (vgcreate -c y) in the test
suite. Unfortunately we can't make this the testing default since cluster
mirrors require further infrastructure, and snapshots probably don't work at
all. I'll eventually add a few test cases that create clustered VGs
specifically.

12 years agoDo not repeat a failed test's output when VERBOSE is in effect.
Petr Rockai [Mon, 7 Nov 2011 17:02:56 +0000 (17:02 +0000)]
Do not repeat a failed test's output when VERBOSE is in effect.

12 years agoMust not override alloc policy specified by user.
Alasdair Kergon [Mon, 7 Nov 2011 13:54:54 +0000 (13:54 +0000)]
Must not override alloc policy specified by user.

12 years agoThin add error message for double delete
Zdenek Kabelac [Mon, 7 Nov 2011 11:04:45 +0000 (11:04 +0000)]
Thin add error message for double delete

Add few more internal error messages.

12 years agoThin supports snapshots
Zdenek Kabelac [Mon, 7 Nov 2011 11:03:47 +0000 (11:03 +0000)]
Thin supports snapshots

Full support for thin snapshots.
Create and remove is supported.

TODO: lvconvert support is not yes available.

12 years agoAdd missing default LVM_VG_NAME
Zdenek Kabelac [Mon, 7 Nov 2011 11:01:53 +0000 (11:01 +0000)]
Add missing default LVM_VG_NAME

Add support for exported shell variable LVM_VG_NAME also
for thins and snapshots.

12 years agoThin lvcreate poolmetadatasize units doc
Zdenek Kabelac [Mon, 7 Nov 2011 10:59:55 +0000 (10:59 +0000)]
Thin lvcreate poolmetadatasize units doc

12 years agoThin reindent code
Zdenek Kabelac [Mon, 7 Nov 2011 10:59:07 +0000 (10:59 +0000)]
Thin reindent code

Drop indention level
Add extra internal error.

12 years agoThin revert code for exclusive pool activation
Zdenek Kabelac [Mon, 7 Nov 2011 10:58:13 +0000 (10:58 +0000)]
Thin revert code for exclusive pool activation

There are no limits on thin-pool activation now.
Revert code that is no longer needed.

12 years agoAvoid lvextend to overflow
Zdenek Kabelac [Fri, 4 Nov 2011 22:49:53 +0000 (22:49 +0000)]
Avoid lvextend to overflow

Add extra check to extent_count overflow.
Use internal define MAX_EXTENT_COUNT instead UINT32_MAX.

12 years agoThin lvcreate man update
Zdenek Kabelac [Fri, 4 Nov 2011 22:47:17 +0000 (22:47 +0000)]
Thin lvcreate man update

Added poolmetadatasize options
Add an example.

12 years agoThin pool allocation simplified
Zdenek Kabelac [Fri, 4 Nov 2011 22:45:52 +0000 (22:45 +0000)]
Thin pool allocation simplified

Support allocation of metadata from the same PV, if the VG
is build only from one PV.

As thinp is not mirror - we do not require 2 PVs
for basic thin usage as user is losing only perfomance.

12 years agoThin add thin_pool_metadata_require_separate_pvs
Zdenek Kabelac [Fri, 4 Nov 2011 22:44:21 +0000 (22:44 +0000)]
Thin add thin_pool_metadata_require_separate_pvs

Allow to set different policy for pool from mirrors.

12 years agoThin supports poolmetadatasize setting
Zdenek Kabelac [Fri, 4 Nov 2011 22:43:10 +0000 (22:43 +0000)]
Thin supports poolmetadatasize setting

Add option to set pool metadatasize.
For passing size parameter reuse region_size.

12 years agoThin fix condition check for transation_id
Zdenek Kabelac [Fri, 4 Nov 2011 12:39:45 +0000 (12:39 +0000)]
Thin fix condition check for transation_id

id2 must be checked.
(missed in yesterday commit set).

12 years agoAdd missing lvrename mirrored log recursion in for_each_sub_lv.
Alasdair Kergon [Fri, 4 Nov 2011 01:31:23 +0000 (01:31 +0000)]
Add missing lvrename mirrored log recursion in for_each_sub_lv.

12 years agoThin keep pool device in the same state
Zdenek Kabelac [Thu, 3 Nov 2011 15:58:20 +0000 (15:58 +0000)]
Thin keep pool device in the same state

Leave the optimalisation to be done differently and preserve
availability state of the pool device.

12 years agoThin no device is created - so nothing to revert here
Zdenek Kabelac [Thu, 3 Nov 2011 15:46:51 +0000 (15:46 +0000)]
Thin no device is created - so nothing to revert here

12 years agoThin removing limitation on activation of pool device.
Zdenek Kabelac [Thu, 3 Nov 2011 14:59:20 +0000 (14:59 +0000)]
Thin removing limitation on activation of pool device.

Since activation of pool is now independent on thin activation,
user may do whatever he needs - thought preferable thin should stay alive,
but it it will be found inactivate, update_pool will bring the pool up.

12 years agoThin removing unused detach_pool_messages
Zdenek Kabelac [Thu, 3 Nov 2011 14:57:04 +0000 (14:57 +0000)]
Thin removing unused detach_pool_messages

12 years agoThin using update_pool_lv
Zdenek Kabelac [Thu, 3 Nov 2011 14:56:20 +0000 (14:56 +0000)]
Thin using update_pool_lv

Replace detach_pool_messages with update_pool_lv.
Move creation code from to 'if' condition into 1.
Ensure creation has finished all previous message operations.

12 years agoThin genering update_pool_lv function
Zdenek Kabelac [Thu, 3 Nov 2011 14:53:58 +0000 (14:53 +0000)]
Thin genering update_pool_lv function

Function to trigger pool message passing via resume,
or resize of the pool itself independently on other thins.

12 years agoAdd -tpool layer in activation tree
Zdenek Kabelac [Thu, 3 Nov 2011 14:52:09 +0000 (14:52 +0000)]
Add -tpool layer in activation tree

Let's put the overlay device over real thin pool device.
So we can get the proper locking on cluster.
Overwise the pool LV would be activate once implicitely
and in other case explicitely, confusing locking mechanism.
This patch make the activation of pool LV independent on
activation of thin LV since they will both implicitely use
real -thin pool device.

12 years agoThin api change for passing message into libdm
Zdenek Kabelac [Thu, 3 Nov 2011 14:45:01 +0000 (14:45 +0000)]
Thin api change for passing message into libdm

Avoid exposing another struct to the libdm user and
use only simple dm_tree_node_add_thin_pool_message with
2 overloaded uint64_t values.

12 years agoThin api change for dm_tree_node_add_thin_target
Zdenek Kabelac [Thu, 3 Nov 2011 14:43:21 +0000 (14:43 +0000)]
Thin api change for dm_tree_node_add_thin_target

A little code shuffling and adding support for
DM_THIN_ERROR_DEVICE_ID which might be eventually be used
for activation of thin which is going to be deleted.
For now we do not need it lvm.

12 years agoThin avoids need of having writable VG for activation
Zdenek Kabelac [Thu, 3 Nov 2011 14:41:18 +0000 (14:41 +0000)]
Thin avoids need of having writable VG for activation

12 years agoThin uses _tdata instead of _tpool for data LV
Zdenek Kabelac [Thu, 3 Nov 2011 14:38:36 +0000 (14:38 +0000)]
Thin uses _tdata instead of _tpool for data LV

Switch to different suffix and keep -tpool reserved for overlay device name.

12 years agoThin clean using delete_id consitently
Zdenek Kabelac [Thu, 3 Nov 2011 14:37:23 +0000 (14:37 +0000)]
Thin clean using delete_id consitently

12 years agoThin code cleanup
Zdenek Kabelac [Thu, 3 Nov 2011 14:36:40 +0000 (14:36 +0000)]
Thin code cleanup

Use iterate_items for list processing.

12 years agoAdd "ExecReload" to dm-event.service for systemd to reload dmeventd properly.
Peter Rajnoha [Mon, 31 Oct 2011 12:22:49 +0000 (12:22 +0000)]
Add "ExecReload" to dm-event.service for systemd to reload dmeventd properly.

Normally, restart simply means "stop and start" for systemd. However, if
we're installing new versions of the dmeventd binary/libdevmapper, we need
to restart dmeventd. This fails if we have some devices monitored - we need
to call "dmeventd -R" instead.

The "ExecReload" did not work quite well in some old versions of systemd,
systemd assumed that only the configuration is reloaded on "ExecReload",
not the whole binary itself so it lost track of dmeventd daemon (it lost new
dmeventd PID). This is fixed and seems to be working fine now with recent
versions of dmeventd.

12 years agoThin fix compile warns
Zdenek Kabelac [Sun, 30 Oct 2011 22:52:08 +0000 (22:52 +0000)]
Thin fix compile warns

Test for dm_snprintf < 0.
Add header for moved backup.

12 years agoMore updates for lvcreate manpage
Zdenek Kabelac [Sun, 30 Oct 2011 22:08:21 +0000 (22:08 +0000)]
More updates for lvcreate manpage

12 years agoThin creation without activation
Zdenek Kabelac [Sun, 30 Oct 2011 22:07:38 +0000 (22:07 +0000)]
Thin creation without activation

All thins are created with the next activation and VG is updated
without messages. Only some basic commands works.
(i.e. lvcreate -an  -V10 -T mvg/pool)
There can be some combination to confuse this system.

This functionality for snapshots is going to be interesting.

12 years agoThin segment transaction_id moved
Zdenek Kabelac [Sun, 30 Oct 2011 22:04:57 +0000 (22:04 +0000)]
Thin segment transaction_id moved

Add a new node flag send_messages that is used to simplify
test when to call _node_send_messages().

Add call to _node_send_messages when pool is deeper in the tree.

12 years agoCleanup unsuccessfully created thin LV
Zdenek Kabelac [Sun, 30 Oct 2011 22:02:18 +0000 (22:02 +0000)]
Cleanup unsuccessfully created thin LV

If something fails during creation of thin LV remove such LV
and deactivate in case it's been already tried to activate
(i.e. thin kernel driver fails for some reason.)

12 years agoMake detach_pool_message visible for tools
Zdenek Kabelac [Sun, 30 Oct 2011 22:01:39 +0000 (22:01 +0000)]
Make detach_pool_message visible for tools

Move there also vg_write and vg_commit.

12 years agoThin cleanups
Zdenek Kabelac [Sun, 30 Oct 2011 22:00:57 +0000 (22:00 +0000)]
Thin cleanups

Fix/cleanup several error messages.
Remove test for seg_is_thin which could never be true there.
Replace (1<<24) with predefined constant.

12 years agoCleanup for lvmetad passing uninit structure
Zdenek Kabelac [Sun, 30 Oct 2011 21:58:59 +0000 (21:58 +0000)]
Cleanup for lvmetad passing uninit structure

Shown by clang analyzer.

12 years agoImprove valgrind support when compiled with DEBUG_MEM
Zdenek Kabelac [Fri, 28 Oct 2011 20:37:31 +0000 (20:37 +0000)]
Improve valgrind support when compiled with DEBUG_MEM

12 years agoContinue with lvcreate man page update
Zdenek Kabelac [Fri, 28 Oct 2011 20:36:05 +0000 (20:36 +0000)]
Continue with lvcreate man page update

Already in WHATS_NEW.

12 years agoAvoid creation of /dev/vg/thinpool
Zdenek Kabelac [Fri, 28 Oct 2011 20:34:45 +0000 (20:34 +0000)]
Avoid creation of /dev/vg/thinpool

12 years agoThin option documentation
Zdenek Kabelac [Fri, 28 Oct 2011 20:33:50 +0000 (20:33 +0000)]
Thin option documentation

12 years agoThin support for stripe
Zdenek Kabelac [Fri, 28 Oct 2011 20:32:54 +0000 (20:32 +0000)]
Thin support for stripe

Support stripe options to create thin data pool LV.

TODO: combine chunk size and stripe size.

12 years agoThin pool resize support for data LV
Zdenek Kabelac [Fri, 28 Oct 2011 20:31:01 +0000 (20:31 +0000)]
Thin pool resize support for data LV

Support for extension of pool data LV.

TODO: figure out thin volume for suspend/resume in cluster.

12 years agoThin support for lvrename
Zdenek Kabelac [Fri, 28 Oct 2011 20:29:32 +0000 (20:29 +0000)]
Thin support for lvrename

Rename pool's metadata lv _tmeta together with pool and _tdata.

12 years agoThin works only with exclusive activation
Zdenek Kabelac [Fri, 28 Oct 2011 20:29:06 +0000 (20:29 +0000)]
Thin works only with exclusive activation

Enforce exclusive activation with thin targets.

12 years agoThin pool activation change
Zdenek Kabelac [Fri, 28 Oct 2011 20:28:00 +0000 (20:28 +0000)]
Thin pool activation change

To ensure we properly handle LV cluster locking - explicitely do
not allow to change the availability of the thin pool that is in use
for some thin LV.

As soon as the thin volume is created the only way to activate pool
is via implicit dependency.

Ignore thinpool open count for lv/vgchange operations.

12 years agoThin output data_block_size via outsize
Zdenek Kabelac [Fri, 28 Oct 2011 20:25:08 +0000 (20:25 +0000)]
Thin output data_block_size via outsize

Use outsize to get nice size hint.

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