1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-25 01:34:38 +03:00
Commit Graph

675 Commits

Author SHA1 Message Date
Joe Thornber
77e3b460aa o First pass at format1 snapshot support. 2002-02-13 11:43:29 +00:00
Joe Thornber
b5321001f8 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
Patrick Caulfield
38eba9f5ea use portable <inttypes.h> macros for printing. 2002-02-12 14:12:13 +00:00
Joe Thornber
ea6f399454 o Turn the device_create_* functions into device_populate_*, they only
fill in an already created dm_task.  This allows common code, such
  as minor number selection, and read_only to be lifted.
2002-02-12 11:15:45 +00:00
Alasdair Kergon
f8bf2d7b7d Run through indent - no (intentional) changes to any code. 2002-02-11 21:00:35 +00:00
Alasdair Kergon
c4856caebb 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
fc1030bb22 Now that most of the usage of 'stack' only occurs when there's an error,
don't suppress it from the screen output any longer.
2002-02-11 18:25:18 +00:00
Alasdair Kergon
9eb6cad8dc dbg_free(tc->desc) 2002-02-11 18:21:54 +00:00
Alasdair Kergon
0fa2a78dce Document return codes. 2002-02-11 17:42:02 +00:00
Joe Thornber
a56fa1558b o Split activate.c into a high level (remaining in activate.c) and low level (ll-activate.[hc]) API.
o  Creation of a device from an lv now lives in activate-lv.c
2002-02-11 15:48:34 +00:00
Alasdair Kergon
261c73a997 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
929c1333ca o Little recipe for testing LVM2 with loopback devices. 2002-02-11 12:01:59 +00:00
Joe Thornber
286a79d94d 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
8b951f99da Locking prototypes. 2002-02-08 14:30:37 +00:00
Alasdair Kergon
abb449bca0 move defaults.h 2002-02-08 14:28:52 +00:00
Alasdair Kergon
bd084028d1 Move defaults.h 2002-02-08 14:28:14 +00:00
Joe Thornber
138a27570b 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
c2ed40a74f 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
a7e7a00cab Poor mans lvmdiskscan 2002-02-05 14:31:57 +00:00
Alasdair Kergon
64a31ab3cd Another release (includes some fixes from last week; persistent minors,
partial activation etc.)
2002-02-04 13:30:21 +00:00
Alasdair Kergon
71958bc0f1 lv->minor >= 0 (ejt) 2002-02-04 13:08:31 +00:00
Alasdair Kergon
366ec35612 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
3738f6e8ae Failure signalled by -1 not 0; MAX_DEVICES 256 (was 64); change a '>' to '>='. 2002-02-01 17:39:20 +00:00
Alasdair Kergon
051a8e2af1 Display error when running unimplemented functions. 2002-01-31 20:37:26 +00:00
Alasdair Kergon
2f43f28d5e Remove gcc -D to support as different gcc versions handle it differently. 2002-01-31 20:15:26 +00:00
Alasdair Kergon
b64769754b "exit" means "quit" (lamer) 2002-01-31 20:08:52 +00:00
Joe Thornber
a97daa18d1 o Remove redundant dbg_free. 2002-01-31 15:28:30 +00:00
Alasdair Kergon
b6556dce8b Remove stray comma. 2002-01-30 17:25:51 +00:00
Alasdair Kergon
aa8d8bc8b5 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
0800dcfdc4 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
12b0101e94 quotes around names in output 2002-01-30 15:04:48 +00:00
Alasdair Kergon
021b391a02 Allocate fixed space for vg->system_id when vg is created, instead of
dynamically.
2002-01-30 12:47:29 +00:00
Alasdair Kergon
d11e2b6057 Correct statement order for case when 'stripes' parameter is not supplied. 2002-01-30 12:17:40 +00:00
Alasdair Kergon
264d90e7e5 add vgimport 2002-01-29 19:23:46 +00:00
Alasdair Kergon
f9f3da9e78 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
6435b49153 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
f9aa2941cf Display 'exported' status. 2002-01-29 16:30:18 +00:00
Alasdair Kergon
5a933d4bee Add list_iterate that's safe with deletions. 2002-01-29 16:28:52 +00:00
Heinz Mauelshagen
5536aea0df Date changed 2002-01-29 15:54:49 +00:00
Heinz Mauelshagen
976666d216 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
9a5bcd4392 fixed div bug in calculation of end in calculate_extent_count 2002-01-29 15:43:04 +00:00
Heinz Mauelshagen
812060a118 Check that vgname doesn't already exits in dev_dir 2002-01-28 16:30:42 +00:00
Joe Thornber
089b5052e6 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
874e5d72f4 *** empty log message *** 2002-01-27 21:48:05 +00:00
Alasdair Kergon
6b11de1329 Tweak some error message levels. 2002-01-27 21:30:47 +00:00
Alasdair Kergon
2245a7ad8d If lv isn't active, skip reactivation. 2002-01-25 22:58:01 +00:00
Alasdair Kergon
ee5ec1b870 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
74ccfe851b The latest attempt at making extended striped LVs work portably with LVM1. 2002-01-25 20:24:14 +00:00
Alasdair Kergon
e1c24bd5a2 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
1349b79728 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