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

346 Commits

Author SHA1 Message Date
Milan Broz
0b706ac672 Introduce link_lv_to_vg and unlink_lv_from_vg functions.
link_lv_to_vg and unlink_lv_from_vg are the only functions
for adding/removing logical volume from volume group.

Only these function should manipulate with vg->lvs list.
2009-05-13 21:25:01 +00:00
Milan Broz
494b4cec7b Tidy format1 import LV function.
Later patch initializes lv->vg after the LV structure is prepared,
so pass through cmd context and do not use vg->cmd here.
Also move LV id calculation (which uses lv->vg too).

Also properly free memory pool if operation fails.
2009-05-13 21:24:12 +00:00
Milan Broz
d60f341d96 Remove vg->lv_count and use counter function.
This should not cause problems but simplifies code a lot.

(the volumes_count is merged and renamed with lvs_visible
function by following patch.)
2009-05-13 21:22:57 +00:00
Milan Broz
4b13d5a823 Fix snapshot segment import to not use duplicate segments & replace.
The snapshot segment (snapshotX) is created twice
during the text metadata segment processing.

This can cause temporary violation of max_lv count.

Simplify the code, snapshot segment is properly initialized
in init_snapshot_seg function now and do not need to be replaced
by vg_add_snapshot call.

The vg_add_snapshot() is now usefull only for adding new
snapshot and it shares the same initialization function.

The snapshot name is always generated, name paramater can be
removed from function call.
2009-05-13 21:21:58 +00:00
Milan Broz
2f9a9d1a7f Remove snapshot_count from VG and use function instead. 2009-05-12 19:12:09 +00:00
Milan Broz
8e1d5615b4 Introduce memory pool per volume group.
Since now, all code reading volume group is responsible for releasing
the memory allocated by calling vg_release(vg).
(For simplicity of use, vg_releae can be called for vg == NULL,
the same logic like free(NULL)).

Also providing simple macro for unlocking & releasing in one step,
tools usualy uses this approach.

The global memory pool (cmd->mem) should be used only for global
physical volume operations.

This patch have to be applied with all subsequent patches to complete
memory pool per vg logic.

Using separate memory pool has quite bit memory saving impact when
using large VGs, this is mainly needed when we have to use
preallocated and locked memory (and should not overflow from that
memory space).
2009-04-10 09:59:18 +00:00
Milan Broz
7b1c853bd9 Try to avoid full rescan if label scan is enough. 2009-02-25 23:29:06 +00:00
Alasdair Kergon
8929ce6651 Add --dataalignment to pvcreate to specify alignment of data area. (mbroz)
This patch is not fully tested and leaves some related bugs unfixed.

Intended behaviour of the code now:

  pe_start in the lvm2 format PV label header is set only by pvcreate (or
vgconvert -M2) and then preserved in *all* operations thereafter.

  In some specialist cases, after the PV is added to a VG, the pe_start
field in the VG metadata may hold a different value and if so, it
overrides the other one for as long as the PV is in such a VG.

  Currently, the field storing the size of the data area in the PV label
header always holds 0.  As it only has meaning in the context of a
volume group, it is calculated whenever the PV is added to a VG (and can
be derived from extent_size and pe_count in the VG metadata).
2009-02-22 19:00:26 +00:00
Alasdair Kergon
2c44337bd5 Right, a simple build (without options) is working again. 2008-11-03 22:14:30 +00:00
Alasdair Kergon
965566dcf0 Rename a couple of variables that matched function names. 2008-11-03 16:26:27 +00:00
Alasdair Kergon
47d331d3bb revert unexplained removal of a '<backtrace>' message 2008-09-19 07:03:23 +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
Alasdair Kergon
a77f5bf258 Pass struct physical_volume to pe_align. 2008-09-19 04:28:58 +00:00
Alasdair Kergon
91e9ae2629 revert unnecessary 'stack's 2008-09-15 17:06:55 +00:00
Milan Broz
8ed917d287 format1: Not detecing label on disc is not error, remove <backtrace> from debug log
(happens when you explicitly use -M 1)
2008-08-28 13:41:46 +00:00
Alasdair Kergon
a93ae114b8 Fix metadata corruption writing lvm1-formatted metadata with snapshots. 2008-04-22 11:47:22 +00:00
Dave Wysochanski
985ca02b6a Add vg_is_clustered() helper function.
Should be no functional change.
2008-04-10 17:09:32 +00:00
Alasdair Kergon
7284f3f966 preparation for vg cache 2008-03-17 16:51:31 +00:00
Alasdair Kergon
bb097a97ea split orphan VG by format type 2008-02-06 15:47:28 +00:00
Alasdair Kergon
67cdbd7e4d Some whitespace tidy-ups. 2008-01-30 14:00:02 +00:00
Alasdair Kergon
c51b9fff19 Use stack return macros throughout. 2008-01-30 13:19:47 +00:00
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