Heinz Mauelshagen
df89b641bb
LV maximum size limit of 2TB ensured in _lv_setup()
2002-02-13 21:28:56 +00:00
Joe Thornber
0a9f8bcf97
o First pass at format1 snapshot support.
2002-02-13 11:43:29 +00:00
Joe Thornber
7d68b08028
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
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
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
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
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
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
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
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
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
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
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
d518bc39f3
Avoid using VG metadata on PVs that are not in VGs.
2002-01-23 15:50:34 +00:00
Joe Thornber
f868d63582
o Similar changes for lv_list.
2002-01-21 16:49:32 +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
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
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
9056f65b0c
o LVM1 labeller.
2002-01-14 10:00: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
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
Alasdair Kergon
839f595181
Handle orphan PVs too, so hints remain valid after vgreduce.
2001-12-13 15:08:58 +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
b74c8033a2
Fixes for allocation of striped volumes.
2001-12-07 21:17:12 +00:00
Joe Thornber
74af29faae
o I was reading striped volumes incorrectly.
2001-11-29 14:13:43 +00:00
Alasdair Kergon
579944d327
o Tool support for segments.
...
o vgmerge working.
2001-11-28 13:45:50 +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
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
Alasdair Kergon
5238b63f1a
Miscellaneous tidying
2001-11-14 13:52:38 +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
Joe Thornber
4daacc38cb
o Add ALLOC_SIMPLE
2001-11-12 17:55:05 +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
66b0745933
o add uplink from vg to cmd_context
2001-11-12 12:23:10 +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
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
2ba80b436f
o Added lvs_in_vgs_opened
2001-11-07 15:02:07 +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
f047219b23
Link in the activation library.
2001-11-02 16:28:04 +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
d7c5efe663
o was freeing memory from the wrong pool
2001-10-25 15:24:35 +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
Alasdair Kergon
cd77c5a7b7
pvdisplay
2001-10-18 16:55:19 +00:00
Alasdair Kergon
8f8a968dc2
pvchange
2001-10-17 15:29:31 +00:00
Alasdair Kergon
a381c45a6e
vgchange
2001-10-16 16:25:28 +00:00
Alasdair Kergon
aa290eb285
vgcreate basic extent size validation
2001-10-15 20:29:15 +00:00
Alasdair Kergon
df2e0dc751
More vgcreate error trapping
2001-10-15 18:39:40 +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
6e91eeef13
vgreduce, vgremove, vgrename & vgscan
2001-10-11 21:35:55 +00:00
Joe Thornber
7f64636f5f
o try incrementing pv_number from 1
2001-10-11 16:31:09 +00:00
Joe Thornber
1eabbe1ad7
o if contained &= instad of &
2001-10-11 15:09:31 +00:00
Joe Thornber
e8220912e9
o initalise list_heads, initialise list_heads, initi ..
2001-10-11 14:21:38 +00:00
Joe Thornber
6b6a344e09
o a very quick hack to get vg_number right
2001-10-11 14:10:18 +00:00
Joe Thornber
383d1752fa
o set PV_ALLOCATABLE flag correctly
2001-10-11 13:34:17 +00:00
Joe Thornber
68cb51e7dd
o pv->system_id
2001-10-11 13:22:51 +00:00
Joe Thornber
ece1fe835c
o vg->pv_act
2001-10-11 13:05:55 +00:00
Joe Thornber
ab47fb661f
o calculate pv_numbers and lv_numbers for LVM1 support
2001-10-11 10:55:19 +00:00
Joe Thornber
491ae26f6c
o pe_start wasn't being set properly when exporting to disk
...
o added a check for lv's with null lv_name
o setup pv->lv_cur correctly
o test program for vg_write
2001-10-11 10:08:44 +00:00
Joe Thornber
dcca4d2081
o sync
2001-10-10 17:11:31 +00:00
Alasdair Kergon
2d9133bbbd
standardise some log messages
2001-10-10 16:36:32 +00:00
Joe Thornber
aed3f57b3b
o allocate and zero the extents before exporting the lv's
2001-10-10 14:56:53 +00:00
Joe Thornber
398c218b03
o zero all of uuid
2001-10-10 13:33:20 +00:00
Joe Thornber
023c303501
o uuid_list->id should be NAME_LEN wide
2001-10-10 13:30:58 +00:00
Joe Thornber
7ca11f8f96
o sizeof(NAME_LEN), don't do that
2001-10-10 13:24:16 +00:00
Joe Thornber
e3de4ba830
o forgot to init a list head
2001-10-10 13:09:40 +00:00
Joe Thornber
0db56c6b55
o dev_write
2001-10-10 13:03:10 +00:00
Alasdair Kergon
90ae9fe928
Tidy metadata diagnostic messages.
2001-10-10 12:45:20 +00:00
Joe Thornber
214e32c96e
o return data not 1 in read_ov
2001-10-10 12:42:03 +00:00
Joe Thornber
4d468cffcd
o check for orphaned pv's when reading
2001-10-10 12:28:10 +00:00
Joe Thornber
88835ab641
o pv_setup for format1, this is the last one !
2001-10-10 10:55:55 +00:00
Joe Thornber
de9acc04f6
o pv_write for orphan pv's
2001-10-10 10:05:29 +00:00
Joe Thornber
6320fd9e52
o add munging for format1 and 2
2001-10-10 09:36:29 +00:00
Joe Thornber
755590409e
o Code to calculate the metadata layout.
2001-10-10 09:25:04 +00:00
Joe Thornber
11d9c9f2a5
o stub pv_write to stop tools crashing
2001-10-09 17:44:58 +00:00
Joe Thornber
39b3b91755
o fix seg fault while reading extents
2001-10-09 17:36:48 +00:00
Joe Thornber
a82ba3827c
o remove another spurious error message
2001-10-09 17:30:20 +00:00
Alasdair Kergon
0dc2a4d6e4
o vgremove.
...
o filter devices by major.
2001-10-09 17:20:02 +00:00
Joe Thornber
e15559aa3c
o spot empty list in build_vg
2001-10-09 17:09:46 +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
Joe Thornber
f2473d0efe
o remove spurious log message
2001-10-09 14:42:58 +00:00
Joe Thornber
83545752cf
o hack, hack, hack
2001-10-09 14:26:45 +00:00
Joe Thornber
87e8aeca40
o vg_write compiles
2001-10-09 10:47:52 +00:00
Joe Thornber
7a8c751a8f
o get_vgs works
2001-10-09 09:22:50 +00:00
Joe Thornber
47bd29840d
o pv_Read works
2001-10-09 08:58:52 +00:00
Joe Thornber
4c9c080e07
o get_pvs now works for format 1
2001-10-09 08:11:52 +00:00
Joe Thornber
c8ca2a2993
o get_pvs for format 1
...
o fix vg_read if vg doesn't exist
2001-10-08 17:53:43 +00:00
Joe Thornber
67905e0d59
o added pretty printing to read_vg_t, run this on your system
...
to see what vg's you've got
S: ----------------------------------------------------------------------
2001-10-08 17:28:49 +00:00
Joe Thornber
f5f8443131
o read_vg works (or so it claims)
2001-10-08 16:08:16 +00:00
Joe Thornber
721128e86d
o sync
2001-10-08 12:11:33 +00:00
Joe Thornber
9761650d1f
o read_vg_t compiles
2001-10-08 10:20:25 +00:00
Joe Thornber
812efa0f48
o get things compiling
2001-10-08 09:45:16 +00:00
Joe Thornber
d81ec60d19
o test program for reading a vg
2001-10-08 08:47:27 +00:00
Joe Thornber
df765ac1c8
o end of day sync
2001-10-05 16:36:53 +00:00
Joe Thornber
06985de900
o replace {stack; return 0;}'s with a macro (just for this file).
2001-10-05 15:48:05 +00:00
Joe Thornber
9d3f8b7144
o low level write path
2001-10-05 15:20:40 +00:00
Joe Thornber
064c620fb0
o finished writing extent reading code
2001-10-05 13:59:44 +00:00
Joe Thornber
3840b20ac9
o vg_read for format1
2001-10-04 17:48:55 +00:00