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

122 Commits

Author SHA1 Message Date
AJ Lewis
6e2ff7fb35 o Updated *display output for LVM1 compatibility
o There is still a bit missing
   + all are missing the {PV,VG,LV} # - that is not applicable in LVM2
   + pvdisplay doesn't show how many LVs are contained on it
   + much of the snapshot information isn't available for lvdisplay
 o Look at the code for other potiential FIXMEs  :)
2002-04-29 21:43:14 +00:00
Alasdair Kergon
25b733809a 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
f06bdc437d add setlocale() call so that localisation of things like number entry
and display will work correctly.
2002-04-24 10:42:09 +00:00
Joe Thornber
6633e1b863 o misc little fixes. 2002-02-21 10:15:54 +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
0eb83127ef o Add support for the -s and -c flags to lvcreate. 2002-02-18 10:59:51 +00:00
Heinz Mauelshagen
e1d93eb457 Second path on "pvcreate -s" 2002-02-15 14:33:59 +00:00
Alasdair Kergon
6fda126dd7 Run through indent - no (intentional) changes to any code. 2002-02-11 21:00:35 +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
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
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
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
cabd882ced "exit" means "quit" (lamer) 2002-01-31 20:08:52 +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
7a403967d5 Customisable message output prefix / indentation. 2002-01-22 15:33:40 +00:00
Alasdair Kergon
9f6f4d1e09 No need for file output to default to stderr now that log file can be
specified in config file.
2002-01-21 19:05:00 +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
Alasdair Kergon
682c0fef74 Allow syslog facility to be set, or turned off, from the config file. 2002-01-18 21:26:37 +00:00
Alasdair Kergon
fae0c5764f Support --version argument and 'version' shell command. 2002-01-17 16:39:24 +00:00
Alasdair Kergon
9fea277554 Move test flag from log to global section of config file. 2002-01-16 15:20:51 +00:00
Alasdair Kergon
48a00f1320 o More comprehensive config parameter debugging messages.
o Make /proc configurable.
 o Review hard-coded "/dev"s - made 2 more of them configurable.
2002-01-15 23:34:13 +00:00
Alasdair Kergon
288adea256 o missing labeller free
o updated vgcfgrestore args
o change _check_for_open_devices only to check devices present in the hash
  table instead of using dev_iter which triggers a full scan even when only
  displaying command line help
2002-01-15 21:28:04 +00:00
Joe Thornber
d33f2e9f5a o Actually check in vgcfgrestore. 2002-01-15 18:17:57 +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
dad43063f8 Allow for multiple spellings / backwards compatibility of renamed
command line options.
      vgchange --resizeable y
      pvchange --allocatable y
But --allocation is still allowed for both (as LVM1) and --resizable is OK.
2002-01-10 14:46:50 +00:00
Alasdair Kergon
952d12a5f5 o Rename many occurrences of 'backup' to 'archive' to reduce confusion.
o Extract file creation/renaming code into a library and change backup code
  to use it too.
o Support umask.
o Bring lvm.conf man page up-to-date.
2002-01-09 19:16:48 +00:00
Alasdair Kergon
614a4508e6 Add archiving. 2002-01-09 13:17:14 +00:00
Alasdair Kergon
83912faa1d Another attempt to support both readline versions. 2002-01-08 19:17:08 +00:00
Alasdair Kergon
8deaf0d253 call archive_exit() & backup_exit() on exit 2002-01-08 18:14:04 +00:00
Alasdair Kergon
ae21c2cc8b fixes for compilation 2002-01-07 23:28:25 +00:00
Alasdair Kergon
372a431135 Sync tidy. 2002-01-07 22:49:04 +00:00
Joe Thornber
f5549805b6 o tidy up renaming of archive files. 2002-01-07 14:21:33 +00:00
Joe Thornber
197c3f2ab4 o sync tool changes for backup stuff. 2002-01-07 11:12:11 +00:00
Joe Thornber
e59204fc22 o sync laptop to test machine. 2002-01-07 09:05:31 +00:00
Alasdair Kergon
cc21948339 o Add autobackup support to tools (follows most vg_write calls).
o Skip autobackup when in test mode.
o Set test mode from config file.
o Create system/backup dirs if not present (unless LVM_SYSTEM_DIR holds "").
2001-12-31 21:27:39 +00:00
Alasdair Kergon
129c5d50a1 vgcache.h inclusion (avoid compiler warning) 2001-12-31 19:18:44 +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
529d473095 o Allow more default values to be overridden from config file.
o Cope with both the readline versions used around here.
2001-12-31 15:20:18 +00:00
Joe Thornber
2041d905a9 o Added a quick vgcfgbackup, needs parameters as yet. 2001-12-20 16:05:14 +00:00
Joe Thornber
9f44467d44 o sync backup changes 2001-12-20 11:52:54 +00:00
Joe Thornber
af09a138ce o history is now saved in ~/.lvm_history 2001-12-17 17:59:58 +00:00
Joe Thornber
1cb025cede o Shuffled completion functions around so we dont have to declare them
at the top of the file.

o Changed completion_matches -> rl_completion_matches, and added some consts.

This will probably break things on pre readline 4.2 systems.
2001-12-17 17:18:47 +00:00
Joe Thornber
9f23b355f7 o Changed the macro name in args.h from 'xx' to 'arg'
o  There is now a _default_debug, and _default_verbose level, when
   using lvm interactively -vv and -dd switches just effect the current
   command.

o  Added a --quiet switch which sets both verbose and debug to zero.
2001-12-17 16:58:17 +00:00
Joe Thornber
2d1988923c o Use lvm_snprintf 2001-12-17 14:05:43 +00:00
Joe Thornber
27f6cd0a88 o Remove LVM_CONFIG_FILE environment variable.
o  Introduced the LVM_SYSTEM_DIR variable.

This makes more sense because the persistent cache, and backup directories
are config specific.

eg, I use /etc/lvm for running my real LV's

    but I have another directory /dev/lvm_loops that contains a config
    that allows only loopback devices, I use this for testing.
2001-12-17 12:01:09 +00:00
Joe Thornber
8a6d1dd408 I had another look at the argument processing code:
o You must list long args with no short option (eg. --version) at the
  front of the args.h file.

o If an argument has no short option, set the short option in args.h to '\0'

o The index into the 'the_args' var is now stored as the option value
  for getopt, iff there is no short opt.
2001-12-17 10:08:27 +00:00
Alasdair Kergon
faa556e759 Add internal cache holding a 'hint' list of the PVs belonging to each VG.
A substantial speed-up - particularly in readline mode.
If the hints turn out to be wrong, the relevant parts get thrown away.
vgscan destroys it totally.  In both cases it then rebuilds itself as
required.
2001-12-13 00:07:29 +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
60140607cf o Make sure that every switch has a short option, even if it's
non-displayable so we can remove the pointer mangling that was
   breaking 64bit arch.s
2001-11-22 14:37:07 +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
bb2250f097 o Prefix static var with '_' 2001-11-14 10:44:14 +00:00
Alasdair Kergon
03a8a07d67 Merge lvreduce & lvextend into lvresize. 2001-11-13 14:17:50 +00:00
Alasdair Kergon
277237805a iospace restructured 2001-11-12 15:10:01 +00:00
Alasdair Kergon
7858f6fb16 o Added lvextend
o Full signed arguments to lvreduce/lvextend
o Consistent lv_number/pe map use
o Populate pv->pe_allocated
o Fixes for allocation/writing of multiple LVs
2001-11-09 22:01:04 +00:00
Heinz Mauelshagen
4429597ece Added GPL disclaimer 2001-11-07 08:50:07 +00:00
Alasdair Kergon
a352490f88 prefix & vgname in lvname 2001-10-29 15:28:00 +00:00
Alasdair Kergon
4bc89a2b98 o log/overwrite=1 in config file to overwrite instead of append to log 2001-10-25 17:25:48 +00:00
Alasdair Kergon
d2393d23ee persistent cache fully incorporated. Goodbye to scanning /dev/cdrom :-) 2001-10-24 17:53:50 +00:00
Alasdair Kergon
4790fce2ad persistent filter & some log message changes 2001-10-23 18:20:27 +00:00
Alasdair Kergon
014a5c0bf0 deallocations 2001-10-23 12:33:57 +00:00
Alasdair Kergon
20a2b71c9c filter integration into tools 2001-10-23 11:50:49 +00:00
Alasdair Kergon
ca8f8837c2 o lvm readline error-case tidy-up
o more vgcreate error cases
2001-10-15 12:49:58 +00:00
Joe Thornber
8a482590fa o vgcreate 2001-10-12 14:25:53 +00:00
Joe Thornber
72a5e12b5c o pvcreate
o added uuid unit

o stubbed partition stuff
2001-10-12 10:32:06 +00:00
Alasdair Kergon
0dc2a4d6e4 o vgremove.
o filter devices by major.
2001-10-09 17:20:02 +00:00
Alasdair Kergon
677a06d5fd vgrename & vgck 2001-10-08 18:44:22 +00:00
Alasdair Kergon
25d42d50a8 Sync include file changes. 2001-10-05 21:39:30 +00:00
Alasdair Kergon
9e300c8427 pvscan framework 2001-10-02 17:09:05 +00:00
Alasdair Kergon
1f6db21f32 Another step towards consistency & compilation. 2001-10-01 22:12:10 +00:00
Alasdair Kergon
28f5d16b4f Misc structural changes. 2001-10-01 19:36:06 +00:00
Alasdair Kergon
269930c0da lvactivate checkpoint commit 2001-09-25 12:49:28 +00:00