1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-23 21:35:29 +03:00
Commit Graph

6146 Commits

Author SHA1 Message Date
Zdenek Kabelac
a6d0767d3e 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.
2011-11-15 17:27:41 +00:00
Zdenek Kabelac
7411ce05c6 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).
2011-11-15 17:25:05 +00:00
Zdenek Kabelac
a1c4a54ada 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.
2011-11-15 17:23:51 +00:00
Zdenek Kabelac
96f7c3e2da 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().
2011-11-15 17:21:02 +00:00
Zdenek Kabelac
e60993068c 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_.
2011-11-15 17:15:03 +00:00
Alasdair Kergon
dddf30e354 Include a copy of kernel DM documentation in doc/kernel 2011-11-15 13:54:20 +00:00
Peter Rajnoha
26ab12e69d 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
2011-11-15 11:54:15 +00:00
Alasdair Kergon
dd815a4f7b 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?
2011-11-14 21:30:35 +00:00
Alasdair Kergon
bc33c1cda4 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.
2011-11-13 01:41:57 +00:00
Zdenek Kabelac
3d48fc1324 Add missing stack reporting
also remove unneeded {}
2011-11-12 22:53:23 +00:00
Zdenek Kabelac
b589204e85 Thin use items iterator and stack reporting 2011-11-12 22:52:18 +00:00
Zdenek Kabelac
8e24709ef2 Missing stack printing 2011-11-12 22:51:20 +00:00
Zdenek Kabelac
eb668d8981 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...
2011-11-12 22:48:44 +00:00
Zdenek Kabelac
988e809ed4 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.
2011-11-12 22:44:10 +00:00
Alasdair Kergon
b5518cb1ea Move gentoo MAKEDEV to /sbin in lvm2create_initrd. (James Le Cuirot) 2011-11-12 17:03:53 +00:00
Milan Broz
d2c074bf06 Fix major number filter structure boundary test. 2011-11-11 16:59:30 +00:00
Milan Broz
ba89f47b8d Remove unneeded parameter. 2011-11-11 16:41:37 +00:00
Milan Broz
0c789c6a9c And now add files for real. 2011-11-11 15:24:48 +00:00
Milan Broz
2da3c698fd Fix function name in previous patch. 2011-11-11 15:14:05 +00:00
Milan Broz
5584ecf7a2 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>
2011-11-11 15:11:08 +00:00
Zdenek Kabelac
c93cfc6a13 Thin send create_snap message
Start creating snapshots for real.
Update test suite to check it happens.
2011-11-10 15:30:59 +00:00
Zdenek Kabelac
bd2ea128e0 Thin update testing script 2011-11-10 12:44:33 +00:00
Zdenek Kabelac
1ee4955b70 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
2011-11-10 12:44:00 +00:00
Zdenek Kabelac
f0c52912f0 Small comment and indent updates 2011-11-10 12:43:05 +00:00
Zdenek Kabelac
3eb6a4adb6 Thin test min thin_pool size for at least 1 chunk 2011-11-10 12:42:36 +00:00
Zdenek Kabelac
1b990cc8aa 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.
2011-11-10 12:42:15 +00:00
Zdenek Kabelac
520afb5a43 Thin lvcreate manpage
Merge thin creation into standard 1st. lvcreate.
Update snapshot for thin support.
2011-11-10 12:41:39 +00:00
Zdenek Kabelac
69af4ab3ae 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.
2011-11-10 12:40:29 +00:00
Zdenek Kabelac
01da72eb3a Thin create normal (old) snapshot when size is specified 2011-11-10 12:39:46 +00:00
Zdenek Kabelac
815f56fd90 Thin disable pool create without activation 2011-11-10 12:39:01 +00:00
Mike Snitzer
be88d03380 Add missing free() for line that is malloc()'d by getline(). 2011-11-08 19:02:21 +00:00
Mike Snitzer
d25d6d456f Fix _get_proc_number to be tolerant of malformed /proc/misc entries.
Fixes issue reported here: http://lkml.org/lkml/2011/11/8/190
2011-11-08 17:32:10 +00:00
Zdenek Kabelac
2371f76c73 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.
2011-11-08 12:19:53 +00:00
Zdenek Kabelac
1e6910032e Update lvs man page style. 2011-11-08 12:16:53 +00:00
Zdenek Kabelac
3b0407ad83 More lvcreate man updates
Use  { Name | Path } consistently like elsewhere.
Move --thin alphabetically before --type.
2011-11-08 12:12:31 +00:00
Petr Rockai
00c752b931 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.
2011-11-07 17:11:23 +00:00
Petr Rockai
1a7644a0f6 Do not repeat a failed test's output when VERBOSE is in effect. 2011-11-07 17:02:56 +00:00
Alasdair Kergon
b3d6e05694 Must not override alloc policy specified by user. 2011-11-07 13:54:54 +00:00
Zdenek Kabelac
2f6fbed90b Thin add error message for double delete
Add few more internal error messages.
2011-11-07 11:04:45 +00:00
Zdenek Kabelac
25227bfccb Thin supports snapshots
Full support for thin snapshots.
Create and remove is supported.

TODO: lvconvert support is not yes available.
2011-11-07 11:03:47 +00:00
Zdenek Kabelac
ae6833c8fa Add missing default LVM_VG_NAME
Add support for exported shell variable LVM_VG_NAME also
for thins and snapshots.
2011-11-07 11:01:53 +00:00
Zdenek Kabelac
db6bf15fcd Thin lvcreate poolmetadatasize units doc 2011-11-07 10:59:55 +00:00
Zdenek Kabelac
caa3faa47e Thin reindent code
Drop indention level
Add extra internal error.
2011-11-07 10:59:07 +00:00
Zdenek Kabelac
56a076fb9e Thin revert code for exclusive pool activation
There are no limits on thin-pool activation now.
Revert code that is no longer needed.
2011-11-07 10:58:13 +00:00
Zdenek Kabelac
32227d4720 Avoid lvextend to overflow
Add extra check to extent_count overflow.
Use internal define MAX_EXTENT_COUNT instead UINT32_MAX.
2011-11-04 22:49:53 +00:00
Zdenek Kabelac
4d126a5a80 Thin lvcreate man update
Added poolmetadatasize options
Add an example.
2011-11-04 22:47:17 +00:00
Zdenek Kabelac
d6ecde875a 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.
2011-11-04 22:45:52 +00:00
Zdenek Kabelac
134641d62d Thin add thin_pool_metadata_require_separate_pvs
Allow to set different policy for pool from mirrors.
2011-11-04 22:44:21 +00:00
Zdenek Kabelac
d577391181 Thin supports poolmetadatasize setting
Add option to set pool metadatasize.
For passing size parameter reuse region_size.
2011-11-04 22:43:10 +00:00
Zdenek Kabelac
70a441fcda Thin fix condition check for transation_id
id2 must be checked.
(missed in yesterday commit set).
2011-11-04 12:39:45 +00:00