]> sourceware.org Git - lvm2.git/log
lvm2.git
11 years agotest: split raid tests
Zdenek Kabelac [Tue, 9 Oct 2012 10:17:33 +0000 (12:17 +0200)]
test: split raid tests

Separate original raid test and new raid10 test,
so the old could be tested on platforms without raid10 support.

Replace test-unfriendly `ls /dev/mapper`   with  dmsetup ls

11 years agolvchange: do not start dmevent for resyn
Zdenek Kabelac [Tue, 9 Oct 2012 10:20:47 +0000 (12:20 +0200)]
lvchange: do not start dmevent for resyn

If monitoring is disabled in lvm.conf, avoid its starting and preserve
DMEVENTD_MONITOR_IGNORE settings internally.

11 years agoexample.conf: Warn about running lvmetad with use_lvmetad = 0.
Petr Rockai [Tue, 9 Oct 2012 08:47:29 +0000 (10:47 +0200)]
example.conf: Warn about running lvmetad with use_lvmetad = 0.

11 years agotest: ignore modprobe failure
Zdenek Kabelac [Tue, 9 Oct 2012 08:37:37 +0000 (10:37 +0200)]
test: ignore modprobe failure

If the system doesn't have modprobe but happens to have modules
loaded, allow version testing.

11 years agoTEST: Check that LVM1 VGs work when using lvmetad (BZ 863401).
Petr Rockai [Tue, 9 Oct 2012 05:59:53 +0000 (07:59 +0200)]
TEST: Check that LVM1 VGs work when using lvmetad (BZ 863401).

11 years agolvmetad: Fix a leak on duplicated PVs (same PVID, different device).
Petr Rockai [Mon, 8 Oct 2012 18:31:12 +0000 (20:31 +0200)]
lvmetad: Fix a leak on duplicated PVs (same PVID, different device).

11 years agolvmetad: Fix a leak in an error path in update_metadata.
Petr Rockai [Mon, 8 Oct 2012 18:33:03 +0000 (20:33 +0200)]
lvmetad: Fix a leak in an error path in update_metadata.

11 years agoTEST: Give lvmetad a chance to exit gracefully upon teardown.
Petr Rockai [Mon, 8 Oct 2012 18:25:51 +0000 (20:25 +0200)]
TEST: Give lvmetad a chance to exit gracefully upon teardown.

11 years agoTEST: Wait for lvmetad socket to appear in "aux prepare_lvmetad".
Petr Rockai [Mon, 8 Oct 2012 18:25:14 +0000 (20:25 +0200)]
TEST: Wait for lvmetad socket to appear in "aux prepare_lvmetad".

11 years agoTEST: When INTERACTIVE=1, allow scripts to control a TTY.
Petr Rockai [Mon, 8 Oct 2012 18:15:55 +0000 (20:15 +0200)]
TEST: When INTERACTIVE=1, allow scripts to control a TTY.

11 years agolvmetad: Fix a typo-induced leak in destroy_metadata_hashes.
Petr Rockai [Mon, 8 Oct 2012 18:15:09 +0000 (20:15 +0200)]
lvmetad: Fix a typo-induced leak in destroy_metadata_hashes.

11 years agolibdaemon-client: Fix a memory leak in daemon_send.
Petr Rockai [Mon, 8 Oct 2012 16:35:30 +0000 (18:35 +0200)]
libdaemon-client: Fix a memory leak in daemon_send.

11 years agolibdaemon-server: Optimize logging for a fast no-output path.
Petr Rockai [Mon, 8 Oct 2012 16:34:33 +0000 (18:34 +0200)]
libdaemon-server: Optimize logging for a fast no-output path.

11 years agolibdaemon-server: Fix a memory leak in daemon_log_multi.
Petr Rockai [Mon, 8 Oct 2012 15:11:43 +0000 (17:11 +0200)]
libdaemon-server: Fix a memory leak in daemon_log_multi.

11 years agosystemd: remove ExecStartPost from lvm2-lvmetad.service.
Peter Rajnoha [Mon, 8 Oct 2012 14:49:54 +0000 (16:49 +0200)]
systemd: remove ExecStartPost from lvm2-lvmetad.service.

The ExecStartPost with pvscan --cache in lvm2-lvmetad.service
is not needed now as this is called transparently within the
first LVM command that queries lvmetad.

11 years agodev-cache: Make dev_iter_create work with a NULL filter.
Petr Rockai [Mon, 8 Oct 2012 14:16:58 +0000 (16:16 +0200)]
dev-cache: Make dev_iter_create work with a NULL filter.

11 years agotest: move raid test to separate tests
Zdenek Kabelac [Mon, 8 Oct 2012 12:46:44 +0000 (14:46 +0200)]
test: move raid test to separate tests

Revert changes to origin lvcreate-large test and use separate
test scripts for raid  - so they can be properly skipped when
kernel doesn't support raid targets.

11 years agolvmetad: In pvscan --cache, update the token directly.
Petr Rockai [Mon, 8 Oct 2012 10:21:36 +0000 (12:21 +0200)]
lvmetad: In pvscan --cache, update the token directly.

11 years agotest: check snap_percent returns invalid
Zdenek Kabelac [Mon, 8 Oct 2012 10:07:35 +0000 (12:07 +0200)]
test: check snap_percent returns invalid

For thin_volumes snap_percent is meaningless.

11 years agoreport: call snapshot percent with cow only
Zdenek Kabelac [Mon, 8 Oct 2012 10:06:30 +0000 (12:06 +0200)]
report: call snapshot percent with cow only

Ensure lv_snapshot_percent is used only with snapshot LVs.

11 years agolvconvert: disable convertion of thin to mirrors
Zdenek Kabelac [Fri, 5 Oct 2012 09:06:08 +0000 (11:06 +0200)]
lvconvert: disable convertion of thin to mirrors

For now this convertions is not supported, thus disabled.
The only supported conversion for now is to create mirrored thin pools
from mirrored devices.

11 years agolvmetad: Avoid overlapping locks that could cause a deadlock (BZ 862253).
Petr Rockai [Mon, 8 Oct 2012 07:12:51 +0000 (09:12 +0200)]
lvmetad: Avoid overlapping locks that could cause a deadlock (BZ 862253).

11 years agoTEST: Only run the pvscan --cache test with lvmetad active.
Petr Rockai [Mon, 8 Oct 2012 05:23:13 +0000 (07:23 +0200)]
TEST: Only run the pvscan --cache test with lvmetad active.

11 years agoTEST: Add lvmetad-pvscan-cache to check that pvscan --cache works.
Petr Rockai [Sun, 7 Oct 2012 20:31:33 +0000 (22:31 +0200)]
TEST: Add lvmetad-pvscan-cache to check that pvscan --cache works.

11 years agotest: lvm2api thin data_percent
Zdenek Kabelac [Fri, 5 Oct 2012 08:33:41 +0000 (10:33 +0200)]
test: lvm2api thin data_percent

11 years agotest: check data_percent is equal to snap_percent
Zdenek Kabelac [Fri, 5 Oct 2012 08:32:49 +0000 (10:32 +0200)]
test: check data_percent is equal to snap_percent

11 years agolvm2api: fix data percent reporting for thin, snap
Zdenek Kabelac [Fri, 5 Oct 2012 07:56:50 +0000 (09:56 +0200)]
lvm2api: fix data percent reporting for thin, snap

Use same logic for lvm2api as we use lvs reporting.
data_percent is meant to be superset for snap_percent.

11 years agoRAID: Do not allow RAID LVs in a cluster volume group.
Jonathan Brassow [Wed, 3 Oct 2012 20:52:54 +0000 (15:52 -0500)]
RAID:  Do not allow RAID LVs in a cluster volume group.

It would be possible to activate a RAID LV exclusively in a cluster
volume group, but for now we do not allow RAID LVs to exist in a
clustered volume group at all.  This has two components:
1) Do not allow RAID LVs to be created in a clustered VG
2) Do not allow changing a VG from single-machine to clustered
   if there are RAID LVs present.

11 years agothin: lvconvert
Zdenek Kabelac [Mon, 14 May 2012 11:57:30 +0000 (13:57 +0200)]
thin: lvconvert

Update code for lvconvert.
Change the lvconvert user interface a bit - now we require 2 specifiers
--thinpool   takes LV name for data device (and makes the name)
--poolmetadata  takes LV name for metadata device.

Fix type in thin help text -z -> -Z.

Supported is also new flag --discards for thinpools.

11 years agothin: lvchange allows to change perms of thin snap
Zdenek Kabelac [Wed, 19 Sep 2012 12:55:34 +0000 (14:55 +0200)]
thin: lvchange allows to change perms of thin snap

Thin snapshots are individual thin volumes so they can have its own
control for rw permissions.

11 years agoliblvm: insert layer with subvolume renames
Zdenek Kabelac [Thu, 6 Sep 2012 13:21:18 +0000 (15:21 +0200)]
liblvm: insert layer with subvolume renames

Rename also subvolumes if we are inserting _tdata layer.
(Currently it breaks mirrors if it would be generic, needs fixing).

11 years agocleanup: add proper cast for force_t
Zdenek Kabelac [Wed, 19 Sep 2012 13:13:21 +0000 (15:13 +0200)]
cleanup: add proper cast for force_t

11 years agothin: origin only suspend
Zdenek Kabelac [Tue, 5 Jun 2012 09:28:01 +0000 (11:28 +0200)]
thin: origin only suspend

Skip tree creating when used with origin_only flag.

11 years agolibdm: reset delay flag for devs used by thin
Zdenek Kabelac [Thu, 27 Sep 2012 14:57:14 +0000 (16:57 +0200)]
libdm: reset delay flag for devs used by thin

Patch clears the flag if thin pool is stacked over mirror.

Since thin pool could be used to stack device over mirrors,
it needs resume properly i.e. mirrors with corelog which are otherwise
unconditionally skipped (for pvmove functionality).

11 years agoliblvm: add lv_rename_update
Zdenek Kabelac [Thu, 27 Sep 2012 07:48:25 +0000 (09:48 +0200)]
liblvm: add lv_rename_update

Support lv_rename without directly updating metatata.
It can save some metadata commits in some cases,
i.e. when LVs are offline.

11 years agoliblvm2cmd: ensure standard descriptors are ready
Zdenek Kabelac [Fri, 7 Sep 2012 09:13:41 +0000 (11:13 +0200)]
liblvm2cmd: ensure standard descriptors are ready

Check if FDs 0,1,2 are available, and in case they are missing,
use /dev/null for them.

11 years agoliblvm2cmd: add return code for _close_stray_fds
Zdenek Kabelac [Thu, 15 Mar 2012 00:18:23 +0000 (01:18 +0100)]
liblvm2cmd: add return code for _close_stray_fds

Close fds via /proc/self/fd parsing
Return error code if _close_stray_fds fails and quit application
if system is in some nonstandard state.

11 years agoconfigure: fix --enable-testing
Zdenek Kabelac [Mon, 1 Oct 2012 12:34:07 +0000 (14:34 +0200)]
configure: fix --enable-testing

Add missing pkg init for configure --enable-testing.

11 years agoRAID: Fix problems with creating, extending and converting large RAID LVs
Jonathan Brassow [Thu, 27 Sep 2012 21:51:22 +0000 (16:51 -0500)]
RAID: Fix problems with creating, extending and converting large RAID LVs

MD's bitmaps can handle 2^21 regions at most.  The RAID code has always
used a region_size of 1024 sectors.  That means the size of a RAID LV was
limited to 1TiB.  (The user can adjust the region_size when creating a
RAID LV, which can affect the maximum size.)  Thus, creating, extending or
converting to a RAID LV greater than 1TiB would result in a failure to
load the new device-mapper table.

Again, the size of the RAID LV is not limited by how much space is allocated
for the metadata area, but by the limitations of the MD bitmap.  Therefore,
we must adjust the 'region_size' to ensure that the number of regions does
not exceed the limit.  I've added code to do this when extending a RAID LV
(which covers 'create' and 'extend' operations) and when up-converting -
specifically from linear to RAID1.

11 years agolibdaemon: Split daemon-shared.[hc] into daemon-io.[hc] and config-util.[hc].
Petr Rockai [Wed, 26 Sep 2012 12:44:03 +0000 (14:44 +0200)]
libdaemon: Split daemon-shared.[hc] into daemon-io.[hc] and config-util.[hc].

11 years agolibdaemonclient: Use log_sys_error in place of perror.
Petr Rockai [Wed, 26 Sep 2012 11:11:13 +0000 (13:11 +0200)]
libdaemonclient: Use log_sys_error in place of perror.

11 years agolibdaemonclient: Use dm_{malloc,free} in place of {malloc,free}.
Petr Rockai [Wed, 26 Sep 2012 11:10:53 +0000 (13:10 +0200)]
libdaemonclient: Use dm_{malloc,free} in place of {malloc,free}.

11 years agolvremove: Revert to allowing removal of partial LVs.
Petr Rockai [Wed, 26 Sep 2012 10:25:45 +0000 (12:25 +0200)]
lvremove: Revert to allowing removal of partial LVs.

11 years agolvremove: Ask before discarding data areas.
Petr Rockai [Wed, 26 Sep 2012 10:23:44 +0000 (12:23 +0200)]
lvremove: Ask before discarding data areas.

11 years agoTEST: Workaround for lvmetad vs inconsistent metadata.
Petr Rockai [Wed, 19 Sep 2012 23:57:55 +0000 (01:57 +0200)]
TEST: Workaround for lvmetad vs inconsistent metadata.

11 years agolvmetad: Initialise debug_config also if no -d is given.
Petr Rockai [Wed, 19 Sep 2012 23:56:41 +0000 (01:56 +0200)]
lvmetad: Initialise debug_config also if no -d is given.

11 years agolvmetad: Give inconsistent metadata warnings in pvscan --cache.
Petr Rockai [Wed, 19 Sep 2012 21:45:51 +0000 (23:45 +0200)]
lvmetad: Give inconsistent metadata warnings in pvscan --cache.

11 years agolvmetad: Fix #845269: SEGV on corrupt lvmetad response.
Petr Rockai [Wed, 19 Sep 2012 21:30:16 +0000 (23:30 +0200)]
lvmetad: Fix #845269: SEGV on corrupt lvmetad response.

11 years agolvmetad: Clear metadata/PV cache before a token-triggered rescan.
Petr Rockai [Wed, 19 Sep 2012 21:18:28 +0000 (23:18 +0200)]
lvmetad: Clear metadata/PV cache before a token-triggered rescan.

11 years agolvmetad: Make vgscan --cache an alias to pvscan --cache.
Petr Rockai [Mon, 10 Sep 2012 14:35:43 +0000 (16:35 +0200)]
lvmetad: Make vgscan --cache an alias to pvscan --cache.

11 years agoTEST: Add LVM_VALGRIND_LVMETAD to testing options.
Petr Rockai [Mon, 10 Sep 2012 05:42:39 +0000 (07:42 +0200)]
TEST: Add LVM_VALGRIND_LVMETAD to testing options.

11 years agoMakefiles: Build libdaemonclient unconditionally.
Petr Rockai [Mon, 10 Sep 2012 05:40:00 +0000 (07:40 +0200)]
Makefiles: Build libdaemonclient unconditionally.

11 years agolib/cache/lvmetad: s/pvscan_lvmetad/lvmetad_pvscan/ in the API
Petr Rockai [Sun, 9 Sep 2012 20:05:59 +0000 (22:05 +0200)]
lib/cache/lvmetad: s/pvscan_lvmetad/lvmetad_pvscan/ in the API

11 years agolvmetad: Use "%" PRId64 in place of "%d" for extra clarity.
Petr Rockai [Sun, 9 Sep 2012 19:57:59 +0000 (21:57 +0200)]
lvmetad: Use "%" PRId64 in place of "%d" for extra clarity.

11 years agoImplement devices/global_filter.
Petr Rockai [Mon, 13 Aug 2012 17:44:10 +0000 (19:44 +0200)]
Implement devices/global_filter.

The global filter is applied first, and is also applied in pvscan --cache (which
is called from udev rules to keep lvmetad updated). Cf. example.conf.

11 years agoexample.conf.in: The command to refresh lvmetad is pvscan --cache.
Petr Rockai [Mon, 13 Aug 2012 12:41:57 +0000 (14:41 +0200)]
example.conf.in: The command to refresh lvmetad is pvscan --cache.

11 years agolib/cache/lvmetad: Refactor to use dm_config_tree in requests.
Petr Rockai [Sat, 11 Aug 2012 08:37:28 +0000 (10:37 +0200)]
lib/cache/lvmetad: Refactor to use dm_config_tree in requests.

We were using daemon_send_simple until now, but it is no longer adequate, since
we need to manipulate requests in a generic way (adding a validity token to each
request), and the tree-based request interface is much more suitable for this.

11 years agolibdaemon: Extend and refactor APIs.
Petr Rockai [Sat, 11 Aug 2012 08:33:53 +0000 (10:33 +0200)]
libdaemon: Extend and refactor APIs.

- move common dm_config_tree manipulation functions from lvmetad-core to
  daemon-shared
- add config-tree-based request manipulation APIs to daemon-client
- factor out _v (va_list) variants of most variadic functions in libdaemon

11 years agodev-cache: Make it possible to pass in a NULL filter.
Petr Rockai [Sat, 18 Aug 2012 20:03:46 +0000 (22:03 +0200)]
dev-cache: Make it possible to pass in a NULL filter.

11 years agofilters: Alwayz zalloc the filter struct.
Petr Rockai [Sat, 18 Aug 2012 16:59:07 +0000 (18:59 +0200)]
filters: Alwayz zalloc the filter struct.

Not all pointers need to be initialised explicitly that way.

11 years agoTEST: Kill lvmetad early in teardown.
Petr Rockai [Sat, 11 Aug 2012 08:29:38 +0000 (10:29 +0200)]
TEST: Kill lvmetad early in teardown.

11 years agocleanup: remove unused variable
Marian Csontos [Thu, 20 Sep 2012 05:40:11 +0000 (07:40 +0200)]
cleanup: remove unused variable

11 years agoFix tests to accept extended attribute
Marian Csontos [Thu, 20 Sep 2012 05:30:24 +0000 (07:30 +0200)]
Fix tests to accept extended attribute

attr field had a character (p)artial appended.

11 years agomirror: 'lvconvert --resync' should reset LV_NOTSYNCED on corelog mirror
Jonathan Brassow [Wed, 19 Sep 2012 16:09:32 +0000 (11:09 -0500)]
mirror:  'lvconvert --resync' should reset LV_NOTSYNCED on corelog mirror

When reformatting the 'lvchange_resync' code in commit
05131f5853e86419d9c726faa961b8d012298d9c, a '!' should have been removed
from the condition that checks for the LV_NOTSYNCED flag on a corelog
mirror LV.  The presence of this '!' caused the LV_NOTSYNCED flag to be
cleared when it wasn't present and left when it was present.

It is not allowed to add images to a 'mirror' or 'raid1' LV if the
LV_NOTSYNCED flag is set.  We add some up-convert tests to ensure this
behavior is being enforced and that the LV_NOTSYNCED flag is being
properly cleared by 'lvchange --resync'.

(Not updating WHATS_NEW because this is intrarelease.)

11 years agolvs: add partial attribute
Alasdair G Kergon [Wed, 19 Sep 2012 11:49:40 +0000 (12:49 +0100)]
lvs: add partial attribute

11 years agodiscards: skip when removing LVs on missing PVs
Alasdair G Kergon [Wed, 19 Sep 2012 11:48:56 +0000 (12:48 +0100)]
discards: skip when removing LVs on missing PVs

Don't try to issue discards to a missing PV to avoid segfault.
Prevent lvremove from removing LVs that have any part missing.

https://bugzilla.redhat.com/857554

12 years agoRAID1: Clear the LV_NOTSYNCED flag when a RAID1 LV is converted to linear
Jonathan Brassow [Fri, 14 Sep 2012 21:26:53 +0000 (16:26 -0500)]
RAID1:  Clear the LV_NOTSYNCED flag when a RAID1 LV is converted to linear

Failing to clear the LV_NOTSYNCED flag when converting a RAID1 LV to
linear can result in the flag being present after an upconvert - even
if the sync is performed when upconverting.

12 years agoRAID1: Like mirrors, do not allow adding images to LV created w/ --nosync
Jonathan Brassow [Fri, 14 Sep 2012 21:12:52 +0000 (16:12 -0500)]
RAID1:  Like mirrors, do not allow adding images to LV created w/ --nosync

Mirrors do not allow upconverting if the LV has been created with --nosync.
We will enforce the same rule for RAID1.  It isn't hugely critical, since
the portions that have been written will be copied over to the new device
identically from either of the existing images.  However, the unwritten
sections may be different, causing the added image to be a hybrid of the
existing images.

Also, we are disallowing the addition of new images to a RAID1 LV that has
not completed the initial sync.  This may be different from mirroring, but
that is due to the fact that the 'mirror' segment type "stacks" when adding
a new image and RAID1 does not.  RAID1 will rebuild a newly added image
"inline" from the existant images, so they should be in-sync.

12 years agoTEST: Add missing test for RAID module version
Jonathan Brassow [Wed, 12 Sep 2012 11:27:37 +0000 (06:27 -0500)]
TEST:  Add missing test for RAID module version

RAID10 was added to dm-raid module version 1.3.0.  Omitted test for
this version is causing test suite to fail.

12 years agosystemd: depend on systemd-udev-settle unit in activation unit
Peter Rajnoha [Wed, 12 Sep 2012 09:30:13 +0000 (11:30 +0200)]
systemd: depend on systemd-udev-settle unit in activation unit

The "fedora-wait-storage.service" that the "lvm2-activation.service"
had as a dependency (which was fedora-specific solution anyway)
is obsolete now as this unit called "modprobe scsi_wait_scan"
which is not used anymore.

The "fedora-wait-storage.service" had "systemd-udev-settle" as
its dependency, so let's depend on this one directly now,
bypassing the out-dated "fedora-wait-storage.service".

12 years agovgchange: fix -aay to activate proper volumes
Peter Rajnoha [Wed, 12 Sep 2012 07:47:40 +0000 (09:47 +0200)]
vgchange: fix -aay to activate proper volumes

Using 'activation/auto_activation_volume_list = [ "vg/lvol1" ]'.

Before this patch:
  3 logical volume(s) in volume group "vg" now active
  LV    VG   Attr     LSize Pool Origin Data%  Move Log Copy%  Convert
  lvol0 vg   -wi----- 4.00m
  lvol1 vg   -wi-a--- 4.00m
  lvol2 vg   -wi-a--- 4.00m
  lvol3 vg   -wi-a--- 4.00m

(vg/lvol1 activated as it passes the list and all subsequent volumes too - wrong!)

With this patch:
  1 logical volume(s) in volume group "vg" now active
  LV    VG   Attr     LSize Pool Origin Data%  Move Log Copy%  Convert
  lvol0 vg   -wi----- 4.00m
  lvol1 vg   -wi-a--- 4.00m
  lvol2 vg   -wi----- 4.00m
  lvol3 vg   -wi----- 4.00m

(only vg/lvol1 activated as it passes the list and no other - correct!)

12 years agoRAID: Properly handle resync of RAID LVs
Jonathan Brassow [Tue, 11 Sep 2012 18:09:35 +0000 (13:09 -0500)]
RAID:  Properly handle resync of RAID LVs

Issuing a 'lvchange --resync <VG>/<RAID_LV>' had no effect.  This is
because the code to handle RAID LVs was not present.  This patch adds
the code that will clear the metadata areas of RAID LVs - causing them
to resync upon activation.

12 years agocleanup: Restructure code that handles mirror resyncing
Jonathan Brassow [Tue, 11 Sep 2012 18:01:05 +0000 (13:01 -0500)]
cleanup:  Restructure code that handles mirror resyncing

When an LV is to be resynced, the metadata areas are cleared and the
LV is reactivated.  This is true for mirroring and will also be true
for RAID LVs.  We restructure the code in lvchange_resync() so that we
keep all the common steps necessary (validation of ability to resync,
deactivation, activation of meta/log devices, clearing of those devices,
etc) and place the code that will be divergent in separate functions:
detach_metadata_devices()
attach_metadata_devices()

The common steps will be processed on lists of metadata devices.  Before
RAID capability is added, this will simply be the mirror log device (if
found).

This patch lays the ground-work for adding resync of RAID LVs.

12 years agocleanup: Reduce indentation by short-circuiting function
Jonathan Brassow [Tue, 11 Sep 2012 17:55:17 +0000 (12:55 -0500)]
cleanup:  Reduce indentation by short-circuiting function

By changing the conditional for resyncing mirrors with core-logs a
bit, we can short-circuit the rest of the function for that case
and reduce the amount of indenting in the rest of the function.

This cleanup will simplify future patches aimed at properly handling
the resync of RAID LVs.

12 years agoRAID: Disallow addition of RAID images while array is not in-sync
Jonathan Brassow [Mon, 10 Sep 2012 22:15:20 +0000 (17:15 -0500)]
RAID:  Disallow addition of RAID images while array is not in-sync

We cannot add images to a RAID array while it is not in-sync.  The
kernel will simply reject the table, saying:
'rebuild' specified while array is not in-sync
Now we check to ensure the LV is in-sync before attempting image
additions.

12 years agoRAID: '--test' should not cause a valid create command to fail
Jonathan Brassow [Wed, 5 Sep 2012 19:32:06 +0000 (14:32 -0500)]
RAID: '--test' should not cause a valid create command to fail

It is necessary when creating a RAID LV to clear the new metadata areas.
Failure to do so could result in a prepopulated bitmap that would cause
the new array to skip syncing portions of the array.  It is a requirement
that the metadata LVs be activated and cleared in the process of creating.
However in test mode, this requirement should be lifted - no new LVs should
be created or written to.

12 years agocleanup: Use segtype->ops->name() instead of segtype->name where applicable
Jonathan Brassow [Wed, 5 Sep 2012 16:35:54 +0000 (11:35 -0500)]
cleanup:  Use segtype->ops->name() instead of segtype->name where applicable

When printing a message for the user and the lv_segment pointer is available,
use segtype->ops->name() instead of segtype->name.  This gives a better
user-readable name for the segment.  This is especially true for the
'striped' segment type, which prints "linear" if there is an area_count of
one.

12 years agoTEST (lvresize-raid): Also test resizing of RAID10
Jonathan Brassow [Fri, 24 Aug 2012 21:20:53 +0000 (16:20 -0500)]
TEST (lvresize-raid):  Also test resizing of RAID10

12 years agomake: fix subdir order for distclean
Peter Rajnoha [Mon, 27 Aug 2012 13:39:08 +0000 (15:39 +0200)]
make: fix subdir order for distclean

The 'test' subdir needs to be processed before 'tools' subdir
for distclean as all the cmd names are read from 'tools/.commands'
file. Otherwise we'd end up with dangling symlinks in 'tools' subdir.

12 years agoconfig: require dm_config_create_value for dm_config_node's value
Peter Rajnoha [Mon, 27 Aug 2012 12:19:30 +0000 (14:19 +0200)]
config: require dm_config_create_value for dm_config_node's value

If we were defining a section (which is a node without a value) and
the value was created automatically on dm_config_create_node call,
we were wasting resources as the next step after creating the config
node itself was assigning NULL for the node's value.

The dm_config_node_create + dm_config_create_value sequence should be
used instead for settings and dm_config_node_create alone for sections.

The majority of the code already used the correct sequence. Though
with dm_config_node_create fn creating the value as well, the pool
memory was being trashed this way.

This patch removes the node value initialization on dm_config_create_node
fn call and keeps it for the direct dm_config_create_value fn call.

12 years agotest: snapshot_extend_threshold -> snapshot_autoextend_threshold
Peter Rajnoha [Mon, 27 Aug 2012 12:04:21 +0000 (14:04 +0200)]
test: snapshot_extend_threshold -> snapshot_autoextend_threshold

Missing the "auto" prefix in the config key name. The unknown
setting is silently ignored otherwise.

12 years agosetvbuf: reopen only valid fd
Peter Rajnoha [Mon, 27 Aug 2012 11:07:07 +0000 (13:07 +0200)]
setvbuf: reopen only valid fd

We should check whether the fd is opened before trying to reopen it.
For example, the stdin is closed in test/lib/harness.c causing the
test suite to fail.

12 years agotests: testing lvm_lv_rename
Zdenek Kabelac [Thu, 27 Jan 2011 22:43:14 +0000 (23:43 +0100)]
tests: testing lvm_lv_rename

Test stacking of rename operation within one udev transaction.

12 years agolvm2api: extend lvm2api with lvm_lv_rename
Zdenek Kabelac [Thu, 27 Jan 2011 22:41:32 +0000 (23:41 +0100)]
lvm2api: extend lvm2api with lvm_lv_rename

Add support for LV rename.

12 years agosetvbuf: close and reopen stream before change
Alasdair G Kergon [Sat, 25 Aug 2012 23:19:52 +0000 (00:19 +0100)]
setvbuf: close and reopen stream before change

Fix setvbuf code by closing and reopening stream before changing buffer.

But we need to review what this code is doing embedded inside a library
function rather than the simpler original form being run independently
at the top of main() by tools that need it.

12 years agobuffering: use unbuffered silent mode for liblvm
Alasdair G Kergon [Sat, 25 Aug 2012 23:15:45 +0000 (00:15 +0100)]
buffering: use unbuffered silent mode for liblvm

Disable private buffering when using liblvm.
When private stdin/stdout buffering is not used always use silent
mode.

12 years agoconfig: add silent mode
Alasdair G Kergon [Sat, 25 Aug 2012 19:35:48 +0000 (20:35 +0100)]
config: add silent mode

Accept -q as the short form of --quiet.
Suppress non-essential standard output if -q is given twice.
Treat log/silent in lvm.conf as equivalent to -qq.
Review all log_print messages and change some to
log_print_unless_silent.

When silent, the following commands still produce output:
dumpconfig, lvdisplay, lvmdiskscan, lvs, pvck, pvdisplay,
pvs, version, vgcfgrestore -l, vgdisplay, vgs.
[Needs checking.]

Non-essential messages are shifted from log level 4 to log level 5
for syslog and lvm2_log_fn purposes.

12 years agoRAID: Add support for RAID10
Jonathan Brassow [Fri, 24 Aug 2012 20:34:19 +0000 (15:34 -0500)]
RAID:  Add support for RAID10

This patch adds support for RAID10.  It is not the default at this
stage.  The user needs to specify '--type raid10' if they would like
RAID10 instead of stacked mirror over stripe.

12 years agoversion: update
Alasdair G Kergon [Fri, 24 Aug 2012 17:51:24 +0000 (18:51 +0100)]
version: update

12 years agoclenaup: compatible definition for older gcc
Zdenek Kabelac [Thu, 23 Aug 2012 14:12:45 +0000 (16:12 +0200)]
clenaup: compatible definition for older gcc

Fixes previous commit, it seems older gcc compilers do not
recognize same typedef.

(Easiest would be probably to directly include proper header here).

12 years agocleanup: add some missing stack backtraces
Zdenek Kabelac [Tue, 13 Mar 2012 20:36:02 +0000 (21:36 +0100)]
cleanup: add some missing stack backtraces

12 years agothin: discard
Zdenek Kabelac [Tue, 21 Aug 2012 13:51:54 +0000 (15:51 +0200)]
thin: discard

12 years agolvmapi: validate extents size for lvcreate
Zdenek Kabelac [Thu, 1 Mar 2012 16:59:35 +0000 (17:59 +0100)]
lvmapi: validate extents size for lvcreate

12 years agocleanup: initilize percent to INVALID
Zdenek Kabelac [Wed, 20 Jun 2012 10:05:00 +0000 (12:05 +0200)]
cleanup: initilize percent to INVALID

Always initialize percent to INVALID value, in case target
would have forget to setup this value somehow.

12 years agoclvmd,lvmetad: check for fcntl result
Zdenek Kabelac [Wed, 20 Jun 2012 08:49:16 +0000 (10:49 +0200)]
clvmd,lvmetad: check for fcntl result

Report any problem of fcntl.

12 years agoactivation: report error message
Zdenek Kabelac [Fri, 29 Jun 2012 08:18:28 +0000 (10:18 +0200)]
activation: report error message

If the monitoring activation failed and we have not yet
reported error - give the user error message for failure reason.

12 years agolvconvert: use _reload_lv on more places
Zdenek Kabelac [Thu, 2 Aug 2012 09:38:07 +0000 (11:38 +0200)]
lvconvert: use _reload_lv on more places

Use common subroutine.

12 years agolvconvert: move _reload_lv()
Zdenek Kabelac [Wed, 1 Aug 2012 13:34:45 +0000 (15:34 +0200)]
lvconvert: move _reload_lv()

Just move in front

12 years agocleanup: format1 test whether PV was found
Zdenek Kabelac [Thu, 21 Jun 2012 11:52:19 +0000 (13:52 +0200)]
cleanup: format1 test whether PV was found

Avoid dereferecing NULL pointer.

12 years agocleanup: add __attribute__ ((nonnull(1)))
Zdenek Kabelac [Sat, 23 Oct 2010 21:45:50 +0000 (23:45 +0200)]
cleanup: add __attribute__ ((nonnull(1)))

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