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

128 Commits

Author SHA1 Message Date
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
8ef6eb30d9 Report dmeventd mirror monitoring status. 2007-01-12 20:38:30 +00:00
Alasdair Kergon
fb12fd445a Prevent permission changes on active mirrors. 2007-01-10 19:56:39 +00:00
Alasdair Kergon
4d2a8d8231 fix last check-in: lv->size is in sectors 2006-11-03 21:07:15 +00:00
Alasdair Kergon
1c3c2df9e9 Fix mirror log LV writing to set all bits in whole LV. 2006-11-02 23:33:20 +00:00
Alasdair Kergon
e51d50a11e try forcesync -> resync 2006-10-24 17:18:25 +00:00
Alasdair Kergon
7dd05dd468 fix forcesync local active detection 2006-10-24 15:30:33 +00:00
Alasdair Kergon
04e023be19 Add lvchange --forcesync. 2006-10-23 23:03:55 +00:00
Alasdair Kergon
a590f3b6a3 Retain activation state after changing LV minor number with --force. 2006-10-13 21:33:31 +00:00
Alasdair Kergon
443a8f76c6 Fix activation logic in lvchange --persistent. 2006-07-10 19:39:14 +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
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
f894b4b1b7 Attempt to load missing targets using modprobe.
Simplify dev_manager_info().
2005-10-17 18:00:02 +00:00
Alasdair Kergon
0fb173aa3a Change LV locking macros to take lv instead of lvid. 2005-08-15 12:00:04 +00:00
Alasdair Kergon
8211a13ce0 Always insert an intermediate layer for mirrors.
Suppress hidden LVs from reports unless --all is given.
Use square brackets for hidden LVs in reports.
Centralise restrictions on LV names.
2005-06-03 14:49:51 +00:00
Alasdair Kergon
60f13f01d2 Basic support for mirrors. 2005-06-01 16:51:55 +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
e9c761b869 Only ask libdevmapper for open_count when we need it. 2005-01-12 22:58:21 +00:00
Alasdair Kergon
b86ef8e2cb Add local activation support. 2004-06-16 17:13:41 +00:00
Alasdair Kergon
36cfd88743 xxchange -ae to activation exclusively 2004-05-24 13:44:10 +00:00
Alasdair Kergon
a0a23eff4b Rename allocation policies; add --alloc to cmdline; LV inherits from VG. 2004-05-18 22:12:53 +00:00
Alasdair Kergon
21cd8adc80 stray space 2004-05-05 18:27:56 +00:00
Alasdair Kergon
cb919290c2 Separate out polldaemon. 2004-05-05 17:56:20 +00:00
Alasdair Kergon
23289e6d14 Revise internal locking semantics. 2004-05-05 12:03:07 +00:00
Alasdair Kergon
6606c3ae81 Update copyright notices. 2004-03-30 19:35:44 +00:00
Alasdair Kergon
a78374ae0d and another typo 2004-03-26 21:49:57 +00:00
Alasdair Kergon
120943341c typo 2004-03-26 21:47:43 +00:00
Alasdair Kergon
71b9fadf65 lvchange --refresh 2004-03-26 21:24:03 +00:00
Alasdair Kergon
cf6dd25126 tagging 2004-03-08 17:19:15 +00:00
Alasdair Kergon
cfb7bfc7d9 More consistent error code usage. 2003-10-21 22:06:07 +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
46a29c0212 Check for locked LVs/pvmoves. 2003-05-06 12:14:36 +00:00
Alasdair Kergon
75833edb80 indent 2003-04-24 22:00:29 +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
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
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
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
48ad31920d Add --ignorelockingfailure 2002-07-10 20:43:32 +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
Alasdair Kergon
d6a766f138 Missing VG lock when iterating through all LVs. 2002-04-15 16:27:39 +00:00
Alasdair Kergon
4bb3eccf2b New-style persistent minor support. 2002-03-26 13:41:37 +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
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
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
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
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
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
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
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
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
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
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
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
Alasdair Kergon
12e8972ba1 If a device somehow became suspended, lvchange -ay now reactivates it. 2002-01-07 22:36:12 +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
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
Joe Thornber
9f44467d44 o sync backup changes 2001-12-20 11:52:54 +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
7f3859bb5c vgdisplay 2001-11-19 15:20:50 +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
277237805a iospace restructured 2001-11-12 15:10:01 +00:00
Alasdair Kergon
0a5e4a1442 o Changes to activation interface
o Add pointer lv->vg
o Some naming tweaks to improve clarity
2001-10-31 17:59:52 +00:00
Joe Thornber
1b9fcf48b1 o LGPL list implementation 2001-10-31 12:47:01 +00:00
Alasdair Kergon
0fc8bab82a lvchange 2001-10-30 14:32:48 +00:00