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

366 Commits

Author SHA1 Message Date
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
d1ad45cc41 Locking prototypes. 2002-02-08 14:30:37 +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
Alasdair Kergon
d6750e9d76 lv->minor >= 0 (ejt) 2002-02-04 13:08:31 +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
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
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
Alasdair Kergon
14936c751e Display 'exported' status. 2002-01-29 16:30:18 +00:00
Alasdair Kergon
2f069a65d0 Add list_iterate that's safe with deletions. 2002-01-29 16:28:52 +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
Joe Thornber
4b2ec1929a o There were some alignment problems with pool-debug which I've resolved
by allocating the data block with an additional dbg_malloc.

o  Added an assertion to check that no one is requesting alternate
   alignment for memory allocated from pool.  I can't see us needing this
   for LVM2.
2002-01-28 09:16:09 +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
Alasdair Kergon
77712b1ecb Set pv->pe_size when reading in text-file backup.
Otherwise LVM1 decides the PV structure is corrupt.
But do we need to keep both pv->pe_size and vg->extent_size
in internal metadata or can we generate pvd->pe_size when writing out
a PV that belongs to a VG?
2002-01-25 20:21:13 +00:00
Alasdair Kergon
b5e9efd3db Only remove symbolic links when deactivating.
(if this code didn't create it, don't delete it)
2002-01-25 20:17:44 +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
Alasdair Kergon
c50c2886f7 Don't bother to write out an empty cache. 2002-01-24 23:17:16 +00:00
Alasdair Kergon
b849de1d18 Fix the device cache to cope reasonably safely with device name changes.
This should be a rare occurrence so the aim is to recover if it's
straightforward to do so, otherwise just to abort the operation.
If people *knowingly* change device names, they should always run vgscan
afterwards.

A few bytes of memory gets leaked inside a pool each time an alias
has to be discarded - it's not worth restructuring the code to reuse it.

More of LVM2 needs updating to pass device objects (or uuids) about
instead of pathnames so that resolution of pathname->object only happens
once per operation.

dev_cache_get() should now always return the *current* device at the path given

dev_name_confirmed() replaces dev_name() whenever it's important to
know that name for the device is still current (ie when opening it).
If the cache doesn't know a current name, the function fails.

dev_open() guarantees that the file descriptor returned is for the dev_t
of the device structure it was passed.
2002-01-24 23:16:19 +00:00
Alasdair Kergon
7743c8685e Clear a FIXME about checking for identical devices by comparing dev_t
instead of name.
2002-01-24 22:37:24 +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
b2207a1c40 Improve allocation error messages when PVs in a VG have the allocatable
flag unset.
2002-01-24 17:26:00 +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
0cf2445bb7 o Add extra parameter to lv_manip fns 2002-01-24 17:15:49 +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
333658d5f8 Fix dev_close arg. 2002-01-24 13:31:18 +00:00
Alasdair Kergon
610c25e8b1 o Remove redundant symlink-handling code.
o When opening device, return error if its cached name is incorrect (eg if
  it's changed since the cache was generated).  This prevents use until
  the cache is rebuilt (eg with vgscan).  Doesn't catch every case.
2002-01-23 18:55:01 +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
7a403967d5 Customisable message output prefix / indentation. 2002-01-22 15:33:40 +00:00
Alasdair Kergon
c490c2f281 Insert a missing hash_remove. 2002-01-21 19:04:13 +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
4d67a0787f o Typo in comment 2002-01-21 16:10:36 +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
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
752e80cd5a o names.[hc] 2002-01-21 13:11:03 +00:00