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

658 Commits

Author SHA1 Message Date
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
Heinz Mauelshagen
af7bbe5a6c Poor mans lvmdiskscan 2002-02-05 14:31:57 +00:00
Alasdair Kergon
df396c4ad8 Another release (includes some fixes from last week; persistent minors,
partial activation etc.)
2002-02-04 13:30:21 +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
Alasdair Kergon
dcde8bf026 Failure signalled by -1 not 0; MAX_DEVICES 256 (was 64); change a '>' to '>='. 2002-02-01 17:39:20 +00:00
Alasdair Kergon
cb0cc2999a Display error when running unimplemented functions. 2002-01-31 20:37:26 +00:00
Alasdair Kergon
257f5ca091 Remove gcc -D to support as different gcc versions handle it differently. 2002-01-31 20:15:26 +00:00
Alasdair Kergon
cabd882ced "exit" means "quit" (lamer) 2002-01-31 20:08:52 +00:00
Joe Thornber
f593440b7b o Remove redundant dbg_free. 2002-01-31 15:28:30 +00:00
Alasdair Kergon
d2c3c0505c Remove stray comma. 2002-01-30 17:25:51 +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
93d6fa7d0d Correct statement order for case when 'stripes' parameter is not supplied. 2002-01-30 12:17:40 +00:00
Alasdair Kergon
2235e241cc add vgimport 2002-01-29 19:23:46 +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
cd7018fd2c Date changed 2002-01-29 15:54:49 +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
Heinz Mauelshagen
594cc87acf Check that vgname doesn't already exits in dev_dir 2002-01-28 16:30:42 +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
154ca4b837 *** empty log message *** 2002-01-27 21:48:05 +00:00
Alasdair Kergon
1176eb2597 Tweak some error message levels. 2002-01-27 21:30:47 +00:00
Alasdair Kergon
2fb0db7710 If lv isn't active, skip reactivation. 2002-01-25 22:58:01 +00:00
Alasdair Kergon
265d372f94 Prevent lvextend from adding segments with different stripe characteristics
at the moment because the old LVM format doesn't support this.
2002-01-25 21:14:43 +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
168b7bf9e2 o extra fid parameter to lv_manip fns 2002-01-24 17:15:24 +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
f552ba4b74 Remove any core files on distclean. 2002-01-24 13:30:40 +00:00
Joe Thornber
aa5c5673be o typo 2002-01-24 09:54:09 +00:00