1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
Commit Graph

6942 Commits

Author SHA1 Message Date
Alasdair G Kergon
d01f8ee684 whitespace 2012-08-07 19:04:52 +01:00
Alasdair G Kergon
e4fdfa9d31 report: provide discard field value in full
I think it's better not to abbreviate human-readable fields like
'discard' to a single character.  Users can truncate it to the
first character themselves if they wish.

It's confusing to use the variable name discard for different things in
different places - use discard_str when it's a string not the enum.
2012-08-07 18:48:34 +01:00
Alasdair G Kergon
0650a16a22 activation: log target version present
Log (very verbose) the target version present in target_version.
2012-08-07 18:47:33 +01:00
Alasdair G Kergon
7b5ea9a5a8 thin: tighten discard string conversions
Respond with "unknown" rather than a NULL pointer if there's an
internal error and the discard value is invalid.

Don't accept 'no_passdown' or 'no-passdown' variants in the LVM
metadata: this is written by the program so should only ever contain
"nopassdown" and should be validated strictly against that.
2012-08-07 18:37:35 +01:00
Alasdair G Kergon
adfa778a58 thin: order discard enum alphabetically 2012-08-07 18:36:40 +01:00
Alasdair G Kergon
4dab0d3175 comments: misc updates
Miscellaneous clarifications to comments.
2012-08-07 18:34:30 +01:00
Alasdair G Kergon
016997acaf man: document allocation process in lvm.8 2012-08-07 02:06:42 +01:00
Peter Rajnoha
6e55201144 args: increase major:minor limit to 4095:1048575
Remove the limit for major and minor number arguments used while specifying
persistent numbers via -My --major <major> --minor <minor> option which
was set to 255 before. Follow the kernel limit instead which is 12 bits
for major and 20 bits for minor number (kernel >= 2.6 and LVM formats
that does not have FMT_RESTRICTED_LVIDS - so still keep the old limit
of 255 for lvm1 format).
2012-08-06 18:01:01 +02:00
Marian Csontos
3843f54974 [lvmetad] Continue reading/writing on EINTR 2012-08-02 16:50:37 +02:00
Marian Csontos
55c9286dea Remove redundant (potentially harmful) semicolon 2012-08-02 16:50:37 +02:00
Marian Csontos
49ae67cba3 lvmetad: Skip redundant checks on no input 2012-08-02 16:50:37 +02:00
Peter Rajnoha
9952331d5d make: fix make in scripts dir for --disable-applib 2012-08-01 15:48:53 +02:00
Zdenek Kabelac
286f298bb7 Fix dependecy build for scripts dir
Since now scripts builds binaries, build needs to wait for libs.
2012-08-01 13:57:23 +02:00
Peter Rajnoha
e309586aeb systemd: O_CLOEXEC not needed in activation generator
O_CLOEXEC not actually needed, this is just a simple program,
it is not supposed to fork/exec anywhere and anytime in the future.
2012-08-01 08:57:12 +02:00
Peter Rajnoha
c6cc871df8 make: use proper libs to make scripts subdir 2012-08-01 08:42:49 +02:00
Peter Rajnoha
fa68466e90 systemd: integrate lvm2 activation generator with conf+make 2012-07-31 16:46:24 +02:00
Peter Rajnoha
d3e67ba8ca systemd: add lvm2 activation generator
The lvm2 activation generator generates systemd units conditionally
based on the global/use_lvmetad lvm.conf setting.

If use_lvmetad=0, the lvm2-activation-early.service and lvm2-activation.service
units will be generated. These units are responsible for direct volume activation
by calling "vgchange -aay --sysinit" (this is actually the original on-boot
activation as it was used before). If use_lvmetad=1, no units will be generated
as we're relying on autoactivation.

Important thing to note is that the lvm2-activation units normally bring
in the udev-settle ("storage-wait") service that waits for udev to settle
(with block devices). We don't need this if lvmetad is used in conjunction
with autoactivation feature... but systemd units can't be enabled or disabled
(or dependencies added/removed) dynamically based on external configuration.

Therefore, we need the unit generator which adds support for such situations:
the units as a whole either exist or not based on the external configuration.
2012-07-31 16:20:24 +02:00
Peter Rajnoha
f64f22e2d6 lvm2app: add lvm_config_find_bool function
To effectively retrieve the setting of anything that could be enabled or disabled.
2012-07-31 16:18:01 +02:00
Petr Rockai
8791d01fee lvmetad: Fix an obscure error message. 2012-07-31 11:43:35 +02:00
Petr Rockai
e0c2211c34 libdm-string: Add dm_vasprintf. 2012-07-31 11:12:34 +02:00
Alasdair G Kergon
88ae884095 version: update 2012-07-30 18:00:08 +01:00
Alasdair G Kergon
4b48b62ab0 version: update 2012-07-30 17:47:04 +01:00
Alasdair G Kergon
3227cd8aac version: update 2012-07-30 17:38:51 +01:00
Alasdair G Kergon
e39de22822 version: update
Update version date.
2012-07-30 16:17:16 +01:00
Petr Rockai
20ca6d6545 TEST: Add lvmetad-test; checks --test with lvmetad. 2012-07-30 11:21:55 +02:00
Petr Rockai
6997943f22 lvmetad: Implement --test (fixes #832033). 2012-07-30 11:19:02 +02:00
Alasdair G Kergon
4dbf872a9f reports: invalid snaps do not capitalise lv_attr
No longer capitalise first LV attribute char for invalid snapshots.
This state is available from the 5th char now (I or S).
2012-07-27 20:19:28 +01:00
Alasdair G Kergon
25ae0b39b7 dmsetup: allow --noflush with status/wait for thin
Allow --noflush with dmsetup status and wait (for thin target 1.3.0 /
ioctl 4.23.0).
2012-07-27 20:03:07 +01:00
Jonathan Brassow
186a2772e8 vgextend: Allow PVs to be added to VGs that have PVs missing
Allowing people to add devices to a VG that has PVs missing helps
people avoid the inability to repair RAID LVs in certain cases.
For example, if a user creates a RAID 4/5/6 LV using all of the
available devices in a VG, there will be no spare devices to
repair the LV with if a device should fail.  Further, because the
VG is missing a device, new devices cannot be added to allow the
repair.  If 'vgreduce --removemissing' were attempted, the
"MISSING" PV could not be removed without also destroying the RAID
LV.

Allowing vgextend to operate solves the circular dependency.

When the PV is added by a vgextend operation, the sequence number is
incremented and the 'MISSING' flag is put on the PVs which are missing.
2012-07-26 17:06:06 -05:00
Alasdair G Kergon
45db25817f filters: move device_info_t definition to header 2012-07-26 12:22:55 +01:00
Peter Rajnoha
9161308252 systemd: ensure monitoring is handled after lvmetad
Monitoring is handled using "vgchange --monitor" call. Ensure that lvmetad is up
and running at the time of this call to prevent any fallback to direct scan
within the vgchange. The same applies for shutdown sequence but the other way
round - switch monitoring off and lvmetad afterwards.
2012-07-26 11:30:27 +02:00
Alasdair G Kergon
e0bc3cf1a0 filters: Add Micron PCIe SSDs (mtip32xx) [part2]
Recognise Micron PCIe SSDs in filter and move array out to device-types.h.
2012-07-26 02:31:06 +01:00
Alasdair G Kergon
7803756e97 filters: Add Micron PCIe SSDs (mtip32xx)
Recognise Micron PCIe SSDs in filter and move array out to device-types.h.
2012-07-26 02:26:40 +01:00
Jonathan Brassow
599f18db8a TEST: Conditionalize RAID tests on whether the dm-raid module exists 2012-07-25 09:43:28 -05:00
Peter Rajnoha
81e89c0647 locking: clarify read-only locking error message v2 2012-07-25 14:37:22 +02:00
Peter Rajnoha
a05ac83641 locking: clarify read-only locking error message 2012-07-25 14:06:02 +02:00
Jonathan Brassow
1b60789020 Forgot to update WHATS_NEW for commit 5555d2a000 2012-07-24 22:28:23 -05:00
Jonathan Brassow
5555d2a000 RAID: Fix segfault when attempting to replace RAID 4/5/6 device
Commit 8767435ef8 allowed RAID 4/5/6
LV to be extended properly, but introduced a regression in device
replacement - a critical component of fault tolerance.

When only 1 or 2 drives are being replaced, the 'area_count' needed
can be equal to the parity_count.  The 'area_multiple' for RAID 4/5/6
was computed as 'area_count - parity_devs', which could result in
'area_multiple' being 0.  This would ultimately lead to a division by
zero error.  Therefore, in calc_area_multiple, it is important to take
into account the number of areas that are being requested - just as
we already do in _alloc_init.
2012-07-24 19:02:06 -05:00
Jonathan Brassow
407198e17d TEST: Replace old sync test/wait functions with new library functions
Generic sync test/wait functions have replaced the old mirror/raid functions.
2012-07-24 14:20:30 -05:00
Jonathan Brassow
753cb9204d TEST: Add library functions for checking and waiting for sync
Add 'in_sync' and 'wait_for_sync' to test and wait for synchronization
of a mirror or RAID logical volume.
2012-07-24 14:17:54 -05:00
Peter Rajnoha
5e36b86c46 config: fix one-node dumpconfig, add dm_config_write_one_node
A regression introduced in 2.02.89 (11e520256b)
caused the lvm dumpconfig <node> to print out
the node as well as its subsequent siblings.
The information about "only_one" mode got lost.

Before this patch (just an example node):
  # lvm dumpconfig global/use_lvmetad
  use_lvmetad=1
  thin_check_executable="/usr/sbin/thin_check"
  thin_check_options="-q"
  (...all nodes to the end of the section)

With this patch applied:
   # lvm dumpconfig global/use_lvmetad
   use_lvmetad=1
2012-07-20 15:53:04 +02:00
Peter Rajnoha
8d5ae472e5 daemon-server: fix error message on daemon shutdown
If a daemon (like lvmetad that is using common daemon-server code)
received a kill signal that was supposed to shut the daemon down,
a spurious message was issued: "Failed to handle a client connection".

This happened if the kill signal came just in the middle of waiting
for a client request in "select" - the request that was supposed to
be handled was blank at that moment of course.
2012-07-19 16:45:08 +02:00
Zdenek Kabelac
48367c5be9 thin: add lvchange for discard and zero change
Update lvchange to allow change of 'zero' flag for thinpool.
Add support for changing discard handling.

N.B.  from/to  ignore could be only changed for inactive pool.
2012-07-18 14:38:34 +02:00
Zdenek Kabelac
46b9cc1248 thin: add reporting of discard for thin pool
New field  "discard" is added for lvs reporting of lv segment.
Reported as one character:
 (i)gnore
 (n)opassdown
 (p)assdown

lvs -o+discard
2012-07-18 14:37:44 +02:00
Zdenek Kabelac
ebbf7d8e68 thin: add discard support for thin pool
Add arg support for discard.
Add discard ignore, nopassdown, passdown (=default) support.
Flags could be set per pool.

lvcreate [--discard {ignore|no_passdown|passdown}]  vg/thinlv
2012-07-18 14:36:57 +02:00
Zdenek Kabelac
260e8f2476 thin: detect supported features from thinp target
Add shell variable to override reported min version for testing:
LVM_THIN_VERSION_MIN
2012-07-18 14:35:17 +02:00
Zdenek Kabelac
c4db22bd4f libdm: support reserve and release metadata snap msg
Add support for new message types for thinp target 1.1
2012-07-18 14:34:19 +02:00
Zdenek Kabelac
dcd4afc716 libdm: add support for external origin and discard 2012-07-18 14:33:37 +02:00
Jonathan Brassow
00d9bf8107 TEST (lvresize-raid): Don't run test when RAID module doesn't exist
Check for RAID module and skip test if not there.
2012-07-17 10:50:21 -05:00
Peter Rajnoha
3f5cdf20cd configure: default tmpfile dir in PREFIX/lib/tmpfiles.d
SYSCONFDIR (the /etc) contains overrides to system-wide settings.
System-wide settings are in PREFIX/lib/tmpfiles.d by default
2012-07-16 11:17:02 +02:00