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

3281 Commits

Author SHA1 Message Date
Petr Rockai
45aff0a2bb Update WHATS_NEW wrt a recent patch. 2009-05-09 13:47:03 +00:00
Dave Wysochanski
614e02904a Update tests for region_size. 2009-05-08 21:50:20 +00:00
Dave Wysochanski
031966bdb0 Add tests to check pv_mda_size and vg_mda_size. 2009-05-08 06:10:45 +00:00
Dave Wysochanski
31424a53ee Add tests to check vgcreate --physicalextentsize and field vg_extent_size. 2009-05-08 05:15:52 +00:00
Dave Wysochanski
eb7d3facea Validate chunksize and originsize for snapshots. 2009-05-08 04:24:52 +00:00
Milan Broz
5c93cdba2d Fix PV datalign when for values starting prior to MDA area.
The dataalign value must always be aligned according
to MDA area.
The currect code checks if calculated value collides with
MDA area but not if the value is so small that it is
located before MDA starts.

Unfortunatelly there can be also MDA in the end of the device.

The patch adds simple check to avoid this miscalculation.
Patch expects that first MDA always starts on <= pagesize boundary
(this is true for all allowed label sector parameters).
2009-05-07 12:11:50 +00:00
Milan Broz
610646095b Use zalloc in initialization of device manager (to zero pvmove mirror count). 2009-05-07 12:01:21 +00:00
Dave Wysochanski
14f5aa2753 Update columns.h comment. 2009-05-06 15:25:23 +00:00
Dave Wysochanski
c5185d4c03 Fixup whitespace. 2009-04-29 20:14:21 +00:00
Dave Wysochanski
1fa92933b5 Fixup whitespace. 2009-04-29 20:11:46 +00:00
Dave Wysochanski
4afec75e94 Use liblvm.so instead of .a 2009-04-28 19:08:25 +00:00
Dave Wysochanski
e08ad14696 Fix error path in vg_make_handle().
Enter the error condition if either of the allocations fail, and
don't use dm_pool_zalloc if dm_pool_create fails.
2009-04-28 17:46:47 +00:00
Peter Rajnoha
7833b01291 Fix wrong arg in lv_is_virtual_origin call while creating snapshots. 2009-04-26 08:12:12 +00:00
Alasdair Kergon
87f42fda5e Add sparse devices: lvcreate -s --virtualoriginsize (hidden zero origin).
Add lvs origin_size field.
Fix linux configure --enable-debug to exclude -O2.

Still a few rough edges, but hopefully usable now:
  lvcreate -s vg1 -L 100M --virtualoriginsize 1T
2009-04-25 01:17:59 +00:00
Alasdair Kergon
7f54ef36dc Fix linux configure --enable-debug to exclude -O2. 2009-04-24 21:44:15 +00:00
Milan Broz
bf3423d355 Fix pool leak in lvmcache_read_vg error path.
(Introduced in previous patches.)
2009-04-24 12:03:55 +00:00
Peter Rajnoha
2dce31a16a Fix segfault when using -U, -G and -M options in dmsetup. 2009-04-24 11:30:49 +00:00
Petr Rockai
3802b91a4a Avoid scanning non-PV devices in functional tests, otherwise lvconvert --repair
breaks for some reason -- possibly needs investagation, but this should fix it
in the meantime.
2009-04-24 08:00:48 +00:00
Petr Rockai
eb23252b61 Implement, test and document (first iteration of) lvconvert --repair. 2009-04-23 16:56:21 +00:00
Petr Rockai
54120cb254 Refuse adding missing PVs in create_pv_list in toollib when allocatable_only is
requested.
2009-04-23 16:45:30 +00:00
Petr Rockai
e1ea382999 A more thorough PV equality test (that also copes better with MISSING_PVs) in
_is_mirror_image_removable.
2009-04-23 16:43:01 +00:00
Petr Rockai
eeadae1b6a Do not include MISSING_PVs in allocation maps. 2009-04-23 16:41:27 +00:00
Dave Wysochanski
d85cf5d14d Update columns.h comment to describe macro args. 2009-04-23 16:27:58 +00:00
Alasdair Kergon
40907c2928 fix typo reported by "A. Costa" <agcosta@gis.net> 2009-04-23 12:20:15 +00:00
Milan Broz
cd978f74da Fix vgreduce --removemissing failure exit code. 2009-04-22 17:00:28 +00:00
Dave Wysochanski
efa62ff443 Remove some trailing whitespace so git won't complain. 2009-04-22 12:46:25 +00:00
Milan Broz
293b6f7eaa Clean a lot of extra extra whitespaces. 2009-04-22 10:38:16 +00:00
Milan Broz
dfbc015c69 Fix remote metadata backup for clvmd
Run backup of metadata on remote nodes in the
same place like local node - when calling backup().

Introduce backup_locally() which calls only
local backup if needed.

Remote backup is now trigerred by LCK_VG_BACKUP flag
combination (special VG lock).

This lock type will call check_current_backup()
(including backup_locally() call) and updates
metadata on all nodes.

(Patch fixes non-functional remote backup,
current call during VG lock never triggers.)
2009-04-22 09:39:45 +00:00
Milan Broz
e5656d86d2 Alloc PV internal structure from VG mempool if possible. 2009-04-22 09:31:30 +00:00
Jonathan Earl Brassow
9b76dcc190 - Updating cluster log with latest code changes/bug fixes before
altering to new kernel structures.
2009-04-21 19:16:22 +00:00
Milan Broz
8f3fd69ffa Move metadata backup call after vg_commit.
The backup() call store metadata from memory.

But in cluster backup() call performs
remote nodes metadata backup and it reads data from disk.

For metadata backup consistency,
patch moves all backup() calls after vg_commit.

(Moreover, some tools already do that this way.)
2009-04-21 14:31:57 +00:00
Milan Broz
c4ff133840 Tidy lv_hash[_lock] use inside clvmd.
- Rename unlock_all to destroy_lvhash,
this function is called in cluster shutdown
unlocks everything and clean up allocated info space.

 - Tidy lv_hash_lock use
.
Except adding free(lvi) in lv_has destructror
there is no functional change.
2009-04-21 13:11:28 +00:00
Milan Broz
d66abfb82a Fix pvseg report for orphan PVs and other devices.
If user requests report attribute from PVSEG type
and PV is orphan (or all devices is set), the report
is empty.

Try for example (when only orphan PV are present)
 #pvs
 #pvs -o +devices
# pvs /dev/sdb1
  PV         VG   Fmt  Attr PSize  PFree
    /dev/sdb1       lvm2 --   46.58G 46.58G
# pvs -o +devices /dev/sdb1
(no output)

The problem is caused by empty pv->segments list.

Fix it by providing fake segment here (similar to fake structures
in _pvsegs_sub_single() calls.
2009-04-21 12:59:18 +00:00
Milan Broz
81c7482974 Fix pvs -a for segmented output
# pvs -a -o devices
   Volume group name (null) has invalid characters
   Skipping volume group (null)

...
_pvsegs_sub_single creates fake vg, we need to check
that pv is real here.
2009-04-21 12:57:31 +00:00
Dave Wysochanski
96bfa40b47 Add libdevmapper to test/api building. 2009-04-20 20:46:06 +00:00
Milan Broz
1cc75dfb53 Add MMC device type to filters. 2009-04-16 10:16:14 +00:00
Milan Broz
19061a1a15 Fix dmsetup.static build. 2009-04-15 14:42:27 +00:00
Milan Broz
043b13625b Properly release VG memory pool in all CLI tools. 2009-04-10 10:01:38 +00:00
Milan Broz
405366fd48 Properly release VG memory pool in metadata manipulation code. 2009-04-10 10:01:08 +00:00
Milan Broz
fc310448c0 Properly release VG memory pool in archiver code. 2009-04-10 10:00:37 +00:00
Milan Broz
095bbca691 Properly release VG memory pool in activation code and clvmd. 2009-04-10 10:00:04 +00:00
Milan Broz
8e1d5615b4 Introduce memory pool per volume group.
Since now, all code reading volume group is responsible for releasing
the memory allocated by calling vg_release(vg).
(For simplicity of use, vg_releae can be called for vg == NULL,
the same logic like free(NULL)).

Also providing simple macro for unlocking & releasing in one step,
tools usualy uses this approach.

The global memory pool (cmd->mem) should be used only for global
physical volume operations.

This patch have to be applied with all subsequent patches to complete
memory pool per vg logic.

Using separate memory pool has quite bit memory saving impact when
using large VGs, this is mainly needed when we have to use
preallocated and locked memory (and should not overflow from that
memory space).
2009-04-10 09:59:18 +00:00
Milan Broz
d828b9a4d7 Helper function to catch memory pool leaks. 2009-04-10 09:56:58 +00:00
Milan Broz
6fe905c705 Properly copy the whole pv structure for later use.
The all_pvs list, used in vg_read, should make its own private
copy of pv structures, otherwise (when vg will use its own pool)
it will point to released memory pool.
The same applies for get_pvs() call.

Patch adds pv_list copy helper and adds explicit memory pool
parameter into _copy_pv.

(Please note that all these helper functions cannot guarantee that
vg related fields are valid - proper vg read & lock must be used
if it is requested.)
2009-04-10 09:56:00 +00:00
Milan Broz
1b25b6e009 Always return exit error status when locking of volume group fails. 2009-04-10 09:54:36 +00:00
Milan Broz
6ce8f8d553 Fix mirror log convert validation question. 2009-04-10 09:53:42 +00:00
Zdenek Kabelac
9bcd5c2ffc Avoid referencing files from DESTDIR during build process 2009-04-08 14:08:05 +00:00
Zdenek Kabelac
beeae21dbb Do not create some dm and lvm static librarie when they are not requested
by configure option
Add dependency for static dmeventd library
2009-04-08 14:04:35 +00:00
Milan Broz
772cac09e3 Enable use of cached metadata for pvs & pvdisplay.
Currently PV commands, which performs full device scan, repeatly
re-reads PVs and scans for all devices.

This behaviour can lead to OOM for large VG.

This patch allows using internal metadata cache for pvs & pvdisplay,
so the commands scan the PVs only once.
(We have to use VG_GLOBAL otherwise cache is invalidated on every
VG unlock in process_single PV call.)
2009-04-08 12:53:20 +00:00
Alasdair Kergon
bef749c942 Add missing 'device-mapper' internal subdir build dependency. 2009-04-07 22:53:48 +00:00