1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-26 03:22:12 +03:00
Commit Graph

141 Commits

Author SHA1 Message Date
Alasdair Kergon
69098210be Always insert an intermediate layer for mirrors.
Suppress hidden LVs from reports unless --all is given.
Use square brackets for hidden LVs in reports.
Centralise restrictions on LV names.
2005-06-03 14:49:51 +00:00
Alasdair Kergon
99df4f892d Basic support for mirrors. 2005-06-01 16:51:55 +00:00
Alasdair Kergon
369549d23f Only ask libdevmapper for open_count when we need it. 2005-01-12 22:58:21 +00:00
Alasdair Kergon
a3823f818e update comment 2004-05-11 18:18:14 +00:00
Alasdair Kergon
ec53c365a2 Only include visible LVs in active/open counts. 2004-05-11 17:09:09 +00:00
Alasdair Kergon
fc5c61cc8b Begin to separate out segment types. 2004-05-04 21:25:57 +00:00
Alasdair Kergon
c3941941ce Support tagged config files. 2004-05-04 18:28:15 +00:00
Alasdair Kergon
5e8f2e2c04 Fix lvs_in_vg_opened counting. 2004-04-14 17:33:04 +00:00
Alasdair Kergon
32667ca256 Option for auto-fallback to LVM1 tools if running 2.4 without device-mapper. 2004-04-08 15:23:23 +00:00
Alasdair Kergon
66ed5f82c4 Update copyright notices. 2004-03-30 19:35:44 +00:00
Alasdair Kergon
4f9f7eb6a6 Fix vgmknodes to remove dud /dev/mapper entries 2004-03-30 14:40:03 +00:00
Alasdair Kergon
f910c4a8e7 Rename dev_manager_mknodes -> dev_manager_lv_mknodes etc. 2004-03-30 14:38:57 +00:00
Alasdair Kergon
54a1abb284 Add list_versions to library 2004-03-26 19:52:09 +00:00
Alasdair Kergon
97b492a8e2 Ignore open hidden LVs when checking if deactivation is OK. 2004-03-26 19:13:39 +00:00
Alasdair Kergon
0873bd14a9 Suppress move percentage when inactive 2004-03-26 19:10:48 +00:00
Alasdair Kergon
44a1ac0cf3 lv_info_by_lvid 2004-03-26 15:35:01 +00:00
Alasdair Kergon
2ffe378d3f Only print warning message once when compiled without libdevmapper. 2004-03-19 16:26:46 +00:00
Alasdair Kergon
80de983023 additional activation functions 2004-03-08 18:54:13 +00:00
Alasdair Kergon
8703ca623f rename config file vars & always use / as separator 2004-03-08 18:28:45 +00:00
Alasdair Kergon
286253a73f host tags 2004-03-08 18:13:22 +00:00
Alasdair Kergon
9c3ba9fdcd vgmknodes also creates necessary nodes in /dev/mapper 2003-11-13 14:11:41 +00:00
Alasdair Kergon
0a109fbd03 The LVM2 part of vgmknodes [still to do the non-devfs device-mapper bit]. 2003-11-12 19:16:48 +00:00
Alasdair Kergon
1d791a8af4 Check no fs mounted before deactivating. 2003-10-21 22:00:36 +00:00
Alasdair Kergon
8449314da2 Another sync point - numerous fixes & clean ups. 2003-07-04 22:34:56 +00:00
Alasdair Kergon
120faf2a58 pvmove support 2003-04-30 15:26:25 +00:00
Alasdair Kergon
1d3e407c8f o Rejig activation code device dependencies to make things a bit more robust
and further reduce the number of ioctl calls made.
o Metadata area struct change.
o Make config file accessible to activation functions & get stripe_filler
  from it.
o Allow kernel to return snapshot status as a fraction or a percentage.
2003-04-24 22:09:13 +00:00
Alasdair Kergon
e8c4bf56fe Tidy various pre-processing incl. making libdl optional. 2003-03-24 18:08:53 +00:00
Alasdair Kergon
884fafcc30 Activation commands now return success in test mode. 2003-01-17 20:16:23 +00:00
Alasdair Kergon
2f4d91fd69 configure --disable-devmapper if you don't have libdevmapper 2003-01-08 22:44:07 +00:00
Alasdair Kergon
dd2157534b 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
81c44790d5 Refactoring. 2002-11-18 14:01:16 +00:00
Alasdair Kergon
b8769751f6 Rename; add some FIXMEs. 2002-05-22 14:03:45 +00:00
AJ Lewis
02543bad1c o Actually read snapshot percentage from the kernel - what a pain! :)
o Not sure if the code in dev_manager is really optimal, but it works..
   will look at adjusting it a bit now.
 o I *think* it works right when one snapshot if full but others aren't,
   but I haven't really been able to test it because the full snapshot
   somehow resets itself and weird things start happening to the system...
2002-05-09 21:17:57 +00:00
Alasdair Kergon
63875e7591 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
Patrick Caulfield
3ed065de37 Return status from _lv_activate and friends.
Alasdair, I think this is right (and I need it) but you may like to check.
2002-04-11 09:14:04 +00:00
Alasdair Kergon
5bd85668dd lvrename works on snapshots now 2002-03-18 23:25:50 +00:00
Alasdair Kergon
1e57e60613 Integrate suspend. 2002-03-14 15:36:07 +00:00
Alasdair Kergon
f6061ba62e lv_info replaces lv_active etc. 2002-03-11 19:02:28 +00:00
Alasdair Kergon
427899ddce o activate/reactivate merge
o unlocking macro
2002-03-11 15:08:39 +00:00
Joe Thornber
b2ef256910 o Add comment describing what we're aiming for with dev_manager.
o  Remove dev_manager_reactivate, since it'll be the same as activate.

o  Merge the mark, visible and dirty fields into the same flags field.
2002-03-07 16:48:46 +00:00
Alasdair Kergon
fc8b7efc6f 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
Alasdair Kergon
35ebed75c6 Remove unused fns. 2002-03-04 14:27:25 +00:00
Joe Thornber
8d8c02317f o Break creating a snapshot down into:
i)   create cow
   ii)  activate cow
   iii) zero cow
   iv)  deactivate
   v)   add snapshot info
   vi)  reactivate
2002-03-04 13:46:37 +00:00
Alasdair Kergon
8d3afaa53c More use of LV locking. 2002-03-01 19:08:11 +00:00
Alasdair Kergon
73a88ab3d3 o Lock mechanism for LV activation
o #defines for common lock flag combinations
o Try out hyphens instead of colons in device-mapper names - does this
  make messages containing filenames easier to read?
2002-02-27 12:26:41 +00:00
Joe Thornber
a5bca5e240 o Removed old files
o  rewrote activate.c to use dev-manager, I'm sure these two will merge
   at some point.

o  Rename is broken ATM

o  dev-manager puts the calls through to fs.c for layers that have the
   'visible' flag set.
2002-02-26 11:49:17 +00:00
Alasdair Kergon
cf510897f1 Begin conversion so LV id is passed to activation unit instead of
struct logical_volume.
2002-02-25 12:56:16 +00:00
Alasdair Kergon
3698eaa2d2 Remove lv_update_write_access: use lv_reactivate directly now instead. 2002-02-20 21:28:22 +00:00
Joe Thornber
426dc7836c o Removed the -z (suspend) option from the tools
o  New function: int lv_setup_cow_store(struct logical_volume *lv)
   This zeroes the start of the cow device.

o  Made lvcreate call above fn.
2002-02-18 15:52:48 +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
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
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
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
Joe Thornber
e210599fa6 o Similar changes for lv_list. 2002-01-21 16:49:32 +00:00
Joe Thornber
fbd0f5eed2 o move the path building functions to lib/activate/names.c
o  Update activate.c and fs.c to use them

o  device names are now of the form <vg>:<lv>
2002-01-21 11:06:32 +00:00
Alasdair Kergon
4d5b273ebe Support --version argument and 'version' shell command. 2002-01-17 16:39:24 +00:00
Joe Thornber
1f9d567b23 o vgcfgrestore works ! (with the couple of examples I tried). 2002-01-15 17:37:23 +00:00
Alasdair Kergon
0092790c7d 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
Alasdair Kergon
671a13d295 Support for read-only. 2002-01-07 22:28:36 +00:00
Alasdair Kergon
83c49e9745 o Use lvm_snprintf wherever return value is used
o Add parameters to set retention limits for backups
2001-12-31 19:09:51 +00:00
Alasdair Kergon
d5c9ccbe6e Correct activation message. 2001-12-05 00:04:18 +00:00
Alasdair Kergon
e52772d65f Added more log messages. 2001-12-04 23:20:27 +00:00
Alasdair Kergon
6eeb5528f5 Add -t or --test arg to all tools that update metadata to avoid
committing metadata changes or (de)activating.
2001-11-28 18:03:11 +00:00
Joe Thornber
54fad845c9 o Output the correct format for the stripe target 2001-11-28 17:52:27 +00:00
Joe Thornber
fd2faaa16e o These now compile. 2001-11-27 17:39:15 +00:00
Joe Thornber
b31dc66628 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
3fbf02dc82 o activation & active status tests
o lvdisplay fields from kernel
o update lv->size on resize
2001-11-21 19:32:35 +00:00
Joe Thornber
7f8e9a0b6d o _emit_target wasn't spotting contiguous targets properly. 2001-11-19 15:44:06 +00:00
Joe Thornber
81a229f2a5 o Use new info interface to dm. 2001-11-19 15:38:39 +00:00
Patrick Caulfield
120d35f9af Use POSIX defined PRIu64 for formatting 64 bit unsigned integer types 2001-11-15 15:18:53 +00:00
Patrick Caulfield
2b15d5e7b3 Use FMT_64 to format 64bit types 2001-11-15 14:27:51 +00:00
Alasdair Kergon
200a14caa4 Remove hard-coding and create device-mapper directory if required 2001-11-12 17:21:25 +00:00
Joe Thornber
52f42140a7 o Plug in fs_(add|del)_lv 2001-11-12 12:20:58 +00:00
Alasdair Kergon
87e201460a lvdisplay & lvreduce 2001-11-08 16:15:58 +00:00
Alasdair Kergon
e9e52d2b4b o Always set LVM_READ.
o Avoid duplicate deallocation.
2001-11-07 22:47:43 +00:00
Joe Thornber
40fb6c998f o Added lvs_in_vgs_opened 2001-11-07 15:02:07 +00:00
Joe Thornber
2bf8cc62cf o Another pass at the activation code 2001-11-07 11:51:42 +00:00
Alasdair Kergon
5ef32227ec lvcreate 2001-11-06 19:02:26 +00:00
Joe Thornber
0acdd3c62b o adjacent extents are now merged into a single target when activating. 2001-11-05 13:37:13 +00:00
Joe Thornber
b6b280267b o build lv name from <vg>_<lv> 2001-11-02 16:45:44 +00:00
Alasdair Kergon
6e6d253b1a Link in the activation library. 2001-11-02 16:28:04 +00:00
Joe Thornber
d92c105db2 o First pass at activation 2001-11-02 13:45:05 +00:00
Alasdair Kergon
906db728d6 o Changes to activation interface
o Add pointer lv->vg
o Some naming tweaks to improve clarity
2001-10-31 17:59:52 +00:00
Joe Thornber
c4b7411565 o LGPL list implementation 2001-10-31 12:47:01 +00:00
Alasdair Kergon
f00be261ba vgchange 2001-10-16 16:25:28 +00:00
Joe Thornber
b2bd38fa9e o spot empty list in build_vg 2001-10-09 17:09:46 +00:00
Joe Thornber
3482a01e22 o proposed interface to the kernel driver 2001-10-09 16:44:30 +00:00
Joe Thornber
4a39e65b62 o change pv_read to take a name rather than a device 2001-10-09 16:05:34 +00:00