Petr Rockai
99a304bc17
Optionally abort on internal errors (and leverage this option in the
...
testsuite). (This is showing a problem in the pvmove test for me, so I expect
the tests to start failing -- this needs to be fixed separately though.)
2009-11-30 17:17:11 +00:00
Alasdair Kergon
c791c54e5b
Fix so only log_error and log_fatal set EUNCLASSIFIED.
2009-07-16 13:13:33 +00:00
Dave Wysochanski
a0b1b1872e
Change default errno value to 0 (no error) and add prototypes in lvm.h
...
Since we are using errno values, we should use '0' as a default value
which indicates a non-error, rather than defining some made-up default
value that is not defined in errno. If we need to deviate from errno
values, this will most likely indicate a flaw in our design.
Add prototypes for lvm_errno and lvm_errmsg inside lvm.h and provide
a basic description of their function. This fixes a couple compile
warnings.
Author: Dave Wysochanski <dwysocha@redhat.com>
2009-07-16 03:07:45 +00:00
Alasdair Kergon
9fac443591
Add log_errno to set a specific errno and replace log_error in due course.
2009-07-16 00:52:06 +00:00
Alasdair Kergon
d917192f00
Add lvm_errno and lvm_errmsg to liblvm to obtain failure information.
...
Change create_toolcontext to still return an object if it fails part-way.
Add EUNCLASSIFIED (-1) as the default LVM errno code.
2009-07-16 00:36:59 +00:00
Alasdair Kergon
d614646157
Store any errno and error messages issued while processing each command.
...
(Enabled by default while we test it, but in due course we'll only store
the error messages when we need to.)
2009-07-15 23:57:54 +00:00
Alasdair Kergon
a9cb6969b0
Add dm_log_with_errno and dm_log_with_errno_init, deprecating the old
...
Change plog to use dm_log_with_errno unless deprecated dm_log_init was used.
Rename plog macro to LOG_LINE and use in dm_dump_memory_debug.
2009-07-10 09:59:37 +00:00
Alasdair Kergon
3e5b6ed214
more tweaking to get things to compile - dmlib.h for log fns, list.h
2008-11-03 18:59:59 +00:00
Alasdair Kergon
84b9ec9733
Split out lvm-logging.h from log.h.
2008-10-30 17:27:28 +00:00
Alasdair Kergon
8c5bcdabab
Improve the way VGs with PVs missing are handled so manual intervention
...
is required in fewer circumstances. (mornfall)
2008-09-19 06:42:00 +00:00
Dave Wysochanski
0187112396
Fix identifier 'error_message_produced' used ambiguously.
...
Related compiler warning:
log/log.c:242: warning: declaration of 'error_message_produced' shadows a global declaration
../include/log.h:98: warning: shadowed declaration is here
2008-06-17 14:14:00 +00:00
Alasdair Kergon
ec40d92889
post-release
2008-06-06 19:28:35 +00:00
Alasdair Kergon
697e3bb2df
back out unnecessary changes for this release
2008-06-06 17:36:19 +00:00
Alasdair Kergon
de24008109
In script-processing mode, stop if any command fails.
...
Warn if command exits with non-zero status code without a prior log_error.
2008-05-30 15:27:44 +00:00
Milan Broz
8bf70e11ee
Fix output if overriding command_names on cmdline.
2008-04-07 13:53:26 +00:00
Alasdair Kergon
67cdbd7e4d
Some whitespace tidy-ups.
2008-01-30 14:00:02 +00:00
Alasdair Kergon
be6845999b
Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1.
2007-08-20 20:55:30 +00:00
Jim Meyering
1a5d6bd23d
Detect stream write failure reliably; new fn: lvm_fclose; use dm_fclose
...
* lib/misc/lvm-file.c (lvm_fclose): New function.
* lib/misc/lvm-file.h (lvm_fclose): Declare it.
* lib/config/config.c (write_config_file): Use the new function to detect
and diagnose unlikely write failure.
* lib/filters/filter-persistent.c (persistent_filter_dump): Likewise.
* lib/format_text/archive.c (archive_vg): Likewise.
* lib/format_text/format-text.c (_vg_write_file): Likewise.
* lib/log/log.c (fin_log): Similar, but use dm_fclose directly.
Include "\n" at end of each fprintf format string.
2007-07-24 17:48:08 +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
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
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
8a37910d51
register->monitor etc.
2007-01-19 22:21:45 +00:00
Alasdair Kergon
0550c1b618
Move lvm_snprintf into libdevmapper.
2006-08-21 12:54:53 +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
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
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
2ab16287e6
When choosing between identically-named VGs, also consider creation_host.
2006-04-13 17:32:24 +00:00
Alasdair Kergon
5f4b2acfe5
Replacement activation code. [Don't use this yet!]
2005-11-08 22:52:26 +00:00
Alasdair Kergon
2262b32057
Use hash, bitset, malloc, pool from libdevmapper.
2005-10-16 23:03:59 +00:00
Alasdair Kergon
15db9fcfbf
Reinstate full PV size when removing from VG.
...
Support loopfiles for testing.
Complete the pv_segment support.
2005-05-03 17:28:23 +00:00
Alasdair Kergon
343a8c920d
Add clustered attribute so vgchange can identify clustered VGs w/o locking.
2005-03-21 22:55:12 +00:00
Alasdair Kergon
e5b836d2d6
Improve detection of external changes affecting internal cache.
2005-03-21 22:40:35 +00:00
Alasdair Kergon
09a7dce6be
Additional device-handling debug messages.
...
Additional verbosity level -vvvv includes line numbers and backtraces.
Verbose messages now go to stderr not stdout.
Close any stray file descriptors before starting.
Refine partitionable checks for certain device types.
Allow devices/types to override built-ins.
2004-12-10 16:01:35 +00:00
Alasdair Kergon
5ab925debf
pvcreate wipes md superblocks. (With --uuid or --restorefile it prompts.)
2004-11-19 19:25:07 +00:00
Alasdair Kergon
8d267798db
vgcfgbackup -f accepts template with %s for VG name.
2004-06-19 18:55:29 +00:00
Alasdair Kergon
6606c3ae81
Update copyright notices.
2004-03-30 19:35:44 +00:00
Alasdair Kergon
aff059ecc2
cmdlib logging function
2004-03-26 14:47:14 +00:00
Alasdair Kergon
d24fb77c03
Rebaseline internal verbose level.
2004-03-26 11:45:01 +00:00
Alasdair Kergon
de17d760ba
host tags
2004-03-08 18:13:22 +00:00
Alasdair Kergon
69792976e4
Basic internationalisation support.
2004-02-13 22:56:45 +00:00
Alasdair Kergon
914c97239f
Another sync point - numerous fixes & clean ups.
2003-07-04 22:34:56 +00:00
Alasdair Kergon
5053603d2a
pvmove flag
2003-04-30 15:22:52 +00:00
Alasdair Kergon
26e7f2e0c4
Tidy various pre-processing incl. making libdl optional.
2003-03-24 18:08:53 +00:00
Alasdair Kergon
4c64ed4ced
New column-based reporting tools: lvs, pvs & vgs.
2002-12-12 20:55:49 +00:00
Alasdair Kergon
d1d9800ef1
Refactoring.
2002-11-18 14:01:16 +00:00
Alasdair Kergon
48ad31920d
Add --ignorelockingfailure
2002-07-10 20:43:32 +00:00
Alasdair Kergon
a6bf4bcfa2
New function to enable suppression of messages to stdout/stderr.
2002-03-15 22:54:04 +00:00
Alasdair Kergon
078cab224b
Suppress meaningless <backtrace> msg on screen (no prog/line number given)
2002-02-20 21:26:40 +00:00
Alasdair Kergon
8d6a8717bb
Now that most of the usage of 'stack' only occurs when there's an error,
...
don't suppress it from the screen output any longer.
2002-02-11 18:25:18 +00:00
Joe Thornber
6d52fb460b
o Split activate.c into a high level (remaining in activate.c) and low level (ll-activate.[hc]) API.
...
o Creation of a device from an lv now lives in activate-lv.c
2002-02-11 15:48:34 +00:00
Alasdair Kergon
df91af9141
o A vgimport implementation
...
o Require -a or <list of vgs> parameters with vgexport/vgimport
o Allow pvcreate -ff to destroy exported/partial VGs
2002-01-29 19:19:37 +00:00
Alasdair Kergon
f53c6aa66e
o Basic support for exporting (but importing not completed yet).
...
o When volume group does not have write flag set, prevent changes to it.
o Preparation for partial activation (not completed yet).
2002-01-29 17:23:33 +00:00
Alasdair Kergon
1176eb2597
Tweak some error message levels.
2002-01-27 21:30:47 +00:00
Alasdair Kergon
7a403967d5
Customisable message output prefix / indentation.
2002-01-22 15:33:40 +00:00
Alasdair Kergon
682c0fef74
Allow syslog facility to be set, or turned off, from the config file.
2002-01-18 21:26:37 +00:00
Alasdair Kergon
0e63603659
Display something in the "hypothetical" unknown log level case.
2002-01-18 19:38:19 +00:00
Alasdair Kergon
cc21948339
o Add autobackup support to tools (follows most vg_write calls).
...
o Skip autobackup when in test mode.
o Set test mode from config file.
o Create system/backup dirs if not present (unless LVM_SYSTEM_DIR holds "").
2001-12-31 21:27:39 +00:00
Alasdair Kergon
94b8220f6a
lvdisplay & lvreduce
2001-11-08 16:15:58 +00:00
Joe Thornber
2ba80b436f
o Added lvs_in_vgs_opened
2001-11-07 15:02:07 +00:00
Joe Thornber
1b9fcf48b1
o LGPL list implementation
2001-10-31 12:47:01 +00:00
Alasdair Kergon
4790fce2ad
persistent filter & some log message changes
2001-10-23 18:20:27 +00:00
Alasdair Kergon
2d9133bbbd
standardise some log messages
2001-10-10 16:36:32 +00:00
Joe Thornber
e6efb2b0bd
o got dbg_malloc_t working, Alasdair could you look at the Makefile.in it
...
seems to be having trouble with the dependencies.
o removed some files from the lib makefile that don't compile yet.
2001-10-04 10:13:07 +00:00
Joe Thornber
b8e4e502d3
o code sync for dev-cache.c
...
o made copyright headers the same
o added __attribute ((format ... to print_log so we'll get better compile errors
o added iterator to the hash table
2001-10-03 11:06:31 +00:00
Alasdair Kergon
b8ef655fb7
Tidy include files
2001-10-01 15:14:39 +00:00
Alasdair Kergon
269930c0da
lvactivate checkpoint commit
2001-09-25 12:49:28 +00:00
Joe Thornber
df88dece8b
o Populating with stuff from experimental
2001-08-21 12:56:08 +00:00