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

1199 Commits

Author SHA1 Message Date
Alasdair Kergon
03eee0e2ed Split metadata-external.h out from metadata.h for the tools to use. 2007-07-18 15:38:58 +00:00
Dave Wysochanski
33e5601937 Change pv_read_path to pv_by_path 2007-07-12 15:38:53 +00:00
Dave Wysochanski
0c795e2e18 Turn _add_pv_to_vg() into external library function add_pv_to_vg() 2007-07-12 05:04:42 +00:00
Dave Wysochanski
30303765a3 Refactor vg_extend error path. 2007-07-12 04:12:04 +00:00
Dave Wysochanski
c254039677 Add pv_read_path, a proposed external LVM library function to take a device path and return a PV handle 2007-07-11 23:33:12 +00:00
Alasdair Kergon
3c21da1797 Cope with find_seg_by_le() failure in check_lv_segments(). 2007-07-10 18:50:03 +00:00
Alasdair Kergon
eac952f3fe tidy 2007-07-10 18:20:00 +00:00
Alasdair Kergon
19fa139341 Fix pv_mda_count to cope with missing PV.
[vgcreate vg1 pv1 pv2; pvremove -ff pv1; pvs -P -o+pv_mda_count =>segfault]
2007-07-10 18:18:33 +00:00
Alasdair Kergon
d27e123310 Add vg_mda_count and pv_mda_count columns to reports. 2007-07-09 15:40:43 +00:00
Alasdair Kergon
68c87619bd Fix dumpconfig to use log_print instead of stdout directly. 2007-07-08 22:51:20 +00:00
Dave Wysochanski
ea8a12dbc1 Convert _add_pv_to_vg to usable LVM library function. 2007-07-02 21:48:30 +00:00
Dave Wysochanski
13835b5f6c Don't use index and rindex functions marked by SUSv3 as legacy - Jakub Bogusz <qboosh@pld-linux.org> 2007-07-02 11:17:21 +00:00
Petr Rockai
e7ddf4168d Make warnings go to stderr. Change log_warn to that effect, log_print
continues to send messages to stdout.
2007-06-28 17:33:44 +00:00
Dave Wysochanski
d6b1de30fe Convert vg->status checks to use vg_check_status function.\nRename status_flags to status in vg_check_status. 2007-06-19 04:36:12 +00:00
Dave Wysochanski
69483a8aaf Add vg_status function and clean up vg->status in tools directory 2007-06-19 04:23:32 +00:00
Dave Wysochanski
1f54709ee6 Make vg_extend() format_instance * parameter internal to vg_extend() 2007-06-19 00:33:43 +00:00
Dave Wysochanski
ff77bb1ab6 Remove get_ prefix from get_pv_* functions 2007-06-15 22:16:55 +00:00
Alasdair Kergon
817afaad5e pre-release 2007-06-15 20:46:04 +00:00
Petr Rockai
7379c67839 Allow keyboard interrupts in yes_no_prompt(). Add code to toollib.c
loops and to pvcreate.c, lvchange.c and lvresize.c to handle
interrupted prompts.
2007-06-15 10:11:14 +00:00
Dave Wysochanski
3df2c388b1 convert pv->vg_name[0] to \!is_orphan(pv) 2007-06-14 15:48:05 +00:00
Dave Wysochanski
fb6ca78e05 Remove casts in pv_create and find_pv_in_vg_by_uuid 2007-06-13 21:14:07 +00:00
Dave Wysochanski
dd04871295 Convert pv_handle_t to pv_t * and tidy up whitespace 2007-06-13 20:55:56 +00:00
Dave Wysochanski
f1f4c1ea50 Add typedef pv_handle_t 2007-06-13 19:52:48 +00:00
Dave Wysochanski
7da624db7b Fix a couple benign warnings by adding variable initializations. 2007-06-13 15:11:19 +00:00
Dave Wysochanski
b496210d9a Convert find_pv_in_vg_by_uuid and pv_create to use PV handles 2007-06-12 22:41:27 +00:00
Dave Wysochanski
fc2063b660 Change PV_HANDLE_DEREF to pv_field and add paren's 2007-06-12 21:39:49 +00:00
Dave Wysochanski
0e2f6120ee Add get_pv_* functions to return PV fields in prep for external LVM library 2007-06-12 21:20:20 +00:00
Dave Wysochanski
4e5f3e7331 Add wrappers to functions related to pv commands in preparation for exported LVM lib 2007-06-11 18:29:30 +00:00
Bryn M. Reeves
944cac939c Allow vgcfgrestore to list metadata backup files using -f 2007-06-08 22:38:48 +00:00
Dave Wysochanski
c221b0bc21 Add vg_check_status to consolidate vg status flags checks and error messages. 2007-06-06 19:40:28 +00:00
Dave Wysochanski
13209bad59 Fix pvdisplay --maps to not display segment header for orphan PVs. 2007-05-31 20:26:11 +00:00
Dave Wysochanski
3008bc4432 Fix redundant segment display when PV is given to 'pvdisplay --maps' cmdline. 2007-05-31 20:10:25 +00:00
Dave Wysochanski
dda1e6c983 Remove 'Type' from pvdisplay --maps as there is no 'Type' of a physical segment, only logical segments 2007-05-31 15:18:44 +00:00
Dave Wysochanski
5a4ba89aad Small fixes to pvdisplay --maps: 1) rename struct pv_segment vars from 'seg' to 'pvseg', 2) Change heading 2007-05-31 14:19:57 +00:00
Dave Wysochanski
4baa42be1c Add --maps to pvdisplay.
Modified original patch from David Robinson <zxvdr.au@gmail.com>.
2007-05-30 20:43:09 +00:00
Milan Broz
5efa3f1edf Remove symlinks if parent volume is deactivated. 2007-05-15 14:42:01 +00:00
Milan Broz
76b74ab11f Fix a segfault if a device has no target (no table) 2007-05-14 11:27:34 +00:00
Alasdair Kergon
19eb95f72f Fix get_config_uint64() to read a 64-bit value not a 32-bit one. 2007-04-27 20:41:50 +00:00
Alasdair Kergon
7c03887b7a Add -Wformat-security and change one fprintf() to fputs(). 2007-04-27 19:26:57 +00:00
Alasdair Kergon
e6edd1d7af Move regex functions into libdevmapper. 2007-04-27 18:52:05 +00:00
Alasdair Kergon
1bf5aae913 Change some #include lines to search only standard system directories. 2007-04-27 17:46:16 +00:00
Alasdair Kergon
30b95041de add preferred_names to man page. 2007-04-26 17:14:57 +00:00
Alasdair Kergon
4f2f566b06 Add devices/preferred_names config regex list for displayed device names.
Free a temporary dir string in fcntl_lock_file() after use.
Fix a dm_pool_destroy() in matcher_create().
Introduce goto_bad macro.
2007-04-26 16:44:59 +00:00
Dave Wysochanski
867c3249cb Fix warnings on x86_64 involving ptrdiff_t:
config/config.c:493: warning: format '%d' expects type 'int', but argument 5 has type 'long int'

Modified original patch from Jim Meyering <jim@meyering.net>
2007-04-26 16:40:46 +00:00
Dave Wysochanski
28d1c4d7e2 Update pvck to include text metadata area and record detection.
--
2007-04-25 21:10:55 +00:00
Dave Wysochanski
084a8bdcbc Add support functions for analysis of config sections,
and hence, on-disk LVM2 metadata.

--
2007-04-25 20:38:39 +00:00
Dave Wysochanski
d915579c6b Update pvck to read labels on disk, with flexible --labelsector
parameter.

--
2007-04-25 20:03:16 +00:00
Dave Wysochanski
15309c57bd Add count_chars and count_chars_len functions, two
generic string utility functions.

--
2007-04-25 18:24:19 +00:00
Dave Wysochanski
17a6fc0b45 Add 'scan_sector' parameter to label_read and _find_labeller to add
flexibility in searching for disk labels.
2007-04-23 18:21:01 +00:00
Dave Wysochanski
662e0238f0 Add dev_read_circular, read 2 regions on same device. 2007-04-19 02:10:42 +00:00
Alasdair Kergon
b4fb5226c0 Update lists of attribute characters in man pages.
Change cling alloc policy attribute character from 'C' to l'.
2007-03-27 13:35:33 +00:00
Milan Broz
5d06515c0b Fix creation and conversion of mirrors with tags. 2007-03-26 16:10:10 +00:00
Milan Broz
851002b87d Fix vgsplit for lvm1 format (set and validate VG name in PVs metadata).
Split metadata areas in vgsplit properly.
2007-03-23 12:43:17 +00:00
Alasdair Kergon
74e2acb680 Try to fix reading in of lvm1 striped LVs.
There are two fixes other than improving variable names and updating code
layout etc.
The loop counter is incremented by area_len instead of area_len * stripes;
the 3rd _check_stripe parameter is no longer multiplied by number of stripes.
2007-03-15 13:38:28 +00:00
Patrick Caulfield
5d47ed1161 Flag nolocking as a clustered locking module as we need to be able
to look at clustered LVs at clvmd startup
2007-03-13 14:59:21 +00:00
Alasdair Kergon
b45c9f49d0 Fix vgrename active LV check to ignore differing vgids. 2007-03-08 21:08:25 +00:00
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