Alasdair Kergon
8fe54fddba
Remove no-longer-used uuid_out parameter from activation info functions.
2007-03-08 19:58:04 +00:00
Alasdair Kergon
af91456949
Fix two more segfaults if an empty config file section encountered.
2007-03-08 19:22:52 +00:00
Alasdair Kergon
87cec8eb5e
Move .cache file into a new /etc/lvm/cache directory by default.
...
Add devices/cache_dir & devices/cache_file_prefix, deprecating devices/cache.
Create directory in fcntl_lock_file() if required.
2007-02-28 18:27:13 +00:00
Alasdair Kergon
e09dfed899
Fix loading of segment_libraries. [gentoo]
2007-02-08 17:31:02 +00:00
Alasdair Kergon
37fb985a82
If a PV reappears after it was removed from its VG, make it an orphan.
2007-02-07 13:29:52 +00:00
Alasdair Kergon
ce4c33102f
Fix vgsplit to handle mirrors.
...
Reorder fields in reporting field definitions.
2007-01-29 23:01:18 +00:00
Alasdair Kergon
fce67134f3
Fix md signature check to handle both endiannesses.
2007-01-26 17:15:16 +00:00
Alasdair Kergon
41aec14ed5
also ignore mirrors
2007-01-25 23:03:48 +00:00
Alasdair Kergon
f247a4e76f
Add devices/ignore_suspended_devices to ignore suspended dm devices.
2007-01-25 21:22:30 +00:00
Alasdair Kergon
2e1b92e3ea
Add some missing close() and fclose() return code checks.
...
Fix exit statuses of reporting tools (2.02.19).
2007-01-25 14:37:48 +00:00
Alasdair Kergon
20db8ffcae
lvm.static no longer interacts with dmeventd unless explicitly asked to.
2007-01-24 23:43:27 +00:00
Alasdair Kergon
24f4552bbe
fix earlier checkin
2007-01-24 22:06:11 +00:00
Alasdair Kergon
57fc4cc0b6
Add field definitions to report help text.
...
Remove unnecessary cmd arg from target_*monitor_events().
2007-01-24 16:51:24 +00:00
Alasdair Kergon
dd9927bcde
Long-lived processes write out persistent dev cache in refresh_toolcontext().
2007-01-23 16:03:54 +00:00
Alasdair Kergon
f72de1dc1c
Fix refresh_toolcontext() always to wipe persistent device filter cache.
...
Add is_long_lived to toolcontext.
2007-01-23 15:58:06 +00:00
Alasdair Kergon
7fee061a6d
Streamline dm_report_field_* interface.
2007-01-22 15:07:21 +00:00
Alasdair Kergon
8a37910d51
register->monitor etc.
2007-01-19 22:21:45 +00:00
Alasdair Kergon
594a27942b
No longer necessary to specify alignment for report fields.
2007-01-18 17:48:29 +00:00
Alasdair Kergon
6a91a99b1b
Fix a segfault if an empty config file section encountered.
2007-01-17 16:22:59 +00:00
Alasdair Kergon
0e2084da9c
merge _target_*register_events
...
introduce _create_dm_event_handler()
2007-01-17 15:00:57 +00:00
Alasdair Kergon
e430b424df
use updated dm_event_get_registered_device interface
2007-01-16 23:05:13 +00:00
Alasdair Kergon
d838a1e314
Move basic reporting functions into libdevmapper.
2007-01-16 18:06:12 +00:00
Alasdair Kergon
b1ab8b00b8
Fix partition table processing after sparc changes (introduced in 2.02.16).
...
Fix cmdline PE range processing segfault (introduced in 2.02.13).
2007-01-15 21:55:11 +00:00
Alasdair Kergon
02059c81e7
Some libdevmapper-event interface changes.
2007-01-15 18:22:02 +00:00
Alasdair Kergon
8ef6eb30d9
Report dmeventd mirror monitoring status.
2007-01-12 20:38:30 +00:00
Alasdair Kergon
6b36e863cb
updated dmeventd interface
2007-01-11 22:24:32 +00:00
Alasdair Kergon
2eeb2a1f54
dumpconfig accepts a list of configuration variables to display.
...
Change dumpconfig to use --file to redirect output to a file.
2007-01-09 23:22:31 +00:00
Alasdair Kergon
e62436fc70
Free memory in _raw_read_mda_header() error paths.
...
Fix ambiguous vgsplit error message for split LV.
Fix lvextend man page typo.
2007-01-09 21:12:41 +00:00
Alasdair Kergon
33f732c5e9
Add configure --with-dmdir to compile against a device-mapper source tree.
...
Use no flush suspending for mirrors.
2007-01-09 20:31:08 +00:00
Milan Broz
aa8a4d96bd
Fix create mirror with name longer than 22 chars.
2007-01-05 15:53:40 +00:00
Alasdair Kergon
0ce83a83f0
Fix some activate.c prototypes when compiled without devmapper.
2006-12-20 16:19:01 +00:00
Alasdair Kergon
5b61ca7281
When lvconvert allocates a mirror log, respect parallel area constraints.
...
Use loop to iterate through the now-ordered policy list in _allocate().
Check for failure to allocate just the mirror log.
Introduce calc_area_multiple().
Support mirror log allocation when there is only one PV: area_count now 0.
(See lvm-devel list archives for further details.)
2006-12-13 03:39:58 +00:00
Alasdair Kergon
948ee3e396
Fix detection of smallest area in _alloc_parallel_area() for cling policy.
2006-12-12 19:30:10 +00:00
Patrick Caulfield
e3e6eba1aa
Fix gulm operation of clvmd. including a hang when attempting to
...
exclusively lock an LV that is already locked no another node.
2006-12-11 14:00:26 +00:00
Alasdair Kergon
a951e97ae9
clvmd ia64 alignment fixes etc. (pjc)
2006-12-01 23:10:26 +00:00
Alasdair Kergon
4dc0ec2253
Adjust some alignments for ia64 and sparc.
...
(Some of the changes are probably unnecessary.)
2006-11-30 23:11:42 +00:00
Alasdair Kergon
6c48fe7433
Fix mirror segment removal to use temporary error segment.
2006-11-30 17:52:47 +00:00
Alasdair Kergon
9ce2c9bfc1
fix _find_config_node: null parameter is permitted
2006-11-21 15:13:36 +00:00
Alasdair Kergon
253751656b
Fix check for snapshot module when activating snapshot.
2006-11-20 16:45:45 +00:00
Alasdair Kergon
9f7e77099b
Warn if certain duplicate config file entries are seen.
...
(not thoroughly tested)
2006-11-16 17:36:00 +00:00
Alasdair Kergon
deb202bd42
Fix a label_verify error path.
2006-11-14 15:03:07 +00:00
Alasdair Kergon
be0e37715e
fix cast
2006-11-10 20:15:10 +00:00
Alasdair Kergon
f96cde8cbd
Fix adjusted_mirror_region_size() for 64-bit size.
2006-11-10 19:35:03 +00:00
Alasdair Kergon
a89d601463
Add some missing bounds checks on 32 bit extent counters.
...
Add Petabyte and Exabyte support.
Fix lvcreate error message when 0 extents requested.
2006-11-10 18:24:11 +00:00
Alasdair Kergon
c1c16a8f01
Protect .cache manipulations with fcntl locking.
...
Change .cache timestamp comparisons to use ctime.
2006-11-04 03:34:10 +00:00
Alasdair Kergon
4d2a8d8231
fix last check-in: lv->size is in sectors
2006-11-03 21:07:15 +00:00
Alasdair Kergon
c89024511b
Fix high-level free space check for partial allocations.
2006-10-30 16:10:55 +00:00
Alasdair Kergon
2bdc8e1252
Perform high-level free space check before each allocation attempt.
2006-10-23 15:54:51 +00:00
Alasdair Kergon
9766c3c960
Cope if same PV is included more than once in cmdline PE range list.
2006-10-21 23:18:43 +00:00
Alasdair Kergon
b16b9c2bf1
Set PV size to current device size if it is found to be zero.
2006-10-19 12:53:47 +00:00
Alasdair Kergon
7c5ec12630
Add segment parameter to target_present functions.
2006-10-18 18:01:53 +00:00
Alasdair Kergon
04dabc1562
Fall back to internal locking if external locking lib is missing or fails.
2006-10-14 16:37:54 +00:00
Alasdair Kergon
1e2f720a76
remove unused variable
2006-10-12 17:18:40 +00:00
Alasdair Kergon
de5c82a0d9
add cling allocation policy
2006-10-08 12:01:13 +00:00
Alasdair Kergon
b4e2a0e179
check_contiguous to use for_each_pv
2006-10-07 23:40:36 +00:00
Alasdair Kergon
ab507e894c
More work towards pv->size always holding the same value in internal metadata.
...
Store it in external text metadata as dev_size, and estimate it if not
present when metadata is read back in.
2006-10-07 23:17:17 +00:00
Alasdair Kergon
5faf02761f
rely on pv_setup functions to fix up pe_count
2006-10-07 23:06:18 +00:00
Alasdair Kergon
80592d845d
more refactoring
2006-10-07 16:00:28 +00:00
Alasdair Kergon
b6f8552074
Extend _for_each_pv() to allow termination without error.
2006-10-07 12:41:06 +00:00
Alasdair Kergon
7dce16f234
abstract _is_contiguous()
2006-10-07 11:34:53 +00:00
Alasdair Kergon
b4ccb00b36
move _for_each_pv()
2006-10-07 11:23:22 +00:00
Alasdair Kergon
68d7c0e601
Remove duplicated pv arg from _check_contiguous().
2006-10-07 11:00:09 +00:00
Alasdair Kergon
d547cbb00d
Add report columns with underscore before field names ending 'size'.
2006-10-07 10:42:27 +00:00
Alasdair Kergon
209f03f2b6
Fix format_text mda_setup pv->size and pv_setup pe_count calculations.
...
(This area of the code needs a lot more work.)
2006-10-05 22:02:52 +00:00
Alasdair Kergon
8d18637eca
Fix _for_each_pv() for mirror with core log.
2006-10-05 21:24:48 +00:00
Alasdair Kergon
7089e02ce1
Remove unused #defines from filter-md.c.
2006-10-04 16:03:17 +00:00
Alasdair Kergon
cf824a692d
exclude targets that are always built-in
2006-10-03 18:02:06 +00:00
Alasdair Kergon
6c81ed26f0
Add LV column to reports listing kernel modules needed for activation.
2006-10-03 17:55:20 +00:00
Alasdair Kergon
1baed0e1ae
Show available fields if report given invalid field. (e.g. lvs -o list)
2006-10-02 16:46:27 +00:00
Alasdair Kergon
8b1a3214b5
Add timestamp functions with --disable-realtime configure option. [AJ]
2006-09-30 20:02:02 +00:00
Alasdair Kergon
5095de5177
Fix two potential NULL pointer derefs in error cases in vg_read().
2006-09-21 20:25:54 +00:00
Alasdair Kergon
13ba0f9492
Fix lvconvert mirror change case detection logic.
...
Fix mirror log detachment so it correctly becomes a standalone LV.
2006-09-19 19:13:41 +00:00
Alasdair Kergon
bbb068562e
Extend _check_contiguous() to detect single-area LVs.
...
Include mirror log (untested) in _for_each_pv() processing.
Use MIRROR_LOG_SIZE constant.
Remove struct seg_pvs from _for_each_pv() for generalisation.
Avoid adding duplicates to list of parallel PVs to avoid.
2006-09-11 21:14:56 +00:00
Alasdair Kergon
d9c6bbab80
Fix several incorrect comparisons in parallel area avoidance code.
...
Fix segment lengths when flattening existing parallel areas.
Log existing parallel areas prior to allocation.
Fix mirror log creation when activation disabled.
2006-09-11 14:24:58 +00:00
Alasdair Kergon
dc4d7417f7
When using local file locking, skip clustered VGs.
...
Add fallback_to_clustered_locking and fallback_to_local_locking parameters.
2006-09-02 01:18:17 +00:00
Alasdair Kergon
a45da5f676
lvm.static uses built-in cluster locking instead of external locking.
...
Don't attempt to load shared libraries if built statically.
2006-08-31 22:21:00 +00:00
Alasdair Kergon
1c792fad4f
Change default locking_lib to liblvm2clusterlock.so.
2006-08-31 20:56:33 +00:00
Alasdair Kergon
0550c1b618
Move lvm_snprintf into libdevmapper.
2006-08-21 12:54:53 +00:00
Alasdair Kergon
7d7736b7b4
Add dm_split_words() and dm_split_lvm_name() to libdevmapper.
2006-08-21 12:07:03 +00:00
Alasdair Kergon
6711231a13
Move CMDLIB code into separate file and record whether static build.
2006-08-18 21:17:18 +00:00
Alasdair Kergon
10eb720306
wrappers files
2006-08-17 19:56:28 +00:00
Alasdair Kergon
94d501edd9
Fix PE_ALIGN for pagesize over 32KB.
2006-08-17 19:53:36 +00:00
Alasdair Kergon
b5d761e1d2
wrap PE_ALIGN
2006-08-17 19:30:59 +00:00
Alasdair Kergon
ee37789be0
Separate out LVM1_PE_ALIGN.
2006-08-17 19:15:27 +00:00
Alasdair Kergon
916490f8bf
Add lvm_getpagesize wrapper.
2006-08-17 18:23:44 +00:00
Alasdair Kergon
438abca889
Add checks for duplicate LV name, lvid and PV id before writing metadata.
...
Report all sanity check failures, not just the first.
2006-08-09 19:33:25 +00:00
Alasdair Kergon
9cd3426d3a
Fix missing lockfs on first snapshot creation.
2006-08-08 21:20:00 +00:00
Alasdair Kergon
e3ad1d19d5
Add --trustcache option to reporting commands in preparation for supporting
...
event-driven model. Without changes to the way the cache gets updated, the
option is currently unreliable without a global lock to prevent any lvm2
commands from running concurrently.
2006-08-01 14:56:33 +00:00
Alasdair Kergon
8b0d546f4c
Fix locking for mimage removal.
2006-07-20 20:37:10 +00:00
Alasdair Kergon
fe686a5180
Don't ignore persistent minor numbers when activating.
2006-07-10 19:17:40 +00:00
Alasdair Kergon
f2f8855b76
add dlerror to another error path
2006-07-05 17:26:36 +00:00
Alasdair Kergon
0b431b8a17
Use RTLD_GLOBAL when loading shared libraries.
2006-07-04 19:40:27 +00:00
Alasdair Kergon
e67ed94b3e
Add some forgotten memlock checks to _vg_read to protect against full scans.
2006-07-04 19:36:49 +00:00
Alasdair Kergon
2415c1ef87
Fix PV tools to include orphaned PVs in default output again.
2006-06-14 20:11:22 +00:00
Patrick Caulfield
8228b50882
Fix "Unaligned access" when using clvm
...
bz#194626
2006-06-12 09:46:35 +00:00
Alasdair Kergon
9f100d6028
Fix an extra dev_close in a label_read error path.
2006-06-08 22:15:49 +00:00
Alasdair Kergon
4aae724656
Fix target_register_events args.
2006-05-25 13:32:26 +00:00
Alasdair Kergon
aba30ebcdb
Add DISTCLEAN_TARGETS to make template for configure.h.
...
More fixes to error paths.
2006-05-16 20:53:13 +00:00
Alasdair Kergon
f7dd14588f
fix error path
2006-05-16 20:42:01 +00:00
Alasdair Kergon
2293567c8c
Fix lvcreate corelog validation.
...
Add --config for overriding most config file settings from cmdline.
Quote arguments when printing command line.
Remove linefeed from 'initialising logging' message.
Add 'Completed' debug message.
Don't attempt library exit after reloading config files.
Always compile with libdevmapper, even if device-mapper is disabled.
2006-05-16 16:48:31 +00:00
Alasdair Kergon
8c4e429574
fix dev->device
2006-05-12 19:47:40 +00:00
Alasdair Kergon
324d0b9742
not reqd
2006-05-12 19:44:42 +00:00
Alasdair Kergon
3e3d5d8593
Add --monitor to vgcreate and lvcreate to control dmeventd registration.
...
Propagate --monitor around cluster.
Filter LCK_NONBLOCK in clvmd lock_vg.
2006-05-12 19:16:48 +00:00
Alasdair Kergon
6560de21e2
fix compile
2006-05-12 13:33:22 +00:00
Alasdair Kergon
d9ac88a501
M for unsynced mirror
2006-05-11 20:17:17 +00:00
Alasdair Kergon
de82843391
Add --nosync to lvcreate with LV flag NOTSYNCED.
2006-05-11 20:03:40 +00:00
Alasdair Kergon
49fba23c81
Use mirror's uuid for a core log.
2006-05-11 19:47:53 +00:00
Alasdair Kergon
aeb2c277a8
Add mirror log fault-handling policy.
2006-05-11 19:45:53 +00:00
Alasdair Kergon
526a3c2186
Propagate nosync flag around cluster.
2006-05-11 19:05:21 +00:00
Alasdair Kergon
532dae4854
Allow vgreduce to handle mirror log failures.
2006-05-11 19:01:11 +00:00
Alasdair Kergon
f17f6814c9
Add --corelog to lvcreate and lvconvert.
2006-05-11 18:54:04 +00:00
Alasdair Kergon
5c9d70c955
Create a log header for replacement in-sync mirror log.
...
Use set_lv() and dev_set() to wipe sections of devices.
Add mirror_in_sync() flag to avoid unnecessary resync on activation.
2006-05-11 18:39:24 +00:00
Alasdair Kergon
898e6f8e41
Add mirror_library description to example.conf.
...
More compile-time cleanup.
2006-05-11 17:58:58 +00:00
Alasdair Kergon
4b52511f50
fix last commit
2006-05-10 17:51:02 +00:00
Alasdair Kergon
2c7fbadeef
more coverity fixes
2006-05-10 17:49:25 +00:00
Alasdair Kergon
eba586f053
Fix uuid_from_num() buffer overrun.
2006-05-10 16:42:03 +00:00
Alasdair Kergon
72b2cb613a
Make SIZE_SHORT the default for display_size().
...
Fix some memory leaks in error paths found by coverity.
Use C99 struct initialisers.
Move DEFS into configure.h.
Clean-ups to remove miscellaneous compiler warnings.
2006-05-09 21:23:51 +00:00
Alasdair Kergon
b810c54700
sign fix
2006-05-04 09:33:42 +00:00
Alasdair Kergon
98513c2729
fix stripesize const
2006-05-02 07:14:43 +00:00
Alasdair Kergon
12de747d3a
Improve stripe size validation.
...
Increase maximum stripe size limit to physical extent size for lvm2 metadata.
2006-04-29 22:08:43 +00:00
Alasdair Kergon
8b4273d298
missing {
2006-04-28 21:07:19 +00:00
Alasdair Kergon
2f1489a673
Fix activation code to check for pre-existing mirror logs.
2006-04-28 17:01:07 +00:00
Alasdair Kergon
e24e713001
_register_dev_for_events to return error on failure
2006-04-28 14:06:06 +00:00
Alasdair Kergon
81b4308bde
Ignore empty strings in config files.
2006-04-28 13:30:59 +00:00
Alasdair Kergon
6aa17fe8d2
remove redundant list_init
2006-04-27 17:58:48 +00:00
Alasdair Kergon
26b2524996
Invalidate cache if composition of VG changed externally.
2006-04-21 19:12:41 +00:00
Alasdair Kergon
16959f2f01
terminate vgid in debug mesg
2006-04-21 15:37:08 +00:00
Alasdair Kergon
05ffaffe0c
Fix vgid string termination in recent cache code.
2006-04-21 14:44:33 +00:00
Alasdair Kergon
9e8a7c7dab
remove inlines
2006-04-19 18:12:33 +00:00
Alasdair Kergon
8a2fc58645
Check for libsepol.
...
Add some cflow & scope support.
Separate out DEFS from CFLAGS.
Remove inlines and use unique function names.
2006-04-19 15:33:07 +00:00
Alasdair Kergon
dbd3026f8a
vgrename accepts vgid and exported VG.
2006-04-13 21:08:29 +00:00
Alasdair Kergon
2ab16287e6
When choosing between identically-named VGs, also consider creation_host.
2006-04-13 17:32:24 +00:00
Alasdair Kergon
a5fe5a7cdd
Fix vgexport/vgimport to set/reset PV exported flag so pv_attr is correct.
...
Add vgid to struct physical_volume and pass with vg_name to some functions.
2006-04-12 21:23:04 +00:00
Alasdair Kergon
e8db70239e
If two or more VGs are found with the same name, use one that is not exported.
2006-04-12 17:54:11 +00:00
Alasdair Kergon
5dbc1f263a
tidy
2006-04-11 19:09:55 +00:00
Alasdair Kergon
f084e627cc
When scanning, also record whether or not VG is exported.
2006-04-11 17:42:15 +00:00
Alasdair Kergon
f9c232c2ee
Use lvmcache_update_vgname_and_id throughout.
2006-04-11 16:00:26 +00:00
Alasdair Kergon
cced28dac3
Whenever vgname is captured, also capture vgid.
2006-04-11 13:55:59 +00:00
Alasdair Kergon
a14aa9d8c3
Capture vgid in more places.
2006-04-10 22:09:00 +00:00
Alasdair Kergon
ace652e673
lv_is_visible()
2006-04-07 17:41:56 +00:00
Alasdair Kergon
472ac5bdd5
more snapshot code tidying
2006-04-06 14:06:27 +00:00
Alasdair Kergon
2cd0aa727a
Introduce origin_from_cow()
2006-04-06 13:39:16 +00:00
Alasdair Kergon
1a01b0c103
Suppress locking library load failure message if --ignorelockingfailure.
2006-04-03 18:43:55 +00:00
Alasdair Kergon
9f5d8283a9
Propagate partial mode around cluster.
2006-03-09 22:34:13 +00:00
Alasdair Kergon
d6207798e6
Fix archive file expiration.
2006-03-07 15:43:05 +00:00
Alasdair Kergon
e408d62eaf
suspend using existing LV metadata; vgreduce then needs partial flag
2006-02-03 19:36:20 +00:00
Alasdair Kergon
e4c11ad108
Only do lockfs filesystem sync when suspending snapshots.
...
Switchover library building to use LIB_SUFFIX.
2006-01-31 14:52:30 +00:00
Alasdair Kergon
8b888354c8
When suspending, dmeventd deregistration needs to use existing details
...
not precommitted ones.
2006-01-27 20:39:37 +00:00
Alasdair Kergon
1b6e5052c9
Fix dmeventd sharedlib path & start tidying registration code.
2006-01-27 20:13:12 +00:00
Alasdair Kergon
54d9d3cf3c
Add config file setting: dmeventd/mirror_library
2006-01-27 19:05:05 +00:00