Alasdair Kergon
79982c59a0
.export.sym generation
2004-03-26 14:51:23 +00:00
Alasdair Kergon
aff059ecc2
cmdlib logging function
2004-03-26 14:47:14 +00:00
Alasdair Kergon
84510264cd
Update makefiles (incl. cmdlib).
2004-03-26 13:21:12 +00:00
Alasdair Kergon
d24fb77c03
Rebaseline internal verbose level.
2004-03-26 11:45:01 +00:00
Alasdair Kergon
f2046e0aeb
Only print warning message once when compiled without libdevmapper.
2004-03-19 16:26:46 +00:00
Alasdair Kergon
68df28296d
Fix lvreduce pv extents calculations.
2004-03-19 16:19:41 +00:00
Alasdair Kergon
658b58129b
additional activation functions
2004-03-08 18:54:13 +00:00
Alasdair Kergon
814643d8a2
rename config file vars & always use / as separator
2004-03-08 18:28:45 +00:00
Alasdair Kergon
de17d760ba
host tags
2004-03-08 18:13:22 +00:00
Alasdair Kergon
a0313876e7
move hostname into global
2004-03-08 17:25:59 +00:00
Alasdair Kergon
cf6dd25126
tagging
2004-03-08 17:19:15 +00:00
Alasdair Kergon
5071196631
More str_list fns.
2004-03-08 15:23:01 +00:00
Alasdair Kergon
c2b067912b
File missed from last checkin.
2004-02-18 13:06:21 +00:00
Alasdair Kergon
69792976e4
Basic internationalisation support.
2004-02-13 22:56:45 +00:00
Alasdair Kergon
08c419da66
Don't recurse symlinked dirs such as /dev/fd on 2.6.
2004-02-13 18:55:43 +00:00
Alasdair Kergon
a43a1312d2
don't inline pool_zalloc(); lift duplicated pool_str(n)dup to pool.c
2004-02-13 15:38:54 +00:00
Alasdair Kergon
6e4b011dac
Don't inline hash _find
2004-02-13 15:36:58 +00:00
Alasdair Kergon
a8537e6f59
Sysfs block device filtering option for 2.6.
2004-02-13 14:46:04 +00:00
Alasdair Kergon
c1c0685e34
split_words()
2004-02-13 14:43:35 +00:00
Alasdair Kergon
82c86650e1
Define BLKGETSIZE64 on systems with out-of-date header files.
2004-01-27 20:53:57 +00:00
Alasdair Kergon
cc8f6e3dbc
If PV/VG uuids are missing, generate them from the pv/vg numbers.
...
[This situation could occur if the uuids were oritinally created by
LVM1 on a system without /dev/urandom.]
2004-01-09 19:18:20 +00:00
Alasdair Kergon
397b239bdf
Log full details when "VG data differs between PVs" error message occurs.
2004-01-02 14:04:44 +00:00
Alasdair Kergon
50b39413ac
Relax restriction on pe_start location when re-writing LVM1 metadata.
2003-12-09 17:51:39 +00:00
Alasdair Kergon
e19f549a11
Fix support for PVs on read only devices. [Still must set LVs read only]
2003-11-21 19:54:40 +00:00
Alasdair Kergon
ee8518bd9c
lvcreate should close the initialised snapshot device immediately.
2003-11-14 17:55:39 +00:00
Alasdair Kergon
27642fade0
Fix dev_zero() offset.
2003-11-13 23:55:03 +00:00
Alasdair Kergon
034db45e26
Immediate error on big memory allocations when --enable-debug.
2003-11-13 23:54:02 +00:00
Alasdair Kergon
c01f85420e
Missing include.
2003-11-13 18:47:22 +00:00
Alasdair Kergon
8c0388e487
vgmknodes also creates necessary nodes in /dev/mapper
2003-11-13 14:11:41 +00:00
Alasdair Kergon
f7dd6d8446
The LVM2 part of vgmknodes [still to do the non-devfs device-mapper bit].
2003-11-12 19:16:48 +00:00
Alasdair Kergon
12bb377f9b
Default to unlimited number of LVs/PVs in lvm2 format.
2003-11-06 20:33:34 +00:00
Alasdair Kergon
6078f63801
Prevent PV allocation bit getting changed for format_text orphans.
2003-11-06 20:15:13 +00:00
Alasdair Kergon
2dc95e1c41
Configuration-time O_DIRECT setting.
2003-11-06 17:14:06 +00:00
Alasdair Kergon
40e975869b
Add drbd.
2003-11-06 17:10:35 +00:00
Alasdair Kergon
3eb135f550
Fit locking bits into 1 byte.
2003-11-06 17:08:18 +00:00
Alasdair Kergon
fee16e1049
Cope better with LVM1 minor numbers & LV numbers.
2003-11-06 16:58:38 +00:00
Alasdair Kergon
207aa8a131
Fix exported format1 VG recognition.
2003-10-21 22:21:41 +00:00
Alasdair Kergon
cfb7bfc7d9
More consistent error code usage.
2003-10-21 22:06:07 +00:00
Alasdair Kergon
0cf96f33ea
Check no fs mounted before deactivating.
2003-10-21 22:00:36 +00:00
Alasdair Kergon
dcc31da516
dumpconfig to dump active configuration
2003-10-15 20:17:19 +00:00
Alasdair Kergon
c7ee8edc33
relax a scanning restriction
2003-10-15 20:10:11 +00:00
Alasdair Kergon
ada0dc4234
Prevent creation of MDA bigger than disk.
2003-10-15 20:06:37 +00:00
Alasdair Kergon
ac21f47034
more str_list fns
2003-10-15 20:04:29 +00:00
Alasdair Kergon
13057fe53f
str_list_del
2003-10-15 20:01:12 +00:00
Alasdair Kergon
aa37899857
Extract some common functions.
2003-09-17 20:35:57 +00:00
Alasdair Kergon
842a35c7ca
Remove incorrect comments.
2003-09-16 16:23:21 +00:00
Alasdair Kergon
b2a849142b
Fix read-only snapshot creation.
2003-09-16 16:08:05 +00:00
Alasdair Kergon
85c1926171
Improve segment merge/split code.
2003-09-15 18:22:50 +00:00
Alasdair Kergon
96bea84664
vgcfgrestore -l lists backup file too
2003-09-15 15:03:22 +00:00
Alasdair Kergon
6a5b803539
Don't use !# in randomly-generated uuids.
2003-09-15 14:58:43 +00:00
Alasdair Kergon
f1e6be4be1
Additional validation of LV segments read from metadata. [HM]
2003-09-01 19:55:16 +00:00
Alasdair Kergon
8fd3c219fd
Fix unsafe list iteration in segment merge code. [HM]
2003-08-27 15:30:39 +00:00
Alasdair Kergon
29ebccc3e2
Cope better when format functions are missing.
2003-08-26 21:12:06 +00:00
Alasdair Kergon
4c22730b53
Some tidyups and minor fixes.
2003-08-20 15:48:27 +00:00
Alasdair Kergon
9a90f1aba6
Remove small hard-coded activation target line parameter limit.
2003-08-20 12:53:57 +00:00
Alasdair Kergon
21a1fa4701
Accept signed numbers in config file.
2003-07-15 16:32:20 +00:00
Alasdair Kergon
10f57523d9
Fix vgimport fix to work outside debug mode.
2003-07-15 01:26:24 +00:00
Alasdair Kergon
eaabdc26ce
Fix detection of exported LVM1 volume groups.
2003-07-13 11:07:25 +00:00
Alasdair Kergon
a12c4af876
Fix inactive snapshot display.
2003-07-11 17:09:21 +00:00
Alasdair Kergon
27ab6e0f86
Driver version 1 compatibility fix for snapshots.
2003-07-05 23:24:10 +00:00
Alasdair Kergon
914c97239f
Another sync point - numerous fixes & clean ups.
2003-07-04 22:34:56 +00:00
Alasdair Kergon
46a68b7dd6
move functions
2003-05-06 12:22:24 +00:00
Alasdair Kergon
44c319cf0d
move fields
2003-05-06 12:06:02 +00:00
Alasdair Kergon
8b99c8b6ec
reset_locking()
2003-05-06 12:03:13 +00:00
Alasdair Kergon
2fc3a4576f
Move fields.
2003-05-06 12:02:36 +00:00
Alasdair Kergon
9a5e05a406
list_next
2003-05-06 12:01:13 +00:00
Alasdair Kergon
9019ed2e77
Add argv
2003-05-06 12:00:51 +00:00
Alasdair Kergon
b9e67d4f46
Distinguish between visible & top level devices.
2003-05-06 12:00:29 +00:00
Alasdair Kergon
6faef15ecd
add region size & interval
2003-04-30 15:27:48 +00:00
Alasdair Kergon
10b29b8d2d
pvmove support
2003-04-30 15:26:25 +00:00
Alasdair Kergon
8afb045af2
Add mirror.c
2003-04-30 15:24:49 +00:00
Alasdair Kergon
97d344e2cb
basic pvmove support
2003-04-30 15:23:43 +00:00
Alasdair Kergon
5053603d2a
pvmove flag
2003-04-30 15:22:52 +00:00
Alasdair Kergon
7b44156315
mirror type
2003-04-30 15:22:36 +00:00
Alasdair Kergon
9d6e5a6387
mirror display type
2003-04-30 15:21:43 +00:00
Alasdair Kergon
4b7af6da11
Add comment
2003-04-30 15:21:10 +00:00
Alasdair Kergon
fe451a01e8
Try alternative syncs if BLKFLSBUF fails.
2003-04-28 16:20:39 +00:00
Alasdair Kergon
662b119be6
Extra metadata-reading debug message.
2003-04-28 12:18:53 +00:00
Alasdair Kergon
eb8ae8e837
Update segment area length when merging consecutive segments.
2003-04-24 22:46:47 +00:00
Alasdair Kergon
b8c919b402
o Metadata area struct change.
...
o Support physical extent restrictions on PV lists for allocations
e.g. lvcreate -l 200 vg1 /dev/sda1:100-199:300-399
2003-04-24 22:23:24 +00:00
Alasdair Kergon
a3f950d56f
stripe filler parameter
2003-04-24 22:10:56 +00:00
Alasdair Kergon
a9953411a8
o Rejig activation code device dependencies to make things a bit more robust
...
and further reduce the number of ioctl calls made.
o Metadata area struct change.
o Make config file accessible to activation functions & get stripe_filler
from it.
o Allow kernel to return snapshot status as a fraction or a percentage.
2003-04-24 22:09:13 +00:00
Alasdair Kergon
9a079266dd
Add pool_strndup
2003-04-24 21:58:34 +00:00
Alasdair Kergon
010c07de20
Improve message for pvcreate of empty device.
2003-04-22 16:09:11 +00:00
Alasdair Kergon
b896caa19b
Improve build robustness.
2003-04-15 13:24:42 +00:00
Alasdair Kergon
5beb6fab74
Abort if any filter creation fails.
2003-04-15 13:22:43 +00:00
Alasdair Kergon
258c50db74
Cope with intentionally missing /proc.
2003-04-15 13:21:38 +00:00
Alasdair Kergon
446155d94f
Support snapshot status fraction.
2003-04-15 13:20:16 +00:00
Alasdair Kergon
27f364af95
Allow for specification of major number as well as minor.
2003-04-02 19:14:43 +00:00
Alasdair Kergon
34e0f798e3
size_t tidying
2003-04-02 19:11:23 +00:00
Alasdair Kergon
26e7f2e0c4
Tidy various pre-processing incl. making libdl optional.
2003-03-24 18:08:53 +00:00
Alasdair Kergon
3a1703294b
Fix incomplete munmap. (pjc)
2003-03-20 14:29:28 +00:00
Joe Thornber
712a874f07
HAT_CHAR and DOLLAR_CHAR were defined to the same value !
2003-02-20 14:53:56 +00:00
Alasdair Kergon
7e4867f743
LV name validation
2003-02-03 20:09:58 +00:00
Alasdair Kergon
c0002e576e
Identifiers may now start with digits etc.
2003-02-03 20:08:45 +00:00
Alasdair Kergon
efb63f4740
Allow strings in single quotes too
2003-01-28 17:20:11 +00:00
Alasdair Kergon
41102098e5
Treat 'section{' as equivalent to 'section {'
2003-01-28 16:07:04 +00:00
Alasdair Kergon
79be52c881
Indicate full (dropped) snapshot.
2003-01-21 18:50:50 +00:00
Alasdair Kergon
a421f74371
vgreduce --removemissing to remove missing PVs & deps & make VG consistent
2003-01-17 21:04:26 +00:00
Alasdair Kergon
711f7fc681
Activation commands now return success in test mode.
2003-01-17 20:16:23 +00:00
Alasdair Kergon
e9ea1fb3bf
Fix (rare) cache bug on machines with large /dev directories.
2003-01-10 19:14:01 +00:00
Alasdair Kergon
04e8cd96f3
Fix segfault in uuid display (substitution missed during bulk change)
2003-01-09 19:35:17 +00:00
Alasdair Kergon
199e490e7d
configure --disable-devmapper if you don't have libdevmapper
2003-01-08 22:44:07 +00:00
Alasdair Kergon
4970ebfb92
o Additional device/filter-level debugging messages + duplicate alias fix
...
o 32/64-bit size_t fix (pjc)
2003-01-08 16:41:22 +00:00
Alasdair Kergon
f3f3424f9a
Detect duplicate PV uuids - select the one on an md device if appropriate.
2003-01-06 21:10:43 +00:00
Alasdair Kergon
fdf481c665
Ignore filter cache at startup if config file is newer than cache.
2003-01-06 21:09:04 +00:00
Alasdair Kergon
4aae68792c
When there are device name aliases, choose the "nicest" to display.
2003-01-03 21:11:23 +00:00
Alasdair Kergon
4e268ceacb
Also lock memory during LV updates.
2003-01-03 21:10:28 +00:00
Alasdair Kergon
4086fb2620
When activating an LV, remove any stray LVM1 /dev nodes and group file.
2003-01-03 13:50:47 +00:00
Alasdair Kergon
8ef2b021ed
Default stripesize 64k & config file setting for it;
...
Clear many compiler warnings (i386) & associated bugs - hopefully without
introducing too many new bugs:-) (Same exercise required for other archs.)
Default compilation has optimisation - or else use ./configure --enable-debug
2002-12-19 23:25:55 +00:00
Alasdair Kergon
4c64ed4ced
New column-based reporting tools: lvs, pvs & vgs.
2002-12-12 20:55:49 +00:00
Alasdair Kergon
69e2befd15
Use sync_dir().
2002-12-05 22:56:22 +00:00
Alasdair Kergon
0fc1d0788d
Add sync_dir()
2002-12-05 22:51:15 +00:00
Alasdair Kergon
28879d4174
Fix display alignment of zero.
2002-12-05 22:42:31 +00:00
Alasdair Kergon
8a95d67e26
Maintain snapshot_count correctly.
2002-12-05 22:30:39 +00:00
Alasdair Kergon
a14e14efdd
Keep some ld versions happy.
2002-12-05 22:27:43 +00:00
Alasdair Kergon
a648372757
New devices/types config file entry to add new types of block devices.
2002-12-03 16:20:38 +00:00
Alasdair Kergon
11779747ef
Show PV uuid; single stripe is 'linear'; suppress snapshot fields for origin.
2002-12-03 13:26:17 +00:00
Alasdair Kergon
66a8d8b4b2
Show stripesize in KB.
2002-11-26 21:56:57 +00:00
Alasdair Kergon
22d2827b41
Skip config file reload attempt if no config file location.
2002-11-26 12:14:37 +00:00
Alasdair Kergon
50d7e96c6d
Remove 2 TB LV size restriction message.
2002-11-18 16:21:00 +00:00
Alasdair Kergon
c3aa104a8d
Missing sector->k conversion in "logical volumes cannot be larger than" mesg.
2002-11-18 16:08:45 +00:00
Alasdair Kergon
5a52dca9c2
Some new features.
2002-11-18 14:04:08 +00:00
Alasdair Kergon
d1d9800ef1
Refactoring.
2002-11-18 14:01:16 +00:00
Alasdair Kergon
74b27447c1
A new cache.
2002-11-18 13:53:58 +00:00
Alasdair Kergon
f2187638dc
Don't let LVM2 access a VG if the original LVM driver appears to be using it.
2002-11-01 19:57:25 +00:00
Joe Thornber
6086b60455
o inline _step_matcher
2002-08-29 15:05:16 +00:00
Joe Thornber
22a0881ded
o Anchor support for the regex engine.
2002-08-29 14:46:30 +00:00
Patrick Caulfield
da253e3aac
Remove O_DIRECT as it causes problems with some systems.
...
Harumph.
2002-08-14 14:58:00 +00:00
Joe Thornber
b1545f2985
o Make sure the status parsing code can deal with an empty array.
2002-08-01 12:51:48 +00:00
Joe Thornber
07bb413a8f
o Added new value type CFG_EMPTY_ARRAY, to indicate '[]', useful since we use
...
the arrays to hold a symbolic set of flags.
2002-08-01 12:46:52 +00:00
Joe Thornber
ffa879d092
o 0 was used rather than NULL in a couple of places.
...
o Indent output with tabs rather than single spaces.
2002-08-01 08:22:09 +00:00
Patrick Caulfield
7a0ed4a40c
Rename lock_resource to file_lock_resource to avoid name clashes
2002-07-25 09:04:30 +00:00
Patrick Caulfield
6b3b4a250b
Use O_DIRECT for writing to devices.
...
Doesn't work on HPPA due to a kernel bug but other archs shuld be OK.
2002-07-22 08:10:54 +00:00
Alasdair Kergon
12caf445d4
Remove hard-coded extent_size from snapshot target (field no longer used).
2002-07-17 17:00:54 +00:00
Joe Thornber
7cc602c800
i) Add the VISIBLE flag to the text format. (Other changes are pending
...
for lib/activate.)
2002-07-11 15:28:49 +00:00
Joe Thornber
291906a208
i) Added a little macro to aid defining the status flags.
2002-07-11 14:36:45 +00:00
Joe Thornber
097d49e73d
i) There's now a seperate field in struct logical_volume that stores the
...
allocation policy. This can currently take one of three values:
typedef enum {
ALLOC_NEXT_FREE,
ALLOC_STRICT,
ALLOC_CONTIGUOUS
} alloc_policy_t;
Notice that 'SIMPLE' has turned into the slightly more meaningful NEXT_FREE.
ii) Put code into display.[hc] for converting one of these enums to a
text representation and back again.
ii) Updated the text format so this also has the alloc_policy field.
2002-07-11 14:21:49 +00:00
Alasdair Kergon
407332cb9a
tidy
2002-07-11 14:09:26 +00:00
Alasdair Kergon
48450b8f43
Add get_config_str
2002-07-11 14:07:43 +00:00
Patrick Caulfield
38f3949b25
Don't log an error if we can't write the cache file because the FS is read-only.
...
Gets rid of that annoying error at shutdown.
2002-07-11 09:23:29 +00:00
Alasdair Kergon
48ad31920d
Add --ignorelockingfailure
2002-07-10 20:43:32 +00:00
Alasdair Kergon
0dbd22124b
Merge adjacent "Missing" segments.
2002-07-10 13:54:17 +00:00
Joe Thornber
7df3006c6b
o Add version number to text format.
2002-07-02 18:47:43 +00:00
Patrick Caulfield
b40b90f035
Flush on open as well as close.
2002-06-25 14:02:28 +00:00
Patrick Caulfield
aefa3c6d82
Get rid of compile warnings on 64bit platforms.
2002-06-07 08:37:07 +00:00
Alasdair Kergon
70d6838fb0
Tidy
2002-05-31 19:28:37 +00:00
Alasdair Kergon
61e9603be5
Remember to update VG free_count when reducing size of an LV.
2002-05-30 16:08:19 +00:00
AJ Lewis
fa6a82c9af
o fix changed function names
2002-05-23 14:13:21 +00:00
Alasdair Kergon
5f05971a84
Fix LVM1 backwards compatibility issue when LV with a low LV number is deleted.
2002-05-23 11:37:51 +00:00
Alasdair Kergon
c826c0d17c
Rename; add some FIXMEs.
2002-05-22 14:03:45 +00:00
Alasdair Kergon
1f835295d8
Revert to standard linux macros (for correct behaviour on rare architectures).
2002-05-21 12:37:07 +00:00
Andres Salomon
6106741bea
ack, missing include
2002-05-19 04:11:34 +00:00
Andres Salomon
6e0fa64c7b
update create_dir() comment
2002-05-19 03:52:38 +00:00
Andres Salomon
310a81c90c
support recursive mkdir in create_dir()
2002-05-19 03:46:34 +00:00
Alasdair Kergon
031079703f
Rewrite missing/corrupt metadata in more cases.
2002-05-13 12:38:54 +00:00
AJ Lewis
39ed033adb
o the _status fxns now take more arguments - this way i don't get the
...
preparsed status info, shove it all into a string, and then parse it
again to get the info back out (which is what i was doing before)
o basically that's it...i like this *much* better than the previous
method and i think it makes the _status fxn more flexible if we need
to use it to get other info out.
2002-05-10 16:06:06 +00:00
AJ Lewis
1951dba955
o Actually read snapshot percentage from the kernel - what a pain! :)
...
o Not sure if the code in dev_manager is really optimal, but it works..
will look at adjusting it a bit now.
o I *think* it works right when one snapshot if full but others aren't,
but I haven't really been able to test it because the full snapshot
somehow resets itself and weird things start happening to the system...
2002-05-09 21:17:57 +00:00
Alasdair Kergon
64ad493eac
Remove a no-op.
2002-05-09 12:03:55 +00:00
AJ Lewis
29152f6ef0
o header should only be printed once...
2002-05-08 17:58:52 +00:00
AJ Lewis
fccc39a3a7
o Added function find_snapshots to snapshot_manip.c that returns a list
...
of snapshots whose origin is the lv passed in.
o Used this new function to make lvdisplay properly display all snapshots
attached to a origin.
2002-05-08 16:57:46 +00:00
Andres Salomon
8ac9aae78a
implement our own swabbing functions, instead of relying on the kernel's.
2002-05-07 15:28:59 +00:00
Alasdair Kergon
c5e08c6c83
Default values for some display output settings
2002-05-07 12:50:01 +00:00
Alasdair Kergon
5be981bab5
Tweaks
2002-05-07 12:47:11 +00:00
Andres Salomon
b9923fe3f2
Make lvm2 compile on big endian archs; use the kernel/glibc's endian
...
conversion stuff, instead of implementing our own. Tested on a little
endian system (x86); I'll let the debian handle big endian testing. :)
2002-05-07 05:54:14 +00:00
AJ Lewis
b7749b7a96
o Will now correctly remove expired achive files from the system when
...
archive_vg is called.
o Added a #define to the top of the file - not sure if this is the
appropriate place for it though
2002-05-03 19:28:07 +00:00
Alasdair Kergon
6b4c9ff740
Some partial VG support with format_text.
2002-04-30 17:12:37 +00:00
Alasdair Kergon
e1f93d52e3
get_vgs must check for text format VGs when no lvm1 format VGs present
2002-04-30 12:27:13 +00:00
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
Joe Thornber
e3528bcda7
o Stop printing errors if flushing fails (could be an unconfigured device).
2002-04-24 08:37:34 +00:00
Alasdair Kergon
de3bec7f81
Missing seg->lv gives segfault when activating from text format.
2002-04-16 19:41:54 +00:00
Alasdair Kergon
69e8a53ee4
Allow deactivation of final snapshot.
2002-04-16 14:42:20 +00:00
Alasdair Kergon
7e3d403b88
Implement a no_locking module that *does* attempt activation.
2002-04-11 14:10:32 +00:00
Patrick Caulfield
584404f8f4
Return status from _lv_activate and friends.
...
Alasdair, I think this is right (and I need it) but you may like to check.
2002-04-11 09:14:04 +00:00
Patrick Caulfield
426bc429ef
Remove \n from log messages.
2002-04-10 15:49:47 +00:00
Joe Thornber
f31c47ade8
o Perform a BLKFLSBUF ioctl whenever a block device is closed.
...
Patrick, can you see if this fixes your cluster syncing problem please ?
If so I'll make it so it only syncs if you have actually written to the
device.
2002-04-08 18:59:50 +00:00
Patrick Caulfield
2fab033e9b
Implement an external locking interface.
2002-04-08 16:04:50 +00:00
Patrick Caulfield
c34d34e6a0
Fix prototype.
2002-04-08 13:35:09 +00:00
Alasdair Kergon
ab053ad6c1
Fix lv_setup() not to generate a new lvid each time if asked to setup the
...
same LV more than once - subsequent times validate only.
2002-04-05 14:32:22 +00:00
Patrick Caulfield
ae70673752
Make lock type numbers match the DLM numbers in use, and move UNLOCK out
...
of the way.
2002-04-04 13:31:21 +00:00
Alasdair Kergon
8856889d10
Rename LCK_NONE to LCK_UNLOCK
2002-04-04 11:18:45 +00:00
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
c1b5fc6673
Fix typo.
2002-03-25 18:50:37 +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
a6bf4bcfa2
New function to enable suppression of messages to stdout/stderr.
2002-03-15 22:54:04 +00:00
Alasdair Kergon
568d7229bf
Review locking: block signals instead of ignoring them and restore state
...
afterwards; avoid race condition with unlink; add LCK_HOLD to process_each_vg.
2002-03-15 16:07:38 +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
fdec53fb9c
o Add a line to lvdisplay to say if the volume is a snapshot.
2002-03-04 15:12:30 +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
Joe Thornber
7b9e789f9c
o Remove the vg argument from find_cow
2002-02-25 11:55:39 +00:00
Joe Thornber
b00094bdeb
o hash_iterate -> hash_iter
2002-02-25 11:54:15 +00:00
Joe Thornber
7e682f4f93
o Added a macro called hash_iterate, that is similar to list_iterate
...
o Renamed hash_iterate function, hash_iter.
2002-02-25 11:52:58 +00:00
Alasdair Kergon
bb403f3361
indent
2002-02-24 22:31:55 +00:00
Patrick Caulfield
6f3a8d5bd3
Fill in format_text functions.
...
Sort of seems to work.
2002-02-22 11:44:56 +00:00
Alasdair Kergon
187cf4c97d
o Convert lv->id back to lv_number when writing back to disk
...
o Use first unused lv_number when creating new LV
o Use lv_number for refs to snapshots
o Update persistent minor logic after the lvcreate restructure
o Reset all parameters before use in lvcreate.
2002-02-21 19:04:37 +00:00
Heinz Mauelshagen
257ec146b2
Avoid ambigous volume_group argument in vg_add_snapshot()
2002-02-21 18:31:48 +00:00
Alasdair Kergon
b5ed53273a
Generate LV uuid from lv_number when reading in LVs.
2002-02-21 15:26:44 +00:00
Joe Thornber
e680d3190f
o typo
2002-02-21 10:17:01 +00:00
Joe Thornber
0e32e054df
o add find_cow function.
2002-02-21 10:16:33 +00:00
Alasdair Kergon
cc8b2cd706
Try out using LV locking for reactivation.
2002-02-20 21:30:27 +00:00
Alasdair Kergon
14a81c5a03
Remove lv_update_write_access: use lv_reactivate directly now instead.
2002-02-20 21:28:22 +00:00
Alasdair Kergon
078cab224b
Suppress meaningless <backtrace> msg on screen (no prog/line number given)
2002-02-20 21:26:40 +00:00
Alasdair Kergon
bf1b684e2e
lvd->lv_access & LV_SNAPSHOT not lvd->lv_status
2002-02-20 21:24:45 +00:00
Alasdair Kergon
b6afcf6458
Remove VG arg from lv_is_cow() and lv_is_origin() - use lv->vg instead.
2002-02-20 19:04:55 +00:00
Alasdair Kergon
a45f546fe0
o Use 'pvcreate --setphysicalvolumesize' with no short form (instead of -s)
...
and add severe warning if it's used to make a device seem bigger than
it really is. This is not an option people should be using as it
breaks metadata integrity.
o Use uint64_t throughout (rather than unsigned long long)
o Convert a few messages that contain pathnames into the more common form:
pathname: message
2002-02-20 18:29:30 +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
d7783cc8b8
o small bug in the format1 export code for snapshots.
...
o tidied newlines in the snapshot section of format text.
2002-02-18 11:25:43 +00:00
Heinz Mauelshagen
e1d93eb457
Second path on "pvcreate -s"
2002-02-15 14:33:59 +00:00
Heinz Mauelshagen
f48d3bcbd0
First cut on "pvcreate -s"
2002-02-15 01:26:16 +00:00
Joe Thornber
e56598a84d
o Initialise the snapshot list properly in vgcreate.
2002-02-14 15:06:24 +00:00
Joe Thornber
0d3075f5ba
o Define _read_uint32
2002-02-14 14:52:21 +00:00
Heinz Mauelshagen
69019d6e9e
test printf removed
2002-02-13 21:30:51 +00:00
Heinz Mauelshagen
df89b641bb
LV maximum size limit of 2TB ensured in _lv_setup()
2002-02-13 21:28:56 +00:00
Heinz Mauelshagen
00a9d5417a
spaces
2002-02-13 21:28:15 +00:00
Heinz Mauelshagen
e5e5d6decd
> 2TB numbers in vgdisplay_full
2002-02-13 20:21:13 +00:00
Joe Thornber
294ddff8a6
o snapshot support for the text format.
...
The logical_volumes, and snapshots sections of the text format are now
optional.
2002-02-13 13:29:16 +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
Patrick Caulfield
f09d2b350f
use portable <inttypes.h> macros for printing.
2002-02-12 14:12:13 +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
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
Joe Thornber
7e38924de5
o forgot to retry on EINTR or EAGAIN, doh !
2001-10-23 11:16:30 +00:00
Joe Thornber
63408276f9
o forgot 'static'
2001-10-22 14:40:31 +00:00
Joe Thornber
12eabe3031
o composite filter that allows us to merge filters. Think of it as &&'ing
...
filters in order.
eg,
f = composite_filter_create(2, regex_filter, persistent_filter);
ownership of the filters passes, they will be destroyed when f's
destroy method is called.
2001-10-22 14:39:12 +00:00
Joe Thornber
5f16718b19
o Filter which caches valid devices in a file. Pass in init == 1 to the
...
constructor if you want it to ignore the existing cache and check every
device again (eg, vgscan, pvscan).
2001-10-22 14:14:00 +00:00
Alasdair Kergon
c4151d1aa4
reinstate a removed line
2001-10-22 13:44:09 +00:00
Joe Thornber
98af757b00
o tidying
2001-10-21 10:24:10 +00:00
Joe Thornber
291ec3b6c0
o Filter for the dev cache that takes values from config file:
...
devices {
# first match is final, eg. /dev/ide/cdrom
# get's rejected due to the first pattern
filter=["r/cdrom/", # don't touch the music !
"a/hd[a-d][0-9]+/",
"a/ide/",
"a/sd/",
"a/md/",
"a|loop/[0-9]+|", # accept devfs style loop back
"r/loop/", # and reject old style
"a/dasd/",
"a/dac960/",
"a/nbd/",
"a/ida/",
"a/cciss/",
"a/ubd/",
"r/.*/"] # reject all others
}
Alasdair this is ready to roll into the tools now.
2001-10-19 18:20:37 +00:00
Joe Thornber
d1b28647ed
o First pass at the regex code. lib/regex/matcher takes an array of regex's
...
and builds a *very* efficient engine that will tell you which regex a string
matches with only a single pass through the string. To be used in the config
file when specifying devices.
o Anchor's aren't supported yet (^ and $) but that won't take long.
o Also when we get some realistic config files we may want to consider adding an
extra level of indirection to the dfa state in order to compress the table.
It all depends on how large typical tables get.
2001-10-19 14:36:57 +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
ffb3162116
vgextend
2001-10-15 22:04:27 +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
Alasdair Kergon
9711fef759
vgcreate
2001-10-12 12:21:43 +00:00
Joe Thornber
2cb6249206
o make ios the first argument to pv_create
2001-10-12 10:52:32 +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
758b8b4ba0
o builds a very sub-optimal table
2001-10-10 15:30:31 +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