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

325 Commits

Author SHA1 Message Date
Alasdair Kergon
72baf0c345 Maintain lists of stacked LV segments using each LV. 2008-01-16 19:00:59 +00:00
Alasdair Kergon
b4068515e8 Enhance the management of readahead settings. 2007-11-09 16:51:54 +00:00
Alasdair Kergon
fd4ff5d201 Show 'not usable' space when PV is too large for device in pvdisplay.
Ignore and fix up any excessive device size found in metadata.
2007-11-05 01:47:49 +00:00
Alasdair Kergon
d38bf3616c Fix orphan-related locking in pvdisplay and pvs.
Fix missing VG unlocks in some pvchange error paths.
Add some missing validation of VG names.
Rename validate_vg_name() to validate_new_vg_name().
Change orphan lock to VG_ORPHANS.
Change format1 to use ORPHAN as orphan VG name.
2007-11-02 20:40:05 +00:00
Bryn M. Reeves
8b98c12815 Add is_orphan_vg() and change all hardcoded checks to use it. 2007-11-02 13:06:42 +00:00
Dave Wysochanski
1b8de4cb25 Add pv_dev_name() to access PV device name.
Patch by Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
2007-10-12 14:29:32 +00:00
Dave Wysochanski
8fd14f09e2 Non-functional change - refactor vg_add_snapshot fid parameter. 2007-10-11 18:51:21 +00:00
Jim Meyering
7f8f8bfa09 Correct typo in comments: s/is part of the LVM2/is part of LVM2/.
Signed-off-by: Jim Meyering <jim@meyering.net>


Author: Jim Meyering <jim@meyering.net>
2007-09-21 10:16:45 +00:00
Alasdair Kergon
21bc366486 Clean up numerous compiler warnings that crept in recently.
Remove several unused parameters from _allocate().
2007-08-22 14:38:18 +00:00
Alasdair Kergon
be6845999b Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1. 2007-08-20 20:55:30 +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
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
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
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
0550c1b618 Move lvm_snprintf into libdevmapper. 2006-08-21 12:54:53 +00:00
Alasdair Kergon
ee37789be0 Separate out LVM1_PE_ALIGN. 2006-08-17 19:15:27 +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
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
2c7fbadeef more coverity fixes 2006-05-10 17:49:25 +00:00
Alasdair Kergon
eba586f053 Fix uuid_from_num() buffer overrun. 2006-05-10 16:42:03 +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
b810c54700 sign fix 2006-05-04 09:33:42 +00:00
Alasdair Kergon
8a2fc58645 Check for libsepol.
Add some cflow & scope support.
Separate out DEFS from CFLAGS.
Remove inlines and use unique function names.
2006-04-19 15:33:07 +00:00
Alasdair Kergon
a5fe5a7cdd Fix vgexport/vgimport to set/reset PV exported flag so pv_attr is correct.
Add vgid to struct physical_volume and pass with vg_name to some functions.
2006-04-12 21:23:04 +00:00
Alasdair Kergon
e8db70239e If two or more VGs are found with the same name, use one that is not exported. 2006-04-12 17:54:11 +00:00
Alasdair Kergon
f084e627cc When scanning, also record whether or not VG is exported. 2006-04-11 17:42:15 +00:00
Alasdair Kergon
a14aa9d8c3 Capture vgid in more places. 2006-04-10 22:09:00 +00:00
Alasdair Kergon
cad9fac9c6 Add details to format1 'Invalid LV in extent map' error message. 2005-12-19 16:28:35 +00:00
Alasdair Kergon
2262b32057 Use hash, bitset, malloc, pool from libdevmapper. 2005-10-16 23:03:59 +00:00
Alasdair Kergon
fd0eec20b7 Add format1 dev_write debug messages. 2005-08-16 19:00:55 +00:00
Alasdair Kergon
4f8781051a Fix lvm1 format metadata read. 2005-06-22 15:31:29 +00:00
Alasdair Kergon
5e947dac48 Various allocation-related pvmove fixes. 2005-06-14 17:54:48 +00:00
Alasdair Kergon
60f13f01d2 Basic support for mirrors. 2005-06-01 16:51:55 +00:00
Alasdair Kergon
7f2def9e6d Remove lists of free PV segments.
Simplify pv_maps code and remove slow bitset algorithm.
2005-05-11 15:02:49 +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
22c1a65f74 extend alloc_lv_segment 2005-04-22 15:44:00 +00:00
Alasdair Kergon
e40d124e14 set_lv_segment_area_pv/lv 2005-04-22 15:43:02 +00:00
Alasdair Kergon
c54a940540 Initial pv_segment code. 2005-04-19 20:58:25 +00:00
Alasdair Kergon
072893aabd Internal snapshot code restructuring. 2005-04-07 12:39:44 +00:00
Alasdair Kergon
69b2cc0ee0 Remove unused internal non-persistent snapshot option. 2005-04-07 12:27:57 +00:00
Alasdair Kergon
b9565b406a Cope with new devices appearing by rescanning /dev if a uuid can't be found. 2005-03-08 13:46:17 +00:00
Alasdair Kergon
c45a8a2c1c Store snapshot and origin sizes separately. 2005-01-19 17:19:39 +00:00
Alasdair Kergon
bd46a496c7 pool debugging 2004-11-23 18:23:23 +00:00
Alasdair Kergon
c4ddb31abf Rename old segtypes files to segtype. 2004-09-16 18:40:56 +00:00
Alasdair Kergon
19d1e7102c Write log message when each segtype/format gets initialised. 2004-09-14 17:37:51 +00:00
Alasdair Kergon
68eb9e3b1f Test for incompatible format/segtype combinations in lv_extend. 2004-09-14 13:56:18 +00:00
Alasdair Kergon
cab8ea7c62 Cluster-extension-only installation. 2004-08-18 18:57:40 +00:00
Alasdair Kergon
b7d0982ae7 tidy relative paths in makefile includes 2004-06-15 17:25:07 +00:00
Alasdair Kergon
30bab85be1 Fix rounding of large displayed sizes. 2004-06-07 15:22:43 +00:00
Alasdair Kergon
bfa258b3e7 Set area_count within alloc_lv_segment 2004-05-24 17:30:00 +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
6925cbe624 A quick sanity check on vg_disk struct when read in. More checks needed. 2004-05-11 17:18:42 +00:00
Alasdair Kergon
4922197a33 Begin to separate out segment types. 2004-05-04 21:25:57 +00:00
Alasdair Kergon
6ec6994107 Compress any (obsolete) long LVM1 pvids encountered. 2004-05-04 18:38:11 +00:00
Alasdair Kergon
a38df97fb8 config option to avoid using install -o -g 2004-04-19 13:10:06 +00:00
Alasdair Kergon
d68a82ecbd Fix shared format1 build. 2004-04-05 16:29:37 +00:00
Alasdair Kergon
6606c3ae81 Update copyright notices. 2004-03-30 19:35:44 +00:00
Alasdair Kergon
4291ce3cac makefile spacing 2004-03-26 20:03:58 +00:00
Alasdair Kergon
79982c59a0 .export.sym generation 2004-03-26 14:51:23 +00:00
Alasdair Kergon
a0313876e7 move hostname into global 2004-03-08 17:25:59 +00:00
Alasdair Kergon
cf6dd25126 tagging 2004-03-08 17:19:15 +00:00
Alasdair Kergon
cc8f6e3dbc If PV/VG uuids are missing, generate them from the pv/vg numbers.
[This situation could occur if the uuids were oritinally created by
LVM1 on a system without /dev/urandom.]
2004-01-09 19:18:20 +00:00
Alasdair Kergon
397b239bdf Log full details when "VG data differs between PVs" error message occurs. 2004-01-02 14:04:44 +00:00
Alasdair Kergon
50b39413ac Relax restriction on pe_start location when re-writing LVM1 metadata. 2003-12-09 17:51:39 +00:00
Alasdair Kergon
12bb377f9b Default to unlimited number of LVs/PVs in lvm2 format. 2003-11-06 20:33:34 +00:00
Alasdair Kergon
6078f63801 Prevent PV allocation bit getting changed for format_text orphans. 2003-11-06 20:15:13 +00:00
Alasdair Kergon
fee16e1049 Cope better with LVM1 minor numbers & LV numbers. 2003-11-06 16:58:38 +00:00
Alasdair Kergon
207aa8a131 Fix exported format1 VG recognition. 2003-10-21 22:21:41 +00:00
Alasdair Kergon
aa37899857 Extract some common functions. 2003-09-17 20:35:57 +00:00
Alasdair Kergon
4c22730b53 Some tidyups and minor fixes. 2003-08-20 15:48:27 +00:00
Alasdair Kergon
10f57523d9 Fix vgimport fix to work outside debug mode. 2003-07-15 01:26:24 +00:00
Alasdair Kergon
eaabdc26ce Fix detection of exported LVM1 volume groups. 2003-07-13 11:07:25 +00:00
Alasdair Kergon
914c97239f Another sync point - numerous fixes & clean ups. 2003-07-04 22:34:56 +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
b896caa19b Improve build robustness. 2003-04-15 13:24:42 +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
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
a14e14efdd Keep some ld versions happy. 2002-12-05 22:27:43 +00:00
Alasdair Kergon
c3aa104a8d Missing sector->k conversion in "logical volumes cannot be larger than" mesg. 2002-11-18 16:08:45 +00:00
Alasdair Kergon
d1d9800ef1 Refactoring. 2002-11-18 14:01:16 +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
0dbd22124b Merge adjacent "Missing" segments. 2002-07-10 13:54:17 +00:00
Alasdair Kergon
5f05971a84 Fix LVM1 backwards compatibility issue when LV with a low LV number is deleted. 2002-05-23 11:37:51 +00:00
Alasdair Kergon
6b4c9ff740 Some partial VG support with format_text. 2002-04-30 17:12:37 +00:00
Alasdair Kergon
e1f93d52e3 get_vgs must check for text format VGs when no lvm1 format VGs present 2002-04-30 12:27:13 +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
ab053ad6c1 Fix lv_setup() not to generate a new lvid each time if asked to setup the
same LV more than once - subsequent times validate only.
2002-04-05 14:32:22 +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
841da63e77 o Format1 wasn't recording the snapshot chunk size properly
o  Activation of snapshots now works - though the resulting device
   doesn't (pjc ?)

o  text format wasn't setting vg->cmd.
2002-02-26 16:48:52 +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
Alasdair Kergon
b5ed53273a Generate LV uuid from lv_number when reading in LVs. 2002-02-21 15:26:44 +00:00
Joe Thornber
e680d3190f o typo 2002-02-21 10:17:01 +00:00
Alasdair Kergon
bf1b684e2e lvd->lv_access & LV_SNAPSHOT not lvd->lv_status 2002-02-20 21:24:45 +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
d7783cc8b8 o small bug in the format1 export code for snapshots.
o  tidied newlines in the snapshot section of format text.
2002-02-18 11:25:43 +00:00
Heinz Mauelshagen
e1d93eb457 Second path on "pvcreate -s" 2002-02-15 14:33:59 +00:00
Heinz Mauelshagen
f48d3bcbd0 First cut on "pvcreate -s" 2002-02-15 01:26:16 +00:00
Heinz Mauelshagen
69019d6e9e test printf removed 2002-02-13 21:30:51 +00:00
Heinz Mauelshagen
df89b641bb LV maximum size limit of 2TB ensured in _lv_setup() 2002-02-13 21:28:56 +00:00
Joe Thornber
0a9f8bcf97 o First pass at format1 snapshot support. 2002-02-13 11:43:29 +00:00
Joe Thornber
7d68b08028 o First changes to add snapshot support.
I'm taking a different route from LVM1 here in that snapshots are a
seperate entity from the logical volumes, I think of them as an
application of an LV (or two lvs rather).  As such there is a list of
snapshots held against the vg, and there is *not* a SNAPSHOT, or
SHAPSHOT_ORG flag in lv->status.
2002-02-12 16:31:31 +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
Joe Thornber
f593440b7b o Remove redundant dbg_free. 2002-01-31 15:28:30 +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
Alasdair Kergon
851866d2fc Allocate fixed space for vg->system_id when vg is created, instead of
dynamically.
2002-01-30 12:47:29 +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
f7ff4d005f Zero gap after PV structure on write to disk in order to make non LVM tools happier (AED's idea and patch for LVM1) 2002-01-29 15:52:11 +00:00
Heinz Mauelshagen
6db767961b fixed div bug in calculation of end in calculate_extent_count 2002-01-29 15:43:04 +00:00
Alasdair Kergon
1176eb2597 Tweak some error message levels. 2002-01-27 21:30:47 +00:00
Alasdair Kergon
db454fc8dc The latest attempt at making extended striped LVs work portably with LVM1. 2002-01-25 20:24:14 +00:00
Joe Thornber
d8fb03c714 o Tidy 2002-01-25 13:41:13 +00:00
Alasdair Kergon
3d2d379ce4 Have a pe_total check using theoretically big number instead of the
unnecessarily small limit LVM1 imposes in vgcreate (but not vgextend)
2002-01-24 23:35:56 +00:00
Heinz Mauelshagen
ff783e52c9 removed ~64limit for PEs per PV agk introduced 2002-01-24 19:20:35 +00:00
Joe Thornber
58c18efc07 o Limit for number of extents should be 65534. 2002-01-24 17:32:56 +00:00
Alasdair Kergon
0d89ea9918 Impose max PE limit for each PV. 2002-01-24 17:24:32 +00:00
Joe Thornber
2fe9b1387b o Add check for > 65k extents in a single lv. 2002-01-24 17:16:36 +00:00
Joe Thornber
9b88d8b78d o Remove pointless calculation. 2002-01-24 14:15:42 +00:00
Alasdair Kergon
ba76e378e9 Ignore all except one PV found with the same UUID. Use one which
has the md major number if there is such.
2002-01-24 13:36:33 +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
Patrick Caulfield
94722ba71f Fixx OB1 error in max LV and max PV numbers 2002-01-21 14:53:47 +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
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
Alasdair Kergon
3c06874035 Remove a duplicate disk read (can_handle). 2002-01-16 13:09:26 +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
f2f2634990 o vgcfgrestore works ! (with the couple of examples I tried). 2002-01-15 17:37:23 +00:00
Joe Thornber
6036e5e0f7 o split the uuid -> device map out from vgcache
o  roll vgcache back to agk's implementation, we'll revisit this as part
   of the cluster integration.

o  change the extra_info field in a label to be a void *
2002-01-15 10:24:48 +00:00
Joe Thornber
9056f65b0c o LVM1 labeller. 2002-01-14 10:00:56 +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
Joe Thornber
c6cc24ea3f o _read_id function for import.c 2002-01-10 18:12:26 +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
839f595181 Handle orphan PVs too, so hints remain valid after vgreduce. 2001-12-13 15:08:58 +00:00
Alasdair Kergon
faa556e759 Add internal cache holding a 'hint' list of the PVs belonging to each VG.
A substantial speed-up - particularly in readline mode.
If the hints turn out to be wrong, the relevant parts get thrown away.
vgscan destroys it totally.  In both cases it then rebuilds itself as
required.
2001-12-13 00:07:29 +00:00
Alasdair Kergon
b74c8033a2 Fixes for allocation of striped volumes. 2001-12-07 21:17:12 +00:00
Joe Thornber
74af29faae o I was reading striped volumes incorrectly. 2001-11-29 14:13:43 +00:00
Alasdair Kergon
579944d327 o Tool support for segments.
o vgmerge working.
2001-11-28 13:45:50 +00:00
Alasdair Kergon
b9adad95c8 Fix a memory smash. 2001-11-27 23:12:06 +00:00
Joe Thornber
5875c0fce5 o extra error checking 2001-11-27 20:03:45 +00:00
Joe Thornber
adbc44560b o Get format1 building. 2001-11-27 17:29:56 +00:00
Joe Thornber
0bab65915d o Sync up todays work on converting to the segmented representation of
logical volumes.  It includes:

   format1 changes.

   metadata.h changes.

   lv_manip.c changed (striped allocation still not done though).

   activate.c changes.

Nothing has been near a compiler as yet.

Alasdair can you look at changing display.c to use to output the mappings
in a more segment oriented format please ?

I haven't put the span list into struct physical_volume to represent allocated
extents.  I think the burden of maintaining it for things like lv_extend may
out weigh it's uses.
2001-11-27 16:37:33 +00:00
Alasdair Kergon
5238b63f1a Miscellaneous tidying 2001-11-14 13:52:38 +00:00
Joe Thornber
29aa6d5850 o Added dev_open and dev_close functions
o  Changed disk-rep to use these

o  if NDEBUG is not defined the dev_cache will check for open devices on
   teardown.

I was hoping this would speed things up.  But I'm still getting:

reti:/home/joe/sistina/LVM2/tools# time ./lvm vgchange -a n
  Volume group vg0 successfully changed

real    0m5.751s
user    0m0.060s
sys     0m0.070s

even though I have only 1 device with the vg on it passing the filters.
2001-11-14 10:01:52 +00:00
Joe Thornber
78fc479a69 o Deal with sparse lv arrays (on disk)
o  new fn. dev_zero which zero's an area of a device
2001-11-13 18:52:52 +00:00