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