Alasdair Kergon
33e8b747ac
dbg_free(tc->desc)
2002-02-11 18:21:54 +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
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
03888774a5
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
d1ad45cc41
Locking prototypes.
2002-02-08 14:30:37 +00:00
Alasdair Kergon
075ffca52a
move defaults.h
2002-02-08 14:28:52 +00:00
Joe Thornber
59d6420b9a
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
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
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
Joe Thornber
f593440b7b
o Remove redundant dbg_free.
2002-01-31 15:28:30 +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
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
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
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
1176eb2597
Tweak some error message levels.
2002-01-27 21:30:47 +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
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
610c25e8b1
o Remove redundant symlink-handling code.
...
o When opening device, return error if its cached name is incorrect (eg if
it's changed since the cache was generated). This prevents use until
the cache is rebuilt (eg with vgscan). Doesn't catch every case.
2002-01-23 18:55:01 +00:00
Alasdair Kergon
d518bc39f3
Avoid using VG metadata on PVs that are not in VGs.
2002-01-23 15:50:34 +00:00
Alasdair Kergon
58f323bc80
Silently remove any existing symlink before creating a new one.
2002-01-22 19:58:37 +00:00
Alasdair Kergon
7a403967d5
Customisable message output prefix / indentation.
2002-01-22 15:33:40 +00:00
Alasdair Kergon
c490c2f281
Insert a missing hash_remove.
2002-01-21 19:04:13 +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
Joe Thornber
f868d63582
o Similar changes for lv_list.
2002-01-21 16:49:32 +00:00
Joe Thornber
4d67a0787f
o Typo in comment
2002-01-21 16:10:36 +00:00
Joe Thornber
cc282870dd
o Changed
...
struct pv_list {
struct list list;
struct physical_volume pv;
};
to
struct pv_list {
struct list list;
struct physical_volume *pv;
};
o New function in toollib 'create_pv_list', which creates a list of pv's
from a given command line array of pv's.
o Changed lvcreate/extend to use this (fixes lvextend [pv list] bug).
2002-01-21 16:05:23 +00:00
Patrick Caulfield
94722ba71f
Fixx OB1 error in max LV and max PV numbers
2002-01-21 14:53:47 +00:00
Joe Thornber
e586401ecb
o Changed find_pv_in_vg, and find_lv_in_vg to return a struct pv_list * and
...
struct lv_list * respectively.
2002-01-21 14:28:12 +00:00
Joe Thornber
752e80cd5a
o names.[hc]
2002-01-21 13:11:03 +00:00
Joe Thornber
7fbaf10a79
o lvdisplay now gives a segment map for the -m option.
2002-01-21 12:05:39 +00:00
Joe Thornber
d29265b97d
o removed display_uuid
...
o use id_write_format from lib/uuid/uuid.h instead
2002-01-21 11:29:06 +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
682c0fef74
Allow syslog facility to be set, or turned off, from the config file.
2002-01-18 21:26:37 +00:00
Alasdair Kergon
0e63603659
Display something in the "hypothetical" unknown log level case.
2002-01-18 19:38:19 +00:00
Alasdair Kergon
fae0c5764f
Support --version argument and 'version' shell command.
2002-01-17 16:39:24 +00:00
Alasdair Kergon
add7dc2d5a
o pvcreate --uuid to specify the uuid (required before using vgcfgrestore
...
onto a new device). uuid specified must not already exist on the system.
o More message tidying.
o When checking for label, only read PV metadata.
o Add ataraid. [Needs moving into config/defaults files.]
2002-01-16 18:10:08 +00:00
Alasdair Kergon
93ea39697f
o Don't update vgcache when (not really) writing in test mode.
...
o Don't continue iterating through a possibly-deleted list.
2002-01-16 14:43:27 +00:00
Alasdair Kergon
3c06874035
Remove a duplicate disk read (can_handle).
2002-01-16 13:09:26 +00:00
Patrick Caulfield
d738054256
#include <string.h>
2002-01-16 12:02:06 +00:00
Joe Thornber
22d1879c60
o Set the segment counter back to 1, for a new LV.
2002-01-16 11:34:29 +00:00
Joe Thornber
5c83f05e81
o Knock out the "'%s' is not a block device" debug message.
2002-01-16 09:23:28 +00:00
Alasdair Kergon
e0d452a032
Reduce 'no label found' message severity to debug level.
2002-01-16 00:01:36 +00:00
Alasdair Kergon
deb8a3b7c9
Fix function typecasts.
2002-01-15 23:47:56 +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
f2f2634990
o vgcfgrestore works ! (with the couple of examples I tried).
2002-01-15 17:37:23 +00:00
Joe Thornber
6036e5e0f7
o split the uuid -> device map out from vgcache
...
o roll vgcache back to agk's implementation, we'll revisit this as part
of the cluster integration.
o change the extra_info field in a label to be a void *
2002-01-15 10:24:48 +00:00
Joe Thornber
406d287ae1
o Non-caching implementation of new vgcache interface.
2002-01-14 11:43:52 +00:00
Joe Thornber
9056f65b0c
o LVM1 labeller.
2002-01-14 10:00:56 +00:00
Joe Thornber
ea31a9b09c
o Reformat comment and correct typo.
2002-01-14 09:59:12 +00:00
Patrick Caulfield
4c0d6e283a
Couple of typos fixed.
2002-01-11 11:34:53 +00:00
Joe Thornber
ee27c57b58
o Put in the pv_hash which stores the pv section name -> pv struct mapping.
2002-01-11 11:09:12 +00:00
Joe Thornber
493656dd3c
o label.c now compiles.
2002-01-11 10:43:32 +00:00
Patrick Caulfield
391f02b1b5
Change lvm2_label to use Joe's new label switch system.
2002-01-11 10:39:56 +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
Joe Thornber
c6cc24ea3f
o _read_id function for import.c
2002-01-10 18:12:26 +00:00
Alasdair Kergon
7e56005011
More steps towards successful compilation.
2002-01-10 16:48:28 +00:00
Alasdair Kergon
2801ddcacc
Add 'get' functions.
2002-01-10 16:47:58 +00:00
Alasdair Kergon
cf633b70c2
More detail in error msgs.
2002-01-10 16:47:25 +00:00
Alasdair Kergon
b80f32dd0a
Clarify terminology:
...
VG is resizeable - PVs can be added or removed
PV is allocatable - free extents on it may be allocated to LVs
2002-01-10 15:09:51 +00:00
Joe Thornber
fc63d04f42
o Moved the current label.[hc] sideways to lvm2_label.[hc]
...
o First pass at low level labelling switch. This allows us to
register different label types (eg, lvm1, lvm2).
2002-01-10 15:01:58 +00:00
Joe Thornber
88cc3edf2e
o vgcfgrestore.
2002-01-10 14:27:47 +00:00
Alasdair Kergon
9b6934ba33
Temporary file creation & renaming.
2002-01-10 12:22:17 +00:00
Joe Thornber
9b5db6c270
o First pass at import.c. Still waiting for label code for the uuid->pv
...
mapping.
2002-01-10 11:18:08 +00:00
Joe Thornber
e2031c81b5
o Put in the 'out of memory' log_err for pool.
2002-01-10 09:35:55 +00:00
Alasdair Kergon
dff36d2a77
Renamed to archive.c
2002-01-09 19:17:11 +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
4bbf2c3418
Accept octal values for numbers (such as umask).
2002-01-09 18:53:07 +00:00
Joe Thornber
9588155a4e
o Let the comment wars begin.
2002-01-09 14:14:07 +00:00
Joe Thornber
ab1885c8aa
o Reformat comments.
2002-01-09 13:56:11 +00:00
Alasdair Kergon
89f1e3ddf0
o Try to improve NFS-safety for temporary file creation (unique name; O_APPEND
...
+ fcntl lock) and rename (using hard link), avoiding any "real" archive
files ever being zero length.
o Fix filename parsing & ordered list handling.
2002-01-09 13:16:19 +00:00
Alasdair Kergon
d413c0ce38
Explicitly close (=>flush) files.
2002-01-09 13:07:03 +00:00
Alasdair Kergon
67fb2a39a7
Allow pool_begin_object in empty pool.
2002-01-09 13:06:02 +00:00
Joe Thornber
145eef414b
o Remove anomalous punctuation.
2002-01-08 10:51:13 +00:00
Joe Thornber
18ce960755
o Introduction to pool for those without psychic powers.
2002-01-08 10:47:17 +00:00
Alasdair Kergon
2bc25b546a
Support for read-only.
2002-01-07 22:28:36 +00:00
Alasdair Kergon
75e5ea90c2
Missing close() in error case.
2002-01-07 22:25:57 +00:00
Joe Thornber
5a72a50367
o vgcreate wasn't setting vg->cmd
2002-01-07 15:27:55 +00:00
Joe Thornber
16ab7a0da2
o New function 'merge_segments'
...
o Call said function at end of lv_extend
2002-01-07 15:08:28 +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
330c46317c
o Added find_config_bool
2002-01-07 10:23:52 +00:00
Joe Thornber
3eb1b74b29
o Get format-text.c compiling.
2002-01-07 09:16:20 +00:00
Joe Thornber
e59204fc22
o sync laptop to test machine.
2002-01-07 09:05:31 +00:00
Joe Thornber
9640f93d8c
o Revert to the 6-4-4-4-4-4-6 format for uuid's
...
o When reading a uuid all -'s are stripped, wherever they are.
2002-01-04 16:55:14 +00:00
Alasdair Kergon
b94703a187
Put device name in quotes.
2002-01-03 17:47:48 +00:00
Alasdair Kergon
5671fce111
Fix final comma in arrays.
2002-01-03 12:43:01 +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
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
67e4897b2c
Redundant.
2001-12-31 17:26:42 +00:00
Alasdair Kergon
6c94692bc6
Fix C99 error case handling (snprintf ret value >= buffer size).
2001-12-31 15:17:34 +00:00
Alasdair Kergon
52f71ce77b
Fixes for compilation.
2001-12-31 15:14:44 +00:00
Joe Thornber
2041d905a9
o Added a quick vgcfgbackup, needs parameters as yet.
2001-12-20 16:05:14 +00:00
Joe Thornber
493793dcbc
o Debug version of the pool_grow stuff.
2001-12-20 12:27:41 +00:00
Joe Thornber
9f44467d44
o sync backup changes
2001-12-20 11:52:54 +00:00
Patrick Caulfield
8cdf0a831c
Wipe the first label if writing the second one failed.
2001-12-18 14:39:32 +00:00
Joe Thornber
e8bacbc465
o sync the backup stuff
2001-12-17 19:46:10 +00:00
Joe Thornber
39b633c1de
o lvm_snprintf
...
Could everyone please use this from now on.
2001-12-17 14:04:10 +00:00
Heinz Mauelshagen
3813dd120e
Typos in error messages
2001-12-17 11:07:33 +00:00
Patrick Caulfield
515df8784a
Write the location of both labels in the labels so we can check them. I don't do
...
much with this ATM (apart from check that they all match up).
Use a different CRC routine.
2001-12-14 13:15:15 +00:00
Joe Thornber
6b4657e81f
o I figure if I can't remember how to use my code, then I should add
...
a comment. It's quite cool, wish I remember writing it.
2001-12-13 16:09:06 +00:00
Alasdair Kergon
839f595181
Handle orphan PVs too, so hints remain valid after vgreduce.
2001-12-13 15:08:58 +00:00
Patrick Caulfield
75f7aa5563
made the hard-coded 512 into BLOCK_SIZE just for neatness sake.
...
log_error() if writing the label fails so someone knows which was in error.
2001-12-13 08:40:47 +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
394fae7fc5
fix for clean compilation
2001-12-12 16:25:53 +00:00
Joe Thornber
0803634cd1
o silly bugs
2001-12-12 16:22:38 +00:00
Joe Thornber
8a14dc290a
o pool-debug version of end_object wasn't returning the object.
2001-12-12 16:05:52 +00:00
Joe Thornber
c155eb83c2
o Add error checking in _new_chunk
2001-12-12 14:54:24 +00:00
Joe Thornber
2fbe588881
o pool-debug versions of begin_object, grow_object etc.
2001-12-12 14:25:20 +00:00
Patrick Caulfield
5aed44459e
Build label code into the library
2001-12-12 09:09:04 +00:00
Patrick Caulfield
8a51c23765
Use a proper CRC calculation.
2001-12-12 09:05:44 +00:00
Patrick Caulfield
f4a7ce7c49
- Change label format to include a string disk_type and a version number.
...
- The iterator can find labels by string and also appropriate version number (==,
<= or any) if you want.
- Add labels_match() call that compares the two labels and returns an error if
they do not match.
- Write labels in sector 1 & last rather than 2 & last as per Joe.
2001-12-11 16:49:40 +00:00
Patrick Caulfield
c41413c499
Fix label filter.
2001-12-11 14:17:10 +00:00
Joe Thornber
370e18e437
o Add output_date
2001-12-11 12:29:25 +00:00
Joe Thornber
57ba050c58
o flags.c reads and writes a status bitset
2001-12-11 12:18:56 +00:00
Joe Thornber
d96dea9abf
o Split import-export.c into two files.
2001-12-11 12:16:58 +00:00
Joe Thornber
a76318a698
o Update sample to a format that supports multiple vg's per file.
2001-12-11 12:15:08 +00:00
Patrick Caulfield
3dd5cbe54f
Label reading/writing code.
...
Not tested the filter yet.
2001-12-11 11:42:30 +00:00
Joe Thornber
db73838ca4
o Pretty print and read for uuid's
2001-12-11 11:40:34 +00:00
Patrick Caulfield
52864eda2e
Add a dev_get_sectsize call.
2001-12-11 10:18:49 +00:00
Alasdair Kergon
b74c8033a2
Fixes for allocation of striped volumes.
2001-12-07 21:17:12 +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
Joe Thornber
85028e021c
o sync
2001-12-04 14:14:07 +00:00
Alasdair Kergon
a03f232063
Tweaks for make install. -m args replaces verbose to display maps.
2001-12-03 20:23:53 +00:00
Alasdair Kergon
7a61472a0a
More striping support & fixes.
2001-12-03 16:27:16 +00:00
Joe Thornber
c0ca88c287
o Comparison function was sorting things in ascending rather than
...
descending order.
o free off the sort array when finished with it.
2001-11-30 09:19:46 +00:00
Joe Thornber
488a58a998
o Striped allocator
...
o Changed pv_map.c to maintain the list of free areas in size order, which
is more helpful to the allocators. If you want to allocate a bit of an
area call consume_area(area, size), this will adjust the area if there's
some space left and shuffle it to the correct place in the list.
Not tested.
2001-11-29 18:45:35 +00:00
Joe Thornber
74af29faae
o I was reading striped volumes incorrectly.
2001-11-29 14:13:43 +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
252c7708f5
o pool_free was leaving one block hanging around.
2001-11-28 14:58:33 +00:00
Alasdair Kergon
579944d327
o Tool support for segments.
...
o vgmerge working.
2001-11-28 13:45:50 +00:00
Joe Thornber
4a8d120415
o pool-debug.c contains an alternative implementation of pool that gets
...
a seperate chunk of memory from dbg_malloc for each pool_alloc. This
will allow the bounds checking code in dbg_malloc to do it's stuff.
o The normal implementation moved to pool-fast.c
o pool.c now just contains a #ifdef and includes the appropriate .c file.
Alasdair, could you make sure that gcc -MM get's passed all the
CFLAGS please, otherwise the dependencies get calculated incorrectly.
2001-11-28 09:13:00 +00:00
Alasdair Kergon
b9adad95c8
Fix a memory smash.
2001-11-27 23:12:06 +00:00
Joe Thornber
5875c0fce5
o extra error checking
2001-11-27 20:03:45 +00:00
Joe Thornber
39497a4479
o These now compile.
2001-11-27 17:39:15 +00:00
Joe Thornber
adbc44560b
o Get format1 building.
2001-11-27 17:29:56 +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
Joe Thornber
79b0c9f89a
o change chunk_size to stripe_size
2001-11-26 16:30:43 +00:00
Joe Thornber
f95627cf8a
o More metadata changes.
2001-11-26 16:18:48 +00:00
Alasdair Kergon
6b35c7eb9d
LV create/extend prototype changes for striping
2001-11-26 15:31:46 +00:00
Joe Thornber
3390d370d0
o make it obvious that stripe_segment is variable sized.
2001-11-26 13:15:22 +00:00
Joe Thornber
79437c2734
o segments will have to be held as an array of pointers since they're now
...
variable sized.
2001-11-26 13:03:36 +00:00
Joe Thornber
23687ed34d
o sync the new in core rep. for Alasdair.
...
This will break everything ! Hopefully things will be working again by
this evening.
2001-11-26 12:49:29 +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
7c77eca4f7
o Sync. only
2001-11-21 09:20:05 +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
7f3859bb5c
vgdisplay
2001-11-19 15:20:50 +00:00
Patrick Caulfield
afe46c849b
size_ts aren't really pointers but there are no format specifiers for them,
...
so this will just have to do.
2001-11-16 11:37:45 +00:00
Patrick Caulfield
f96175e75e
Fix format characters for printing size_ts
2001-11-16 10:56:11 +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
Patrick Caulfield
1a5123da94
define FMT_64 to be the right format string for 64-bit types a la GFS
2001-11-15 14:27:34 +00:00
Alasdair Kergon
5389c987a3
Use inttypes.h
2001-11-15 14:14:03 +00:00
Patrick Caulfield
79b5666abe
#include <string.h> for memset
2001-11-15 11:46:00 +00:00
Alasdair Kergon
9b7742bb36
More LV-related tidying. lvdisplay without args now shows all LVs.
2001-11-14 18:38:07 +00:00
Alasdair Kergon
6e74833c6c
Avoid generating duplicate lv names
2001-11-14 14:12:01 +00:00
Alasdair Kergon
5238b63f1a
Miscellaneous tidying
2001-11-14 13:52:38 +00:00
Joe Thornber
e55ae5d32e
o lvcreate no longer needs the explicit -n flag
...
o disabled zeroing of lv until bug's worked out
2001-11-14 12:07:37 +00:00
Joe Thornber
29aa6d5850
o Added dev_open and dev_close functions
...
o Changed disk-rep to use these
o if NDEBUG is not defined the dev_cache will check for open devices on
teardown.
I was hoping this would speed things up. But I'm still getting:
reti:/home/joe/sistina/LVM2/tools# time ./lvm vgchange -a n
Volume group vg0 successfully changed
real 0m5.751s
user 0m0.060s
sys 0m0.070s
even though I have only 1 device with the vg on it passing the filters.
2001-11-14 10:01:52 +00:00
Joe Thornber
78fc479a69
o Deal with sparse lv arrays (on disk)
...
o new fn. dev_zero which zero's an area of a device
2001-11-13 18:52:52 +00:00
Alasdair Kergon
e68b5e3029
o lvdisplay now shows LE / PV map
...
o fix LE allocation when first PV is full
o reduce VG free_count when removing PVs from VG
2001-11-13 17:53:06 +00:00
Joe Thornber
30f7ee62e8
o Put underscore between vg and lv name.
2001-11-13 16:14:54 +00:00
Alasdair Kergon
03a8a07d67
Merge lvreduce & lvextend into lvresize.
2001-11-13 14:17:50 +00:00
Joe Thornber
d53f88d7af
o Stuff
2001-11-12 19:28:50 +00:00
Joe Thornber
4daacc38cb
o Add ALLOC_SIMPLE
2001-11-12 17:55:05 +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
ac61645c2d
o if any pattern rejects a device, and there were no accepts then reject !
2001-11-12 17:06:33 +00:00
Joe Thornber
f7cbb38dbb
o check result of an allocation
2001-11-12 16:00:52 +00:00
Alasdair Kergon
277237805a
iospace restructured
2001-11-12 15:10:01 +00:00
Joe Thornber
09bc639dbf
o add fs.c to the Makefile
2001-11-12 13:02:06 +00:00
Joe Thornber
66b0745933
o add uplink from vg to cmd_context
2001-11-12 12:23:10 +00:00
Joe Thornber
f7a14956d8
o Plug in fs_(add|del)_lv
2001-11-12 12:20:58 +00:00
Joe Thornber
2107f48208
o Split struct io_space into:
...
struct format_handler - format methods
struct format_instance - links instance data, methods, and cmd
struct cmd_context - dev_dir, memory allocator, device filter
2001-11-12 12:16:57 +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
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
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
801495c0f7
o pool_empty was very wrong
2001-11-07 14:11:20 +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
c84cc3847c
o lv_extend
2001-11-06 12:01:46 +00:00
Joe Thornber
2cffd7d4e1
o Factor _allocate out for use by lv_extend
2001-11-06 11:31:29 +00:00
Joe Thornber
15e35a737c
o lv_reduce
...
o pv_maps wasn't taking a list of acceptable pvs
2001-11-06 11:19:33 +00:00
Joe Thornber
ed0502e98b
o Contiguous allocation
2001-11-06 10:55:01 +00:00
Joe Thornber
dd4e3f9efc
o lv_manip.c will contain the code for lv_create, lv_extend and lv_reduce.
2001-11-06 10:29:56 +00:00
Alasdair Kergon
1138def67f
Reinstate size of lv
2001-11-05 18:07:44 +00:00
Joe Thornber
242019fdf4
o code for building free area lists on a pv. Compiles but not run.
2001-11-05 16:41:38 +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
Alasdair Kergon
9277853f07
lvcreate prototype
2001-11-05 13:06:03 +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
b892f8ecb6
o random little fixes
2001-10-30 17:53:21 +00:00
Joe Thornber
dc6e03dc5b
o Add read_ahead and stripes to struct logical_volume
2001-10-29 15:34:56 +00:00
Alasdair Kergon
a352490f88
prefix & vgname in lvname
2001-10-29 15:28:00 +00:00
Alasdair Kergon
cfd658dab0
lvremove
2001-10-29 13:52:23 +00:00
Joe Thornber
aebf566c17
o rfilter was no longer accepting by default
2001-10-25 18:12:44 +00:00
Joe Thornber
d7c5efe663
o was freeing memory from the wrong pool
2001-10-25 15:24:35 +00:00
Alasdair Kergon
a4c0d9c2e4
o fopen error message
...
o debug options in makefile
2001-10-25 15:07:26 +00:00
Joe Thornber
c9a97a795a
o pfilter stores results for all aliases.
2001-10-25 14:51:51 +00:00
Joe Thornber
c3ceee769f
o It's a bit of a hack, but the regex filter now makes sure a device path
...
that passed the filter is at the front of the aliases list.
2001-10-25 14:41:28 +00:00
Joe Thornber
5e610278ad
o rfilter now checks all aliases for a match
2001-10-25 14:19:39 +00:00
Joe Thornber
c7f0b573ac
o use dev_name(dev) to get the name of a device, this operation is cheap
...
since it just get's the first alias.
2001-10-25 14:04:18 +00:00
Joe Thornber
3cfae6cfce
o Remove a couple of warnings, and one bug in ttree. Spotted by the optimiser
2001-10-25 13:08:29 +00:00
Joe Thornber
11f0a12ed8
o Shuffle the keys to stop degeneracy.
2001-10-25 12:38:18 +00:00
Joe Thornber
b27957a686
o Trivial binary tree
2001-10-25 11:38:19 +00:00
Joe Thornber
890b537974
o added aliases list to struct device.
2001-10-25 11:34:55 +00:00
Joe Thornber
e1e529fae1
o Merged common code between hash_destroy and hash_wipe.
2001-10-25 08:31:43 +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
Joe Thornber
68c14b47aa
o removed old files
2001-10-23 14:17:07 +00:00
Joe Thornber
9d3bf3e2c1
o forgot to use the path passed into _read_array.
2001-10-23 13:12:05 +00:00
Alasdair Kergon
014a5c0bf0
deallocations
2001-10-23 12:33:57 +00:00
Joe Thornber
10a6939753
o rethink of the persistent filter
2001-10-23 12:24:55 +00:00
Alasdair Kergon
20a2b71c9c
filter integration into tools
2001-10-23 11:50:49 +00:00