1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
Commit Graph

1052 Commits

Author SHA1 Message Date
Alasdair Kergon
607bcd61d0 Tidying. 2002-04-03 12:17:55 +00:00
Alasdair Kergon
7bb6856a7e Cope with creation of additional snapshots while active.
(More work on suspension dependencies still needed.)
2002-03-27 18:17:43 +00:00
Alasdair Kergon
4bb3eccf2b New-style persistent minor support. 2002-03-26 13:41:37 +00:00
Alasdair Kergon
e04c519896 o read-only device support
o name/uuid disambiguation
2002-03-25 18:54:59 +00:00
Alasdair Kergon
9585e50fef Better support for LVs with hyphens in names. 2002-03-19 16:41:44 +00:00
Alasdair Kergon
2ed2a72439 lvrename works on snapshots now 2002-03-18 23:25:50 +00:00
Alasdair Kergon
a76ba817a8 Tie all snapshot (de)activation requests to (de)activation of origin device. 2002-03-18 13:09:27 +00:00
Alasdair Kergon
20ce742691 s/Removing/Unloading/ in messages to reduce confusion 2002-03-15 23:01:59 +00:00
Alasdair Kergon
a69de4919b Cut the number of device-mapper calls. 2002-03-15 22:59:12 +00:00
Alasdair Kergon
14a9cda63b Reduce the number of dm info calls. 2002-03-14 21:17:30 +00:00
Alasdair Kergon
20c5fcf764 Integrate suspend. 2002-03-14 15:36:07 +00:00
Joe Thornber
d8e7d77316 o dev_manager_suspend, untested. 2002-03-14 10:56:09 +00:00
Alasdair Kergon
dd420615d5 Set LV uuid. 2002-03-13 15:11:29 +00:00
Alasdair Kergon
251502f9a1 Move is_empty_dir to lvm-file 2002-03-11 22:23:24 +00:00
Joe Thornber
bb13858120 o Actually check that the vg directory is empty rather than speculatively
rmdiring it.  Work around for devfs bug.
2002-03-11 20:43:58 +00:00
Joe Thornber
2ec94d4daf o This should complete the dev_manager alg. Please could people now
report any activation oddities they see.
2002-03-11 20:36:04 +00:00
Alasdair Kergon
41967a0276 lv_info replaces lv_active etc. 2002-03-11 19:02:28 +00:00
Alasdair Kergon
be326a2f1b o activate/reactivate merge
o unlocking macro
2002-03-11 15:08:39 +00:00
Joe Thornber
323a167b49 o dm->active_list now filled in, ATM this is based on the layer name rather
than the uuid.
2002-03-11 11:27:48 +00:00
Joe Thornber
fd6932b18b o Comment out some new code that was preventing pjc activating
snapshots.  This will go back in when the active_list is working.
2002-03-11 10:38:16 +00:00
Joe Thornber
5295f36cb4 o knock out the offset for origin targets. 2002-03-08 10:45:01 +00:00
Joe Thornber
4526747997 o Add active_list to dev_manager
o  Origin layer is only added to snapshots if a snapshot is in the
   active_list.
2002-03-08 10:41:48 +00:00
Joe Thornber
11d2da4036 o First cut at dev scanning.
o  Split up _expand_lv
2002-03-07 17:37:38 +00:00
Joe Thornber
0fe3a2c512 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
Joe Thornber
eea1d6932c o Top level device is now just called <vg>-<lv> (there's no 'top'
layer appended).

o  Got rid of the unused layer->type field and enum.
2002-03-07 15:29:31 +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
Alasdair Kergon
2731508b34 Fix activation for VG with more than one LV. 2002-03-04 18:50:34 +00:00
Joe Thornber
d30321a6cf o Bad dependency, meant the origin was always getting activated. 2002-03-04 15:10:30 +00:00
Alasdair Kergon
3bf898526a Remove unused fns. 2002-03-04 14:27:25 +00:00
Joe Thornber
3a84c18bdd o I was tearing down device bottom-up instead of top down. Which
is why lvremove of snapshots wasn't working.
2002-03-04 14:26:43 +00:00
Joe Thornber
9db196e6c5 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
8c013da41f More use of LV locking. 2002-03-01 19:08:11 +00:00
Joe Thornber
6ed0234393 o point snapshots at origin:real rather than origin:top, and *ping*
snapshots work.
2002-03-01 09:07:00 +00:00
Alasdair Kergon
f4cbeaf0ac 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
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
6761081ab4 Clearer link pathname display. 2002-02-26 16:08:22 +00:00
Joe Thornber
349f09e401 o _build_name was allocating 1 byte too few, which meant the
terminating zero was falling off at some later point.

o Don't try and iterate from a deleted node in _prune_unmarked.
2002-02-26 14:44:13 +00:00
Joe Thornber
de6c918392 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
Joe Thornber
c15334eb4e o More dev_manager fns. 2002-02-25 16:53:12 +00:00
Joe Thornber
999e584511 o In go the populate functions. 2002-02-25 15:19:53 +00:00
Joe Thornber
fc28b60f9c o More dev_manager work. 2002-02-25 14:46:57 +00:00
Alasdair Kergon
413cc9189e Begin conversion so LV id is passed to activation unit instead of
struct logical_volume.
2002-02-25 12:56:16 +00:00
Joe Thornber
ca73e23fd0 o Sync with cvs, dev_manager still needs to be wired into activate.c 2002-02-25 12:02:33 +00:00
Alasdair Kergon
14a81c5a03 Remove lv_update_write_access: use lv_reactivate directly now instead. 2002-02-20 21:28:22 +00:00
Joe Thornber
5986ec940f 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
fdc7af232a 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
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
8d6a8717bb 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
a62ee8ad27 Document return codes. 2002-02-11 17:42:02 +00:00
Joe Thornber
6d52fb460b 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
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
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
Alasdair Kergon
1176eb2597 Tweak some error message levels. 2002-01-27 21:30:47 +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
Alasdair Kergon
58f323bc80 Silently remove any existing symlink before creating a new one. 2002-01-22 19:58:37 +00:00
Joe Thornber
f868d63582 o Similar changes for lv_list. 2002-01-21 16:49:32 +00:00
Joe Thornber
752e80cd5a o names.[hc] 2002-01-21 13:11:03 +00:00
Joe Thornber
12137231d3 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
fae0c5764f Support --version argument and 'version' shell command. 2002-01-17 16:39:24 +00:00
Joe Thornber
f2f2634990 o vgcfgrestore works ! (with the couple of examples I tried). 2002-01-15 17:37:23 +00:00
Alasdair Kergon
4a624ca055 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
2bc25b546a Support for read-only. 2002-01-07 22:28:36 +00:00
Alasdair Kergon
41b2fd5f4d 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
b546cd6d69 Correct activation message. 2001-12-05 00:04:18 +00:00
Alasdair Kergon
a299e38810 Added more log messages. 2001-12-04 23:20:27 +00:00
Alasdair Kergon
c2d72fd402 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
6c4ee29605 o Output the correct format for the stripe target 2001-11-28 17:52:27 +00:00
Joe Thornber
39497a4479 o These now compile. 2001-11-27 17:39:15 +00:00
Joe Thornber
0bab65915d 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
3080a75445 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
f2ec0e072e o There's no need to prefix dm_dir() with /dev/ anymore 2001-11-21 17:20:49 +00:00
Joe Thornber
0d3593f5c1 o Oops, I thought this was checked in ages ago. 2001-11-21 09:21:31 +00:00
Joe Thornber
a7af42f14c o _emit_target wasn't spotting contiguous targets properly. 2001-11-19 15:44:06 +00:00
Joe Thornber
ef8a0eae5c o Use new info interface to dm. 2001-11-19 15:38:39 +00:00
Alasdair Kergon
d9bc7ffe61 lvrename (without reactivation) 2001-11-15 17:27:45 +00:00
Patrick Caulfield
2fa9bf7052 Use POSIX defined PRIu64 for formatting 64 bit unsigned integer types 2001-11-15 15:18:53 +00:00
Patrick Caulfield
78125be9c2 Use FMT_64 to format 64bit types 2001-11-15 14:27:51 +00:00
Joe Thornber
30f7ee62e8 o Put underscore between vg and lv name. 2001-11-13 16:14:54 +00:00
Alasdair Kergon
cf4a4a1fa8 Remove hard-coding and create device-mapper directory if required 2001-11-12 17:21:25 +00:00
Joe Thornber
f7a14956d8 o Plug in fs_(add|del)_lv 2001-11-12 12:20:58 +00:00
Joe Thornber
3c02236767 o Compile errors 2001-11-12 11:48:31 +00:00
Joe Thornber
32ddb2ed5f o Ready for testing 2001-11-12 11:42:29 +00:00
Joe Thornber
4f0a4a6a7a sync only, not ready yet 2001-11-09 08:48:22 +00:00
Alasdair Kergon
94b8220f6a lvdisplay & lvreduce 2001-11-08 16:15:58 +00:00
Alasdair Kergon
4f7a219dac o Always set LVM_READ.
o Avoid duplicate deallocation.
2001-11-07 22:47:43 +00:00
Joe Thornber
2ba80b436f o Added lvs_in_vgs_opened 2001-11-07 15:02:07 +00:00
Joe Thornber
37ed70b9ea o Another pass at the activation code 2001-11-07 11:51:42 +00:00
Alasdair Kergon
642c2e964b lvcreate 2001-11-06 19:02:26 +00:00
Joe Thornber
80f9662b05 o adjacent extents are now merged into a single target when activating. 2001-11-05 13:37:13 +00:00
Joe Thornber
ab269099a7 o build lv name from <vg>_<lv> 2001-11-02 16:45:44 +00:00
Alasdair Kergon
f047219b23 Link in the activation library. 2001-11-02 16:28:04 +00:00
Joe Thornber
ae2bb66535 o First pass at activation 2001-11-02 13:45:05 +00:00
Alasdair Kergon
0a5e4a1442 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
1b9fcf48b1 o LGPL list implementation 2001-10-31 12:47:01 +00:00
Joe Thornber
890b537974 o added aliases list to struct device. 2001-10-25 11:34:55 +00:00
Alasdair Kergon
a381c45a6e vgchange 2001-10-16 16:25:28 +00:00
Joe Thornber
758b8b4ba0 o builds a very sub-optimal table 2001-10-10 15:30:31 +00:00
Joe Thornber
e15559aa3c o spot empty list in build_vg 2001-10-09 17:09:46 +00:00
Joe Thornber
5cffeebbaa o proposed interface to the kernel driver 2001-10-09 16:44:30 +00:00
Joe Thornber
b1713d284d o change pv_read to take a name rather than a device 2001-10-09 16:05:34 +00:00