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

421 Commits

Author SHA1 Message Date
Alasdair Kergon
b2a849142b Fix read-only snapshot creation. 2003-09-16 16:08:05 +00:00
Alasdair Kergon
fdd4f3c005 Ensure more args aren't negative. 2003-09-15 15:04:39 +00:00
Alasdair Kergon
8387b47352 Generalise 'invalid chars' error mesg to just say 'invalid' 2003-09-15 15:01:00 +00:00
Alasdair Kergon
914c97239f Another sync point - numerous fixes & clean ups. 2003-07-04 22:34:56 +00:00
Alasdair Kergon
6e03b44cc8 Don't process locked LVs 2003-05-06 12:10:18 +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
27f364af95 Allow for specification of major number as well as minor. 2003-04-02 19:14:43 +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
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
15b38fa8dd tidy 2002-12-03 13:27:23 +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
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
Joe Thornber
99b1e8f19f Drop the default chunk size for snapshots down to 8k 2002-05-13 15:14:21 +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
Joe Thornber
0e06dd31fd o Added support for chunk_size to lvcreate. 2002-04-15 18:49:20 +00:00
Joe Thornber
6fa3c2d5ce o Drop the default chunk size for snapshots down to 16k. 2002-04-15 08:41:00 +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
be326a2f1b o activate/reactivate merge
o unlocking macro
2002-03-11 15:08:39 +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
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
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
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
Joe Thornber
6633e1b863 o misc little fixes. 2002-02-21 10:15:54 +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
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
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
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
Heinz Mauelshagen
08907484f5 quotes around names in output 2002-01-30 15:04:48 +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
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
Joe Thornber
f868d63582 o Similar changes for lv_list. 2002-01-21 16:49:32 +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
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
614a4508e6 Add archiving. 2002-01-09 13:17:14 +00:00
Joe Thornber
197c3f2ab4 o sync tool changes for backup stuff. 2002-01-07 11:12:11 +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
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
b74c8033a2 Fixes for allocation of striped volumes. 2001-12-07 21:17:12 +00:00
Alasdair Kergon
7a61472a0a More striping support & fixes. 2001-12-03 16:27:16 +00:00
Alasdair Kergon
3080a75445 o activation & active status tests
o lvdisplay fields from kernel
o update lv->size on resize
2001-11-21 19:32:35 +00:00
Alasdair Kergon
fe827798fa Zero first 4k of new LVs. 2001-11-16 15:38:52 +00:00
Alasdair Kergon
9b7742bb36 More LV-related tidying. lvdisplay without args now shows all LVs. 2001-11-14 18:38:07 +00:00
Alasdair Kergon
6e74833c6c Avoid generating duplicate lv names 2001-11-14 14:12:01 +00:00
Alasdair Kergon
5238b63f1a Miscellaneous tidying 2001-11-14 13:52:38 +00:00
Joe Thornber
e55ae5d32e o lvcreate no longer needs the explicit -n flag
o  disabled zeroing of lv until bug's worked out
2001-11-14 12:07:37 +00:00
Alasdair Kergon
e68b5e3029 o lvdisplay now shows LE / PV map
o fix LE allocation when first PV is full
o reduce VG free_count when removing PVs from VG
2001-11-13 17:53:06 +00:00
Joe Thornber
d53f88d7af o Stuff 2001-11-12 19:28:50 +00:00
Alasdair Kergon
277237805a iospace restructured 2001-11-12 15:10:01 +00:00
Alasdair Kergon
7858f6fb16 o Added lvextend
o Full signed arguments to lvreduce/lvextend
o Consistent lv_number/pe map use
o Populate pv->pe_allocated
o Fixes for allocation/writing of multiple LVs
2001-11-09 22:01:04 +00:00
Alasdair Kergon
4f7a219dac o Always set LVM_READ.
o Avoid duplicate deallocation.
2001-11-07 22:47:43 +00:00
Joe Thornber
2ba80b436f o Added lvs_in_vgs_opened 2001-11-07 15:02:07 +00:00
Heinz Mauelshagen
4429597ece Added GPL disclaimer 2001-11-07 08:50:07 +00:00
Alasdair Kergon
642c2e964b lvcreate 2001-11-06 19:02:26 +00:00