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

440 Commits

Author SHA1 Message Date
Alasdair Kergon
57c74fb5af Missing ] in pvmove usage display 2003-09-15 15:01:36 +00:00
Alasdair Kergon
8387b47352 Generalise 'invalid chars' error mesg to just say 'invalid' 2003-09-15 15:01:00 +00:00
Alasdair Kergon
364a71ca82 Correct order of consistency/exists checks. 2003-09-15 15:00:01 +00:00
Alasdair Kergon
8b7a435dee Log each command & args. 2003-08-26 21:00:05 +00:00
Alasdair Kergon
4c22730b53 Some tidyups and minor fixes. 2003-08-20 15:48:27 +00:00
Alasdair Kergon
36cf79384f Also allow pvmove --abort when pvmove mirror not active (e.g. after a reboot). 2003-08-18 17:21:51 +00:00
Alasdair Kergon
28cb0299c1 Missing check for inconsistent VG in pvmove. 2003-08-18 13:52:43 +00:00
Alasdair Kergon
0b946db909 Restrict active lvchange -My with -f 2003-07-11 17:10:19 +00:00
Alasdair Kergon
914c97239f Another sync point - numerous fixes & clean ups. 2003-07-04 22:34:56 +00:00
Alasdair Kergon
8ac9712539 Synchronise repository / 2.4.21 support 2003-07-04 19:38:49 +00:00
Alasdair Kergon
d71bfabe39 Support for v4 interface 2003-07-01 21:20:58 +00:00
Alasdair Kergon
13601dbfe8 remove global pvmove lock & poll for completion 2003-05-06 12:20:11 +00:00
Alasdair Kergon
46a29c0212 Check for locked LVs/pvmoves. 2003-05-06 12:14:36 +00:00
Alasdair Kergon
361e5e3fac unsigned 2003-05-06 12:13:19 +00:00
Alasdair Kergon
982cb02dfb Prevent renaming active VGs for now. 2003-05-06 12:11:46 +00:00
Alasdair Kergon
6e03b44cc8 Don't process locked LVs 2003-05-06 12:10:18 +00:00
Alasdair Kergon
31abe57cd6 Store argv 2003-05-06 12:09:28 +00:00
Alasdair Kergon
3a61b05422 --abort --background 2003-05-06 12:08:58 +00:00
Alasdair Kergon
d7ef2ca7cd Don't move snapshots 2003-04-30 15:58:09 +00:00
Alasdair Kergon
43ecb8ffe4 Add pvmove 2003-04-30 15:28:17 +00:00
Alasdair Kergon
7512e5a202 use pvmove flag 2003-04-30 15:25:34 +00:00
Alasdair Kergon
6910c129a9 Display event number. 2003-04-29 11:34:40 +00:00
Alasdair Kergon
b8c919b402 o Metadata area struct change.
o Support physical extent restrictions on PV lists for allocations
    e.g. lvcreate -l 200 vg1 /dev/sda1:100-199:300-399
2003-04-24 22:23:24 +00:00
Alasdair Kergon
098102afc0 Stop more gracefully when in test mode. 2003-04-24 22:13:48 +00:00
Alasdair Kergon
75833edb80 indent 2003-04-24 22:00:29 +00:00
Alasdair Kergon
d9e14671aa fix optind after last change to it 2003-04-24 21:59:42 +00:00
Alasdair Kergon
b896caa19b Improve build robustness. 2003-04-15 13:24:42 +00:00
Alasdair Kergon
0e69d32bed Display read-only state. 2003-04-15 12:30:44 +00:00
Alasdair Kergon
abc6d41532 Add major arg 2003-04-04 13:22:58 +00:00
Alasdair Kergon
27f364af95 Allow for specification of major number as well as minor. 2003-04-02 19:14:43 +00:00
Alasdair Kergon
6a149cba6b Reinstate lost vg_write() in lvchange --permission. 2003-04-02 13:01:04 +00:00
Alasdair Kergon
8aa577ad34 Proposed changes to the ioctl interface to fix alignment issues on some
architectures and specify an explicit width for every numeric field.
2003-03-28 18:58:59 +00:00
Alasdair Kergon
1fa74f62e8 Avoid report segfault with non-partial inconsistent VG. 2003-03-24 18:22:48 +00:00
Alasdair Kergon
26e7f2e0c4 Tidy various pre-processing incl. making libdl optional. 2003-03-24 18:08:53 +00:00
Alasdair Kergon
7e4867f743 LV name validation 2003-02-03 20:09:58 +00:00
Alasdair Kergon
a0568eca2b Allow optional verbose logging. 2003-01-21 21:25:51 +00:00
Alasdair Kergon
a421f74371 vgreduce --removemissing to remove missing PVs & deps & make VG consistent 2003-01-17 21:04:26 +00:00
Alasdair Kergon
8ae908a085 Add success message; validate given VG name. 2003-01-17 21:02:04 +00:00
Alasdair Kergon
199e490e7d configure --disable-devmapper if you don't have libdevmapper 2003-01-08 22:44:07 +00:00
Alasdair Kergon
4970ebfb92 o Additional device/filter-level debugging messages + duplicate alias fix
o 32/64-bit size_t fix (pjc)
2003-01-08 16:41:22 +00:00
Alasdair Kergon
f3993cac4a Correct error message for non-snapshot activation failure. 2003-01-06 21:06:43 +00:00
Alasdair Kergon
8ef2b021ed Default stripesize 64k & config file setting for it;
Clear many compiler warnings (i386) & associated bugs - hopefully without
introducing too many new bugs:-)  (Same exercise required for other archs.)
Default compilation has optimisation - or else use ./configure --enable-debug
2002-12-19 23:25:55 +00:00
Alasdair Kergon
4c64ed4ced New column-based reporting tools: lvs, pvs & vgs. 2002-12-12 20:55:49 +00:00
Alasdair Kergon
987c4c1519 Fix long arg processing. 2002-12-05 22:35:15 +00:00
Alasdair Kergon
15b38fa8dd tidy 2002-12-03 13:27:23 +00:00
Alasdair Kergon
aa83fd4ebb Default size unit normally MB not KB. 2002-12-03 13:24:38 +00:00
Alasdair Kergon
00958b5818 Suppress a (normally) unnecessary warning. 2002-12-03 13:23:50 +00:00
Alasdair Kergon
c80325cae4 Further help text tidying & support for -?. 2002-11-29 15:02:57 +00:00
Heinz Mauelshagen
62ef058497 tiny tidying 2002-11-28 15:27:59 +00:00
Heinz Mauelshagen
8b46b545c6 Corrected lvcreate synopsis.
Added --ignorelockingflag to synopsis where missing.
2002-11-28 15:27:29 +00:00
Alasdair Kergon
8c54f03db8 Fix snapshot lvcreate activation check. 2002-11-22 14:19:56 +00:00
Alasdair Kergon
5a52dca9c2 Some new features. 2002-11-18 14:04:08 +00:00
Andres Salomon
50762c2186 agk, I recall you saying you had a massive commit pending; if you need me
to back this out so you can do that commit, let me know.  Also, if there's
an issue with the error message that's displayed, just change it in tools.h.

This causes a "device-mapper driver/module not loaded?" error message to
be displayed for the commands that require dm-mod, if the tools can't get
the driver version.  It's not done for commands that don't require dm-mod.
This should clear up some problems people have had attempting to use lvm2
without rtfm'ing.
2002-10-27 21:04:03 +00:00
Andres Salomon
d43773d634 Wow, learn something new every day. Apparently, the signed-ness of char is
implementation-dependent; some archs (s390, arm, and ppc) default to
an unsigned char.
2002-10-08 20:16:44 +00:00
Alasdair Kergon
faaedea286 Support alternative lvrename syntax. 2002-09-05 12:49:23 +00:00
Joe Thornber
f55f988643 o Remove e2fsadm to stop people waiting expectantly for something that isn't going
to arrive.
2002-08-08 07:54:57 +00:00
Alasdair Kergon
fdf8038fe5 Improved snapshot-related arg validation 2002-07-17 16:04:05 +00:00
Joe Thornber
7cc602c800 i) Add the VISIBLE flag to the text format. (Other changes are pending
for lib/activate.)
2002-07-11 15:28:49 +00:00
Joe Thornber
097d49e73d i) There's now a seperate field in struct logical_volume that stores the
allocation policy.  This can currently take one of three values:

   typedef enum {
        ALLOC_NEXT_FREE,
        ALLOC_STRICT,
        ALLOC_CONTIGUOUS
   } alloc_policy_t;

    Notice that 'SIMPLE' has turned into the slightly more meaningful NEXT_FREE.

ii) Put code into display.[hc] for converting one of these enums to a
    text representation and back again.

ii) Updated the text format so this also has the alloc_policy field.
2002-07-11 14:21:49 +00:00
Alasdair Kergon
407332cb9a tidy 2002-07-11 14:09:26 +00:00
Alasdair Kergon
48ad31920d Add --ignorelockingfailure 2002-07-10 20:43:32 +00:00
Alasdair Kergon
fbbe942c45 Add vgsplit. 2002-05-31 19:30:51 +00:00
Alasdair Kergon
d4e5f63e96 Tidy/fix segment rounding. 2002-05-31 19:29:43 +00:00
Alasdair Kergon
401ae21308 Fix vgcfgrestore segfault (wrong variable used). 2002-05-30 16:03:26 +00:00
Joe Thornber
99b1e8f19f Drop the default chunk size for snapshots down to 8k 2002-05-13 15:14:21 +00:00
Alasdair Kergon
92ad2d555b Import snapshot status & persistence + indent etc. 2002-05-10 15:25:38 +00:00
Joe Thornber
0474ad51c2 i) Put back chunksize_ARG for lvcreate. 2002-05-08 14:36:10 +00:00
Alasdair Kergon
a07e27374d Always call init_log() to initialise logging defaults. 2002-05-08 12:26:45 +00:00
Alasdair Kergon
3fb25e3f0f log/{prefix,command_names} use defaults.h & reset between shell cmds 2002-05-07 13:00:01 +00:00
Patrick Caulfield
f6524657fa Add features to get table/status & wait for next event. 2002-05-03 11:55:58 +00:00
Alasdair Kergon
6b4c9ff740 Some partial VG support with format_text. 2002-04-30 17:12:37 +00:00
AJ Lewis
6e2ff7fb35 o Updated *display output for LVM1 compatibility
o There is still a bit missing
   + all are missing the {PV,VG,LV} # - that is not applicable in LVM2
   + pvdisplay doesn't show how many LVs are contained on it
   + much of the snapshot information isn't available for lvdisplay
 o Look at the code for other potiential FIXMEs  :)
2002-04-29 21:43:14 +00:00
Heinz Mauelshagen
8877446463 Changed DEFAULT_PV and DEFAULT_LV to 256 (has been fixed in LVM1 before) 2002-04-25 10:53:58 +00:00
Alasdair Kergon
25b733809a Merge with text format branch.
Lots of changes/very little testing so far => there'll be bugs!

Use 'vgcreate -M text' to create a volume group with its metadata stored
in text files.  Text format metadata changes should be reasonably atomic,
with a (basic) automatic recovery mechanism if the system crashes while a
change is in progress.

Add a metadata section to lvm.conf to specify multiple directories if
you want (recommended) to keep multiple copies of the metadata (eg on
different filesystems).

e.g. metadata {
        dirs = ["/etc/lvm/metadata1","/usr/local/lvm/metadata2"]
}

Plenty of refinements still in the pipeline.
2002-04-24 18:20:51 +00:00
Patrick Caulfield
f06bdc437d add setlocale() call so that localisation of things like number entry
and display will work correctly.
2002-04-24 10:42:09 +00:00
Joe Thornber
0e06dd31fd o Added support for chunk_size to lvcreate. 2002-04-15 18:49:20 +00:00
Alasdair Kergon
d6a766f138 Missing VG lock when iterating through all LVs. 2002-04-15 16:27:39 +00:00
Joe Thornber
6fa3c2d5ce o Drop the default chunk size for snapshots down to 16k. 2002-04-15 08:41:00 +00:00
Patrick Caulfield
2fab033e9b Implement an external locking interface. 2002-04-08 16:04:50 +00:00
Alasdair Kergon
7bb6856a7e Cope with creation of additional snapshots while active.
(More work on suspension dependencies still needed.)
2002-03-27 18:17:43 +00:00
Alasdair Kergon
8573c6bcac Snapshots are now attached to their origin device for locking purposes
so lock the origin instead of the snapshot itself when creating one.
2002-03-26 15:01:57 +00:00
Alasdair Kergon
4bb3eccf2b New-style persistent minor support. 2002-03-26 13:41:37 +00:00
Alasdair Kergon
9585e50fef Better support for LVs with hyphens in names. 2002-03-19 16:41:44 +00:00
Alasdair Kergon
902098d615 Support device queries by uuid as well as by name. (Used by lvrename.) 2002-03-18 23:39:42 +00:00
Alasdair Kergon
a76ba817a8 Tie all snapshot (de)activation requests to (de)activation of origin device. 2002-03-18 13:09:27 +00:00
Alasdair Kergon
568d7229bf Review locking: block signals instead of ignoring them and restore state
afterwards; avoid race condition with unlink; add LCK_HOLD to process_each_vg.
2002-03-15 16:07:38 +00:00
Alasdair Kergon
c22c93f0b6 Suppress verbose/debug messages from libdevmapper. 2002-03-14 13:39:33 +00:00
Alasdair Kergon
b2de0b7d44 dmsetup display uuid 2002-03-13 16:19:17 +00:00
Alasdair Kergon
ad21a5585c Let dmsetup store the uuid on device creation. 2002-03-11 22:44:36 +00:00
Alasdair Kergon
41967a0276 lv_info replaces lv_active etc. 2002-03-11 19:02:28 +00:00
Alasdair Kergon
be326a2f1b o activate/reactivate merge
o unlocking macro
2002-03-11 15:08:39 +00:00
Alasdair Kergon
e09a7b5787 o dm_destroy_all() called on exit - but doesn't touch suspended devices yet.
o 'dmsetup remove_all' calls dm_destroy_all() to provide a quick way to
  prepare for unloading the module
o Ran through indent again.
2002-03-07 20:56:10 +00:00
Joe Thornber
eea1d6932c o Top level device is now just called <vg>-<lv> (there's no 'top'
layer appended).

o  Got rid of the unused layer->type field and enum.
2002-03-07 15:29:31 +00:00
Alasdair Kergon
9f7b698007 Kernel functionality that returns device dependencies (ejt). 2002-03-06 19:42:23 +00:00
Joe Thornber
1ca81fafd0 o Rename dmsetup dependencies -> dmsetup deps 2002-03-06 14:47:13 +00:00
Joe Thornber
761e0a63e1 o Add support for getting dependencies for a device.
o  dmsetup dependencies <dev>
2002-03-06 14:38:25 +00:00
Alasdair Kergon
15c325f06a o Use new LCK_HOLD flag to indicate whether lock should be held on return
from lock_vol() - otherwise it now attempts to acquire the lock and then
  immediately releases it.
o Extend the id field in struct logical_volume to hold VG uuid + LV uuid
  for format1. This unique lvid can be used directly when calling lock_vol().
o Add the VG uuid to vgcache to make VG uuid lookups possible.  (Another
  step towards using them instead of VG names internally.)
2002-03-05 20:03:09 +00:00
Alasdair Kergon
8478180d9e snapshot/zero logic 2002-03-04 15:25:52 +00:00
Joe Thornber
9db196e6c5 o Break creating a snapshot down into:
i)   create cow
   ii)  activate cow
   iii) zero cow
   iv)  deactivate
   v)   add snapshot info
   vi)  reactivate
2002-03-04 13:46:37 +00:00
Alasdair Kergon
8c013da41f More use of LV locking. 2002-03-01 19:08:11 +00:00
Alasdair Kergon
50270f1fdf Fix unlock parameter. 2002-02-27 14:48:42 +00:00
Alasdair Kergon
f4cbeaf0ac o Lock mechanism for LV activation
o #defines for common lock flag combinations
o Try out hyphens instead of colons in device-mapper names - does this
  make messages containing filenames easier to read?
2002-02-27 12:26:41 +00:00
Heinz Mauelshagen
9c42e035a0 pvresize command 2002-02-25 15:32:58 +00:00
Alasdair Kergon
413cc9189e Begin conversion so LV id is passed to activation unit instead of
struct logical_volume.
2002-02-25 12:56:16 +00:00
Alasdair Kergon
187cf4c97d o Convert lv->id back to lv_number when writing back to disk
o Use first unused lv_number when creating new LV
o Use lv_number for refs to snapshots
o Update persistent minor logic after the lvcreate restructure
o Reset all parameters before use in lvcreate.
2002-02-21 19:04:37 +00:00
Heinz Mauelshagen
257ec146b2 Avoid ambigous volume_group argument in vg_add_snapshot() 2002-02-21 18:31:48 +00:00
Heinz Mauelshagen
dc511e9ecb Removed wrong 'lv->vg' argument from lv_is_cow() call. Is used in lv_is_cow internally. 2002-02-21 14:00:45 +00:00
Joe Thornber
6633e1b863 o misc little fixes. 2002-02-21 10:15:54 +00:00
Alasdair Kergon
cc8b2cd706 Try out using LV locking for reactivation. 2002-02-20 21:30:27 +00:00
Alasdair Kergon
b6afcf6458 Remove VG arg from lv_is_cow() and lv_is_origin() - use lv->vg instead. 2002-02-20 19:04:55 +00:00
Alasdair Kergon
a45f546fe0 o Use 'pvcreate --setphysicalvolumesize' with no short form (instead of -s)
and add severe warning if it's used to make a device seem bigger than
  it really is.  This is not an option people should be using as it
  breaks metadata integrity.
o Use uint64_t throughout (rather than unsigned long long)
o Convert a few messages that contain pathnames into the more common form:
  pathname: message
2002-02-20 18:29:30 +00:00
Joe Thornber
5986ec940f o Removed the -z (suspend) option from the tools
o  New function: int lv_setup_cow_store(struct logical_volume *lv)
   This zeroes the start of the cow device.

o  Made lvcreate call above fn.
2002-02-18 15:52:48 +00:00
Joe Thornber
0eb83127ef o Add support for the -s and -c flags to lvcreate. 2002-02-18 10:59:51 +00:00
Heinz Mauelshagen
e1d93eb457 Second path on "pvcreate -s" 2002-02-15 14:33:59 +00:00
Joe Thornber
052360e901 o split lvcreate into seperate functions for parsing the command line,
and creating the lv.  A lot of changes in here so be on the lookout
   for bugs.
2002-02-15 11:53:22 +00:00
Heinz Mauelshagen
fc18023a9b Forgot to remove test printf :-) 2002-02-15 09:37:23 +00:00
Heinz Mauelshagen
f48d3bcbd0 First cut on "pvcreate -s" 2002-02-15 01:26:16 +00:00
Joe Thornber
0a9f8bcf97 o First pass at format1 snapshot support. 2002-02-13 11:43:29 +00:00
Alasdair Kergon
6fda126dd7 Run through indent - no (intentional) changes to any code. 2002-02-11 21:00:35 +00:00
Alasdair Kergon
60274aba6e Preparation for an LVM2 liblvm - pass cmd_context into each tool and
link some globals that the tools need into that structure.
2002-02-11 20:50:53 +00:00
Alasdair Kergon
7d0e6e800e o Support locking with local lock files
o Disable control-c during updates (except if blocked waiting for a lock)
2002-02-11 15:42:34 +00:00
Joe Thornber
03888774a5 o Added functions to display what's in the archive.
o  For now vgcfgrestore -l <vg> displays this list.

A bit hacky, but it'll get better.
2002-02-11 11:43:17 +00:00
Alasdair Kergon
075ffca52a move defaults.h 2002-02-08 14:28:52 +00:00
Joe Thornber
59d6420b9a o I decided that the archive_format shouldn't really be a format at
all since it only supports vg_write.  It has been replaced with:

int archive_vg(struct volume_group *vg,
	       const char *dir,
	       const char *desc,
	       uint32_t retain_days,
	       uint32_t min_archive);

which is now called directly by tools/archive.c
2002-02-08 11:58:18 +00:00
Joe Thornber
e74999af51 o Add cmd_line field to struct cmd_context
o  Text format now has a description and time field at the top level.

o  archiving and backup set the description appropriately. eg,

   for an archive:

     description = "Created *before* executing 'lvextend test_vg/lvol0 -l +1'."
     creation_time = 1013166332

   for a backup:

     description = "Created *after* executing 'lvextend test_vg/lvol0 -l +1'."
     creation_time = 1013166332

This is preparing the way for a simple vgcfgundo command.
2002-02-08 11:13:47 +00:00
Heinz Mauelshagen
af7bbe5a6c Poor mans lvmdiskscan 2002-02-05 14:31:57 +00:00
Alasdair Kergon
812c699c8d Basic support for persistent minor numbers;
slightly different from the current LVM1 method.

  lvcreate --persistent y  --minor 10   (to specify when created)
  lvchange --persistent n  (to turn off)
  lvchange --persistent y  --minor 11   (to change)

--persistent uses a new LV status flag stored on disk
minor number is stored on disk the same way as LVM1 does
(but major number stored is 0; any LVM1 major/minor setting gets lost)

  lvchange -ay --minor 12 (to activate using minor 12, regardless of the
                           on-disk setting, which doesn't get changed)

--minor == -m
--persistent == -M
2002-02-01 17:54:39 +00:00
Alasdair Kergon
cb0cc2999a Display error when running unimplemented functions. 2002-01-31 20:37:26 +00:00
Alasdair Kergon
257f5ca091 Remove gcc -D to support as different gcc versions handle it differently. 2002-01-31 20:15:26 +00:00
Alasdair Kergon
cabd882ced "exit" means "quit" (lamer) 2002-01-31 20:08:52 +00:00
Alasdair Kergon
d2c3c0505c Remove stray comma. 2002-01-30 17:25:51 +00:00
Alasdair Kergon
12a6fcd3a8 Propagate volume group read-only setting down to its logical volumes.
(Might sometimes be safe to relax this restriction.)
2002-01-30 17:12:14 +00:00
Alasdair Kergon
7ae5a778d5 Basic support for (read-only) partial activation if any PVs are
missing from a VG.  (Linear targets use the device-mapper 'error' target
which returns ioerror; striped targets use '/dev/ioerror' for now - which must
already exist e.g. as a sufficiently large block device version of /dev/zero).
2002-01-30 15:33:12 +00:00
Heinz Mauelshagen
08907484f5 quotes around names in output 2002-01-30 15:04:48 +00:00
Alasdair Kergon
93d6fa7d0d Correct statement order for case when 'stripes' parameter is not supplied. 2002-01-30 12:17:40 +00:00
Alasdair Kergon
2235e241cc add vgimport 2002-01-29 19:23:46 +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
Heinz Mauelshagen
594cc87acf Check that vgname doesn't already exits in dev_dir 2002-01-28 16:30:42 +00:00
Alasdair Kergon
1176eb2597 Tweak some error message levels. 2002-01-27 21:30:47 +00:00
Alasdair Kergon
2fb0db7710 If lv isn't active, skip reactivation. 2002-01-25 22:58:01 +00:00
Alasdair Kergon
265d372f94 Prevent lvextend from adding segments with different stripe characteristics
at the moment because the old LVM format doesn't support this.
2002-01-25 21:14:43 +00:00
Joe Thornber
168b7bf9e2 o extra fid parameter to lv_manip fns 2002-01-24 17:15:24 +00:00
Alasdair Kergon
d518bc39f3 Avoid using VG metadata on PVs that are not in VGs. 2002-01-23 15:50:34 +00:00
Alasdair Kergon
58f323bc80 Silently remove any existing symlink before creating a new one. 2002-01-22 19:58:37 +00:00
Alasdair Kergon
22d79852ea Reviewed interaction with lib/activate now that the interface has settled down. 2002-01-22 19:11:12 +00:00
Alasdair Kergon
7a403967d5 Customisable message output prefix / indentation. 2002-01-22 15:33:40 +00:00
Joe Thornber
6c31864f5f o Fix inverted logic in list_empty test. 2002-01-22 14:16:27 +00:00
Alasdair Kergon
9f6f4d1e09 No need for file output to default to stderr now that log file can be
specified in config file.
2002-01-21 19:05:00 +00:00
Joe Thornber
75e4d06ade o Allow fractional parts for size args. eg, lvcreate -L 34.4M
o  Fix a couple of bugs related to the earlier lv_list change
2002-01-21 17:43:10 +00:00
Joe Thornber
f868d63582 o Similar changes for lv_list. 2002-01-21 16:49:32 +00:00
Joe Thornber
b926605531 o fail if create_pv_list would produce an empty list. 2002-01-21 16:15:25 +00:00
Joe Thornber
cc282870dd o Changed
struct pv_list {
	struct list list;
	struct physical_volume pv;
   };

   to

   struct pv_list {
	struct list list;
	struct physical_volume *pv;
   };


o  New function in toollib 'create_pv_list', which creates a list of pv's
   from a given command line array of pv's.

o  Changed lvcreate/extend to use this (fixes lvextend [pv list] bug).
2002-01-21 16:05:23 +00:00
Joe Thornber
e586401ecb o Changed find_pv_in_vg, and find_lv_in_vg to return a struct pv_list * and
struct lv_list * respectively.
2002-01-21 14:28:12 +00:00
Joe Thornber
7fbaf10a79 o lvdisplay now gives a segment map for the -m option. 2002-01-21 12:05:39 +00:00
Joe Thornber
d29265b97d o removed display_uuid
o use id_write_format from lib/uuid/uuid.h instead
2002-01-21 11:29:06 +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
4af6dc9663 Allow compilation against a device-mapper that was installed into $DESTDIR
Always check for negative (error) return code from lv_active()
2002-01-18 16:43:19 +00:00
Alasdair Kergon
fae0c5764f Support --version argument and 'version' shell command. 2002-01-17 16:39:24 +00:00
Alasdair Kergon
444b7d2360 Add function that returns the library version. 2002-01-17 14:13:25 +00:00
Alasdair Kergon
00ee56e232 Use additional version numbers.
Kernel driver has a version number (stored in kernel/VERSION).
  The first two components of this (0.94) give the version number of the
  ioctl interface.  This number must be changed whenever a change is
  made to the ioctl interface that breaks backwards compatibility.

  The library has a version number (stored in VERSION) which is
  used for linking.
  The first and/or second component of this must be changed whenever
  a change is made to the library API that breaks backwards
  compatibility.
2002-01-17 13:19:55 +00:00
Alasdair Kergon
add7dc2d5a o pvcreate --uuid to specify the uuid (required before using vgcfgrestore
onto a new device).  uuid specified must not already exist on the system.
o More message tidying.
o When checking for label, only read PV metadata.
o Add ataraid.  [Needs moving into config/defaults files.]
2002-01-16 18:10:08 +00:00
Alasdair Kergon
9fea277554 Move test flag from log to global section of config file. 2002-01-16 15:20:51 +00:00
Alasdair Kergon
93ea39697f o Don't update vgcache when (not really) writing in test mode.
o Don't continue iterating through a possibly-deleted list.
2002-01-16 14:43:27 +00:00
Joe Thornber
4103182568 o Add pvmove to the stub file. 2002-01-16 11:27:19 +00:00
Alasdair Kergon
48a00f1320 o More comprehensive config parameter debugging messages.
o Make /proc configurable.
 o Review hard-coded "/dev"s - made 2 more of them configurable.
2002-01-15 23:34:13 +00:00
Alasdair Kergon
288adea256 o missing labeller free
o updated vgcfgrestore args
o change _check_for_open_devices only to check devices present in the hash
  table instead of using dev_iter which triggers a full scan even when only
  displaying command line help
2002-01-15 21:28:04 +00:00
Joe Thornber
d33f2e9f5a o Actually check in vgcfgrestore. 2002-01-15 18:17:57 +00:00
Joe Thornber
f2f2634990 o vgcfgrestore works ! (with the couple of examples I tried). 2002-01-15 17:37:23 +00:00
Alasdair Kergon
6198a4102c Another ioctl interface update:
Supply offset to start of variable data area (so struct size can change
without breaking backward compatibility)
  Add command that just returns the driver version
2002-01-15 15:21:57 +00:00
Alasdair Kergon
1ed34e88aa o Add rename support to dmsetup.
o Add support to use specified minor number to library and dmsetup.
2002-01-11 12:12:46 +00:00
Alasdair Kergon
4a624ca055 o ACTIVE is no longer a status flag - lv_active() used to check if an LV
is active in the device-mapper.
o Many operations can be carried out regardless of whether the VG is
  active or not.
o vgscan does not activate anything - use vgchange.
o Change lvrename to support renaming of active LVs.
o Remove '//' appearing in some pathnames.
o Dummy lv_check_segments() for compilation.
2002-01-10 23:21:07 +00:00
Alasdair Kergon
f8427641b0 Separate constant fields from variable ones. 2002-01-10 16:47:04 +00:00
Alasdair Kergon
b80f32dd0a Clarify terminology:
VG is resizeable  - PVs can be added or removed
  PV is allocatable - free extents on it may be allocated to LVs
2002-01-10 15:09:51 +00:00
Alasdair Kergon
dad43063f8 Allow for multiple spellings / backwards compatibility of renamed
command line options.
      vgchange --resizeable y
      pvchange --allocatable y
But --allocation is still allowed for both (as LVM1) and --resizable is OK.
2002-01-10 14:46:50 +00:00
Joe Thornber
88cc3edf2e o vgcfgrestore. 2002-01-10 14:27:47 +00:00
Alasdair Kergon
952d12a5f5 o Rename many occurrences of 'backup' to 'archive' to reduce confusion.
o Extract file creation/renaming code into a library and change backup code
  to use it too.
o Support umask.
o Bring lvm.conf man page up-to-date.
2002-01-09 19:16:48 +00:00
Joe Thornber
da1224a01c o new function backup_remove(const char *vg_name), to be called from vgremove. 2002-01-09 14:07:49 +00:00
Alasdair Kergon
614a4508e6 Add archiving. 2002-01-09 13:17:14 +00:00
Alasdair Kergon
83912faa1d Another attempt to support both readline versions. 2002-01-08 19:17:08 +00:00
Alasdair Kergon
8deaf0d253 call archive_exit() & backup_exit() on exit 2002-01-08 18:14:04 +00:00
Alasdair Kergon
ae21c2cc8b fixes for compilation 2002-01-07 23:28:25 +00:00
Alasdair Kergon
372a431135 Sync tidy. 2002-01-07 22:49:04 +00:00
Alasdair Kergon
12e8972ba1 If a device somehow became suspended, lvchange -ay now reactivates it. 2002-01-07 22:36:12 +00:00
Joe Thornber
f5549805b6 o tidy up renaming of archive files. 2002-01-07 14:21:33 +00:00
Joe Thornber
197c3f2ab4 o sync tool changes for backup stuff. 2002-01-07 11:12:11 +00:00
Joe Thornber
e59204fc22 o sync laptop to test machine. 2002-01-07 09:05:31 +00:00
Joe Thornber
6e16088e24 o High level archiving and backup functions.
I've split the old autobackup function into two seperate areas:

'archiving' is performed *before* a vg configuration is changed.  This
produces a numbered backup in /etc/lvm/archive.

A 'backup' is performed *after* a vg change.  So the directory /etc/lvm/backup
will hold the  a copy of the current configuration.
2002-01-03 15:46:48 +00:00
Joe Thornber
f17673f1d0 o Added -r, --read-only switch to dmsetup for use with create and reload. 2002-01-03 10:39:21 +00:00
Alasdair Kergon
470933a480 Fix $DESTDIR support 2002-01-02 14:23:10 +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
129c5d50a1 vgcache.h inclusion (avoid compiler warning) 2001-12-31 19:18:44 +00:00
Alasdair Kergon
41b2fd5f4d o Use lvm_snprintf wherever return value is used
o Add parameters to set retention limits for backups
2001-12-31 19:09:51 +00:00
Alasdair Kergon
67e4897b2c Redundant. 2001-12-31 17:26:42 +00:00
Alasdair Kergon
529d473095 o Allow more default values to be overridden from config file.
o Cope with both the readline versions used around here.
2001-12-31 15:20:18 +00:00
Alasdair Kergon
9737eb0f94 Revised ioctl/dmfs merge with fixes for bugs found in tests. 2001-12-20 20:32:14 +00:00
Joe Thornber
2041d905a9 o Added a quick vgcfgbackup, needs parameters as yet. 2001-12-20 16:05:14 +00:00
Joe Thornber
9f44467d44 o sync backup changes 2001-12-20 11:52:54 +00:00
Joe Thornber
af09a138ce o history is now saved in ~/.lvm_history 2001-12-17 17:59:58 +00:00