1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 20:25:52 +03:00
Commit Graph

6828 Commits

Author SHA1 Message Date
Peter Rajnoha
1dffc9bcb0 Re-enable tests for snapshots of mirrors. 2012-05-17 08:04:11 +00:00
Zdenek Kabelac
313a71048e snaps of mirrors are enabled 2012-05-16 15:01:06 +00:00
Zdenek Kabelac
ec50952652 ok - that was nice mid-air collision 2012-05-16 13:09:09 +00:00
Zdenek Kabelac
6fa1d69804 update 2012-05-16 13:06:18 +00:00
Alasdair Kergon
56d49cbf13 Re-enable partial activation of non-thin LVs until it can be fixed. (2.02.90)
- The test should be checking the LV as a whole, not just individual segments.
2012-05-16 12:50:14 +00:00
Petr Rockai
12a15f939c Add a (currently failing) test for RHBZ 816672. 2012-05-16 10:44:36 +00:00
Petr Rockai
03885b6863 Add provisions to flag tests that we know will fail, without flagging the build
(i.e. an expected failure).
2012-05-16 10:43:41 +00:00
Alasdair Kergon
f1aabd5c60 Set delay_resume_if_new on deptree snapshot origin.
(Must avoid activating snapshot origin more than once concurrently.)
2012-05-15 21:27:24 +00:00
Alasdair Kergon
61712a1f0d add major:minor to table size changed debug message 2012-05-15 20:03:12 +00:00
Alasdair Kergon
b96c213356 indicate when deptree detects but ignores size change in debug msg 2012-05-15 14:10:54 +00:00
Alasdair Kergon
0dc622c777 Refer to details of snapshot of raid problem. 2012-05-14 16:29:50 +00:00
Alasdair Kergon
e0ed1b458d Warn of deadlock risk when using snapshots of mirror segment type. 2012-05-14 16:18:57 +00:00
Alasdair Kergon
8b59522d67 Fix cling policy not to behave like normal policy if no previous LV seg.
Fix alloc cling to cling to PVs already found with contiguous policy.
2012-05-11 22:53:13 +00:00
Alasdair Kergon
8a689fd04d Fix allocation policy loop so it doesn't continue beyond cling using later
policies it shouldn't be using when --alloc cling is specified but no tags
are defined.
2012-05-11 22:19:12 +00:00
Alasdair Kergon
01cfbe14f1 Append _TO_LVSEG to names of internal A_CONTIGUOUS and A_CLING flags.
Remove some unnecesary prev_lvseg checks.
2012-05-11 18:59:01 +00:00
Alasdair Kergon
51514ae62f Always include debug mesg when cling to allocated is set. 2012-05-11 15:32:19 +00:00
Alasdair Kergon
086829459b Refactor _has_matching_pv_tag to provide a fn that takes PV structs. 2012-05-11 15:26:30 +00:00
Peter Rajnoha
81c215de54 More comments on metadata area types. 2012-05-10 11:03:07 +00:00
Peter Rajnoha
8c3e4b43f1 Comment on auxiliary metadata areas. 2012-05-10 10:37:49 +00:00
Zdenek Kabelac
767ce95a11 Add missing pkg init 2012-05-10 08:54:33 +00:00
Alasdair Kergon
59f8c1767d Uncomment allocation section to match style of rest of file. 2012-05-10 00:18:49 +00:00
Peter Rajnoha
ec808a033b Remove VG/PV used in the test. 2012-05-09 14:44:59 +00:00
Peter Rajnoha
9c17acdfe8 Fix division by zero if PV with zero PE count is used during vgcfgrestore. 2012-05-09 12:30:56 +00:00
Zdenek Kabelac
0a9f894ff0 Initial support for lvconvert for thin pool volumes.
Support has many limitations and lots of FIXMEs inside,
however it makes initial task when user creates a separate LV for
thin pool data and thin metadata already usable, so let's enable
it for testing.

Easiest API:

lvconvert --chunksize XX --thinpool data_lv  metadata_lv

More functionality extensions will follow up.

TODO: Code needs some rework since a lot of same code is getting copied.
2012-05-09 12:17:06 +00:00
Zdenek Kabelac
98f2e3d974 Fix regression in for_each_sub_lv
pool_lv is not a sub lv in terms for this function.
It has caused problem with renaming thin_volume, where it has tried to
rename pool LV as well.
2012-05-09 12:12:21 +00:00
Alasdair Kergon
fccc6ea295 Log value chosen in _find_config_bool like other variable types do. 2012-05-08 14:31:44 +00:00
Jonathan Earl Brassow
eb2d70293d Fix up-convert when mirror activation is controled by volume_list and tags.
When mirrors are up-converted, a transient mirror layer is put in so that
only the new devices are sync'ed.  That transient layer must carry the tags
of the original mirror LV, otherwise it will fail to activate when activation
is regulated by lvm.conf:activation/volume_list.  The conversion would then
fail.

The fix is to do exactly the same thing that is being done for linear ->
mirror converting (lib/metadata/mirror.c:_init_mirror_log()).  We copy the
tags temporarily for the new LV and remove them after the activation.
2012-05-05 02:08:46 +00:00
Jonathan Earl Brassow
1e4e9548b1 Disallow snapshots of mirror segment types.
Snapshots of RAID logical volumes are allowed (including "raid1").  However,
snapshots of "mirror" logical volumes has been disallowed due to unsolvable
issues inherent to the design.  The fact that mirroring (dm-raid1.c) must
stop all I/O as the result of a failure and wait for userspace intervention
can lead to a circular dependency if userspace is simultaneously waiting for
snapshots (on mirrors) to make an I/O update before proceeding.

Various snapshot on mirror tests have been removed as a result.
2012-05-01 19:21:24 +00:00
Jonathan Earl Brassow
b22835dd68 Make a note that "raid1" is not cluster-aware in the example lvm.conf.
In the description of the segment types for the 'mirror_segtype_default'
field, we mention that "raid1" is not cluster-aware.
2012-04-27 18:37:42 +00:00
Peter Rajnoha
bf29fa49d3 Use dm_strncpy instead of plain strncpy while setting the socket path.
Also check the return value as it meaningless to work with truncated strings.
2012-04-27 09:52:33 +00:00
Jonathan Earl Brassow
e5b9338ada Fix bug in cmirror that caused incorrect status info to print on some nodes.
Looking at the code in cmirrord/local.c, we can see the various different
request types handled in different ways.  Some information that is non-changing
does not need to go around the cluster and can be short-circuited.  For
example, once the cluster mirror is in-sync, it is pointless to continue
sending that query around the cluster.  We can save network bandwidth and reply
directly back to the kernel.  When it comes to status information, there are
two types 'TABLE' and 'INFO'.  The 'TABLE' information never changes and
belongs to the group of requests that can be safely short-circuited.  The
'STATUS' information can change - and will change if a device fails.  Thus it
cannot be short-circuited, but this is exactly what was found.  The 'STATUS'
information request was being short-circuited and therefore never reporting the
failure condition to anyone other than the "server" that experienced it
directly.
2012-04-26 17:30:49 +00:00
Alasdair Kergon
34fbbfe34e Remove statement that snapshots cannot be tagged from lvm man page. 2012-04-26 15:24:46 +00:00
Jonathan Earl Brassow
ac6e1e3e8d Disallow changing cluster attribute of VG while RAID LVs are active.
Mirror and snapshot LVs are already checked for when switching the cluster
attribute of a VG.  This patch adds RAID.
2012-04-25 13:38:41 +00:00
Peter Rajnoha
c70037445a WHATS_NEW 2012-04-25 09:32:36 +00:00
Jonathan Earl Brassow
dfd024d3a8 Allow a subset of failed devices to be replaced in RAID LVs.
If two devices in an array failed, it was previously impossible to replace
just one of them.  This patch allows for the replacement of some, but perhaps
not all, failed devices.
2012-04-24 20:05:31 +00:00
Jonathan Earl Brassow
2bfb3e519a Prevent resume from creating error devices that already exist from suspend.
Thanks to agk for providing the patch that prevents resume from attempting
(and then failing) to create error devices which already exist; having been
created by a corresponding suspend operation.
2012-04-24 20:00:03 +00:00
Zdenek Kabelac
d6f894edf8 Synchronize with self-destruction of dmeventd
In some occasional case dmevent restart was experiencing problems
with obtaining pid lockfile. So this patch tries to send several more kill
message until daemon kills itself so there is would reponse.
With this small loop the restart seems to work reliable,
although the loopsize and usleep are just randomly picked for now.
2012-04-24 12:25:12 +00:00
Zdenek Kabelac
dd11efb673 Expect failure if the reduction doesn't really happen 2012-04-24 12:17:49 +00:00
Zdenek Kabelac
e7a71d030a Add some lock comments 2012-04-24 12:17:12 +00:00
Zdenek Kabelac
8262a3f6ca Update singlenode locking
Support lock conversion
Work also with LCK_READ
TODO: do more validation.
2012-04-24 12:16:40 +00:00
Zdenek Kabelac
a326be8f48 Sort lvs options by alphabet 2012-04-24 12:14:17 +00:00
Zdenek Kabelac
a8f352fd56 Update some lvs column names
Fix thin_pool -> pool_lv
Add more fields supported by thin provisioning.
Keep fields alphabetically sorted for easier lookup.
2012-04-24 12:13:29 +00:00
Peter Rajnoha
d13f356bf5 Also rename DevNos header to DevNosUsed in dmsetup info -c output. 2012-04-24 08:24:36 +00:00
Peter Rajnoha
0be6c87a56 Rename (Blk)DevNames header to (Blk)DevNamesUsed in dmsetup info -c output.
Just to make it clearer since there is the "dmsetup info -c -o blkdevname"
as well that shows the "block device name for this mapping", having a
"BlkDevName" header on output.

It's a bit confusing then if the "dmsetup info -c -o devs_used,blkdevs_used"
is named with a plural "DevNames"/"BlkDevNames" but at the same time having
a totally different meaning than the singular form "BlkDevName".

  DevNames --> DevNamesUsed
  BlkDevNames --> BlkDevNamesUsed

...makes it much more comprehensible.
2012-04-24 08:00:55 +00:00
Alasdair Kergon
067184f32d Handle replacement of an active device that goes missing with an error device.
(E.g. lvchange --refresh --partial on striped LV if a PV disappeared.)
2012-04-24 00:51:26 +00:00
Jonathan Earl Brassow
c62f9f0b2f Unlike 'mirror' segtype, 'raid1' should perform flush on suspend.
The 'mirror' segtype and 'raid1' segtype both set the 'MIRRORED' flag.
However, due to differences in the way these device-mapper targets behave
'mirror' must be suspended with the 'noflush' option and 'raid1' does not
have to be.

This patch ensures that when the 'MIRRORED' flag is checked to see if
'noflush' is needed that it does not also set it for 'raid1' by mistake.
2012-04-20 14:17:44 +00:00
Jonathan Earl Brassow
1a53400723 Fix for bug 807776: invalid lvconvert --merge output should mention raid1 now
s/snapshot/mergeable volume/
2012-04-19 21:50:37 +00:00
Alasdair Kergon
0efcdc3ad9 . 2012-04-19 13:47:38 +00:00
Alasdair Kergon
8ae2ca5ff7 . 2012-04-19 13:47:11 +00:00
Peter Rajnoha
973cfb19b7 Add udev info and context to lvmdump.
--------------------------------------------------------------------
2012-04-18 15:26:02 +00:00