Alasdair Kergon
1165258cda
Alignment tidying.
2005-04-06 13:47:41 +00:00
Alasdair Kergon
0a0f13e600
Add --ignorelockingfailure to vgmknodes.
2005-04-04 14:44:49 +00:00
Alasdair Kergon
969e08da0f
Drop-in devmap_name replacement.
2005-03-27 11:37:46 +00:00
Alasdair Kergon
343a8c920d
Add clustered attribute so vgchange can identify clustered VGs w/o locking.
2005-03-21 22:55:12 +00:00
Alasdair Kergon
e5b836d2d6
Improve detection of external changes affecting internal cache.
2005-03-21 22:40:35 +00:00
Alasdair Kergon
200ef4db90
Add -a to pvdisplay -C.
2005-03-21 14:47:36 +00:00
Alasdair Kergon
7e0b7fd0e5
Avoid some compiler warnings.
2005-03-10 22:34:17 +00:00
Alasdair Kergon
b9565b406a
Cope with new devices appearing by rescanning /dev if a uuid can't be found.
2005-03-08 13:46:17 +00:00
Alasdair Kergon
8f5d81cbc8
Remove DESTDIR from LVM_SHARED_PATH.
2005-03-08 13:39:39 +00:00
Alasdair Kergon
432cd1e47a
Option to suppress warnings of file descriptors left open.
2005-03-03 22:09:20 +00:00
Alasdair Kergon
8e3a97baf2
Static binary invokes dynamic binary if appropriate.
2005-02-18 18:58:31 +00:00
Alasdair Kergon
3ef1aceed6
lvm2cmd.so should skip the check for open fds.
2005-02-03 16:34:53 +00:00
Alasdair Kergon
421c2a6aed
Remove unused -f from pvmove
2005-02-02 14:31:48 +00:00
Alasdair Kergon
7851b13bc4
Fix snapshot device size bug (since 2.01.01).
2005-01-27 15:48:49 +00:00
Alasdair Kergon
52f9afec22
Always fail if random id generation fails.
2005-01-20 18:11:53 +00:00
Alasdair Kergon
68e4adb561
Add some comments.
2005-01-19 17:31:51 +00:00
Alasdair Kergon
3f7f3fe415
move recover_vg
2005-01-19 17:30:50 +00:00
Alasdair Kergon
c45a8a2c1c
Store snapshot and origin sizes separately.
2005-01-19 17:19:39 +00:00
Alasdair Kergon
73543ee70d
Fix vgscan metadata auto-correction.
2005-01-17 18:24:28 +00:00
Alasdair Kergon
e9c761b869
Only ask libdevmapper for open_count when we need it.
2005-01-12 22:58:21 +00:00
Alasdair Kergon
8e2dd0dfb2
Add dm_task_no_open_count() to skip getting open_count.
2005-01-12 22:10:14 +00:00
Alasdair Kergon
2245e1c41f
pvcreate wipes first 4 sectors unless given --zero n.
2005-01-05 17:25:25 +00:00
Alasdair Kergon
01a0beedce
Fix an error fprintf.
2004-12-22 21:47:31 +00:00
Alasdair Kergon
bc0d0ce072
Fix vgdisplay -s. Breaks (undocumented) lvs/pvs/vgs -s instead for now.
2004-12-21 21:40:36 +00:00
Alasdair Kergon
8c9a1d6a3d
Fix pvchange -x segfault with lvm2-format orphan.
2004-12-21 16:12:02 +00:00
Alasdair Kergon
09a7dce6be
Additional device-handling debug messages.
...
Additional verbosity level -vvvv includes line numbers and backtraces.
Verbose messages now go to stderr not stdout.
Close any stray file descriptors before starting.
Refine partitionable checks for certain device types.
Allow devices/types to override built-ins.
2004-12-10 16:01:35 +00:00
Alasdair Kergon
82416639c4
Only wipe signature bytes when destroying md superblock, so process
...
is reversible.
2004-11-19 19:32:09 +00:00
Alasdair Kergon
5ab925debf
pvcreate wipes md superblocks. (With --uuid or --restorefile it prompts.)
2004-11-19 19:25:07 +00:00
Alasdair Kergon
0ec78e9862
Prevent snapshot origin resizing.
2004-11-18 19:49:48 +00:00
Alasdair Kergon
c27dc4e757
Improve a vgremove error message.
2004-11-18 19:45:53 +00:00
Alasdair Kergon
63bea03ed1
More man page updates.
2004-11-16 18:09:32 +00:00
Alasdair Kergon
d6cf43252e
Update some man pages.
2004-11-12 15:59:09 +00:00
Alasdair Kergon
b55c16aaf6
Also accept y/n with -ae.
2004-11-12 15:58:26 +00:00
Alasdair Kergon
cb8920e642
Fixes to lvcreate vgname processing.
2004-10-15 15:53:18 +00:00
Alasdair Kergon
45ae32da38
Add --noheadings option to dmsetup -c for colon-separated output.
2004-10-12 16:42:40 +00:00
Alasdair Kergon
3f096a6c45
Support device referencing by uuid or major/minor.
2004-10-01 19:11:37 +00:00
Alasdair Kergon
0c4f1a94c1
Use macro in vgremove locking fix.
2004-09-27 10:32:36 +00:00
Patrick Caulfield
f4ae9ae153
Hold VG lock while doing vgremove.
...
agk - you may want to check this.
2004-09-24 12:48:43 +00:00
Alasdair Kergon
c4ddb31abf
Rename old segtypes files to segtype.
2004-09-16 18:40:56 +00:00
Alasdair Kergon
e26c4fd2a2
Some fixes to memory debugging code.
...
Exclude internal commands formats & segtypes from install.
2004-09-16 16:53:39 +00:00
Alasdair Kergon
ae0f5bc26a
Add formats & segtypes files.
2004-09-15 15:27:26 +00:00
Alasdair Kergon
156dd4f1ec
New commands 'segtypes' and 'formats'.
2004-09-14 16:42:46 +00:00
Alasdair Kergon
17d1ae7ee2
Suppress pvmove abort message in test mode.
2004-09-14 15:23:42 +00:00
Alasdair Kergon
b9ade4bc21
Improve pvcreate/remove device not found error message.
2004-09-14 14:54:58 +00:00
Alasdair Kergon
00b47204e0
Allow pvmove to move data within the same PV.
2004-09-14 13:59:17 +00:00
Alasdair Kergon
9bd40d31d7
Update pvmove prototype.
2004-08-18 18:49:29 +00:00
Alasdair Kergon
392b28ec5c
Support for PE ranges in pvmove source PV.
2004-08-17 22:09:02 +00:00
Alasdair Kergon
bcd4e5d50d
Remove duplicate line in pvremove help text.
2004-08-17 22:06:06 +00:00
Alasdair Kergon
eabaa3398b
Change alloc_areas to pe_ranges and allow suppression of availability checks.
2004-08-17 21:55:23 +00:00
Alasdair Kergon
824d251972
fix a newline
2004-07-03 18:15:14 +00:00
Alasdair Kergon
8bad033938
Fix device number handling for 2.6 kernels.
2004-07-01 15:14:29 +00:00
Alasdair Kergon
a58fef6faa
Add initrd-lvm to list of recognised argv[0]s. [pld-linux]
2004-06-29 13:27:19 +00:00
Alasdair Kergon
80992638e1
Fix LD_FLAGS->LDFLAGS. LD_DEPS->LDDEPS.
...
Update configure script: add --disable-selinux & some missing messages.
2004-06-28 14:01:24 +00:00
Alasdair Kergon
88be836f39
Fix vgchange (de)activation of (open) LVs.
2004-06-24 14:48:01 +00:00
Alasdair Kergon
244a32b3d5
Remove pv segments line from backport.
2004-06-20 15:14:31 +00:00
Alasdair Kergon
c29d24650d
Display all filtered devices, not just PVs, with pvs -a.
2004-06-19 19:27:00 +00:00
Alasdair Kergon
8d267798db
vgcfgbackup -f accepts template with %s for VG name.
2004-06-19 18:55:29 +00:00
Alasdair Kergon
b86ef8e2cb
Add local activation support.
2004-06-16 17:13:41 +00:00
Alasdair Kergon
32c5ad86ab
Add dmsetup -C for column-based output.
2004-06-16 16:44:12 +00:00
Alasdair Kergon
3f48434eb6
fsadm
2004-06-15 17:29:20 +00:00
Alasdair Kergon
1a9ea74d2d
lvresize + fsadm support - needs testing
2004-06-15 17:23:49 +00:00
Alasdair Kergon
5145e6e550
Clear message buffer before use.
2004-06-10 16:14:16 +00:00
Alasdair Kergon
62cec9b225
Support new target message ioctl.
2004-06-08 20:34:40 +00:00
Alasdair Kergon
30bab85be1
Fix rounding of large displayed sizes.
2004-06-07 15:22:43 +00:00
Alasdair Kergon
abaf083ddc
Additional kernel target checks before pvmove & snapshot creation.
2004-05-24 20:51:56 +00:00
Alasdair Kergon
7f0dc9c4cb
Remove error labels.
2004-05-24 15:58:50 +00:00
Alasdair Kergon
199fa12a3b
Fix a pvs error path.
2004-05-24 14:14:10 +00:00
Alasdair Kergon
36cfd88743
xxchange -ae to activation exclusively
2004-05-24 13:44:10 +00:00
Alasdair Kergon
29e94d9531
Don't return non-zero status if there aren't any volume groups
2004-05-20 16:18:58 +00:00
Alasdair Kergon
a0a23eff4b
Rename allocation policies; add --alloc to cmdline; LV inherits from VG.
2004-05-18 22:12:53 +00:00
Alasdair Kergon
63aead84ee
indent
2004-05-18 21:55:55 +00:00
Alasdair Kergon
241913fe60
Restructure lvresize, bringing it closer to lvcreate.
2004-05-11 18:47:40 +00:00
Alasdair Kergon
1a51586c0c
indent
2004-05-11 18:45:11 +00:00
Alasdair Kergon
1832f310ac
Add --type to lvcreate/resize.
...
Add virtual segment types, zero and error.
A large sparse device can be constructed as a writeable snapshot of a large
zero device.
2004-05-11 16:01:58 +00:00
Alasdair Kergon
1d2ebf6281
Push lv_create & alloc policy up to tool level.
2004-05-05 18:49:21 +00:00
Alasdair Kergon
9c333277cc
fix return code
2004-05-05 18:39:30 +00:00
Alasdair Kergon
e176106f14
Skip mirror LV. Comments.
2004-05-05 18:33:01 +00:00
Alasdair Kergon
e3adcd79d3
Detect invalid LV names in arg lists.
2004-05-05 18:31:38 +00:00
Alasdair Kergon
21cd8adc80
stray space
2004-05-05 18:27:56 +00:00
Alasdair Kergon
cb919290c2
Separate out polldaemon.
2004-05-05 17:56:20 +00:00
Alasdair Kergon
23289e6d14
Revise internal locking semantics.
2004-05-05 12:03:07 +00:00
Alasdair Kergon
5668c1abad
move find_pv_by_name to lib
2004-05-05 11:04:28 +00:00
Alasdair Kergon
4922197a33
Begin to separate out segment types.
2004-05-04 21:25:57 +00:00
Alasdair Kergon
25579907fc
Support tagged config files.
2004-05-04 18:28:15 +00:00
Alasdair Kergon
a38df97fb8
config option to avoid using install -o -g
2004-04-19 13:10:06 +00:00
Alasdair Kergon
96185e9ca1
Use 64-bit file functions.
2004-04-16 18:43:29 +00:00
Alasdair Kergon
0a62c911d1
lvm.static can be installed in different dir from rest of tools
2004-04-14 18:00:23 +00:00
Alasdair Kergon
7d1552c9de
Option for auto-fallback to LVM1 tools if running 2.4 without device-mapper.
2004-04-08 15:23:23 +00:00
Alasdair Kergon
c5ff6dfa74
More build fixes
2004-04-06 15:14:23 +00:00
Alasdair Kergon
3aa078436a
accept argv[0] lvm.static
2004-04-05 16:24:17 +00:00
Alasdair Kergon
3b8fe25248
Missing dev_close_all()s
2004-03-31 18:41:39 +00:00
Alasdair Kergon
6606c3ae81
Update copyright notices.
2004-03-30 19:35:44 +00:00
Alasdair Kergon
8b67f40de2
Update copyright messages.
2004-03-30 19:08:57 +00:00
Alasdair Kergon
8b07664860
Fix vgmknodes to remove dud /dev/mapper entries
2004-03-30 14:40:03 +00:00
Alasdair Kergon
22eb54036f
Move full mknodes functionality from dmsetup into libdevmapper.
2004-03-30 14:31:58 +00:00
Alasdair Kergon
a78374ae0d
and another typo
2004-03-26 21:49:57 +00:00
Alasdair Kergon
120943341c
typo
2004-03-26 21:47:43 +00:00
Alasdair Kergon
71b9fadf65
lvchange --refresh
2004-03-26 21:24:03 +00:00
Alasdair Kergon
192b1759ca
indent
2004-03-26 15:46:37 +00:00
Alasdair Kergon
09c1404182
cmdlib prototypes
2004-03-26 14:56:41 +00:00
Alasdair Kergon
79982c59a0
.export.sym generation
2004-03-26 14:51:23 +00:00
Alasdair Kergon
8106cdd570
update configure for cmdlib
2004-03-26 14:17:14 +00:00
Alasdair Kergon
84510264cd
Update makefiles (incl. cmdlib).
2004-03-26 13:21:12 +00:00
Alasdair Kergon
040cfcf89c
Rename some files to avoid duplicate filenames in tree.
2004-03-26 12:25:15 +00:00
Alasdair Kergon
c55d22dc0b
Add cmdlib code.
2004-03-26 12:21:24 +00:00
Alasdair Kergon
acd03445c3
Add --nolocking option for read operations if locking is failing/unavailable.
2004-03-26 12:09:33 +00:00
Alasdair Kergon
7fa2d1a092
Move main() into separate file.
2004-03-26 12:00:24 +00:00
Alasdair Kergon
e56ff0333d
Indent; _init -> _init_lvm
2004-03-26 11:49:07 +00:00
Alasdair Kergon
d24fb77c03
Rebaseline internal verbose level.
2004-03-26 11:45:01 +00:00
Alasdair Kergon
c9f25410c9
Avoid sscanf %as for uClibc
2004-03-19 15:52:22 +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
cf6dd25126
tagging
2004-03-08 17:19:15 +00:00
Alasdair Kergon
02cb3ccdc4
Fix (rare) bug in recognition of long argument forms.
2004-03-08 13:54:45 +00:00
Alasdair Kergon
ec36089afd
Extract log.h and tweak funcs to be like lvm2 ones.
2004-02-24 18:50:09 +00:00
Alasdair Kergon
cf37d5c7ab
Userspace support for LIST_VERSIONS ioctl.
2004-01-23 14:37:47 +00:00
Alasdair Kergon
bd094b5d1d
Add event number arg to dmsetup wait.
2004-01-23 14:09:33 +00:00
Alasdair Kergon
15e6db353d
pv/vgchange --uuid to change (non-random) UUIDs to random values
2004-01-13 18:42:05 +00:00
Alasdair Kergon
607131b624
Change pvscan to show total of usable device size (instead of free data space).
2003-12-09 22:32:47 +00:00
Alasdair Kergon
ace13d2ca4
Remove undocumented -m abbreviation.
2003-12-09 22:17:17 +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
2d8612c8ae
Don't remove mirror LV until after other LVs reloaded.
2003-11-20 16:22:04 +00:00
Alasdair Kergon
ee8518bd9c
lvcreate should close the initialised snapshot device immediately.
2003-11-14 17:55:39 +00:00
Alasdair Kergon
5a8fa8c91f
vgscan --mknodes
2003-11-14 14:03:48 +00:00
Alasdair Kergon
2864846d91
dmsetup mknodes
2003-11-13 13:14:28 +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
b8a20fc82a
Accept tables from stdin with dmsetup.
...
Update autoconf.
2003-11-12 17:30:32 +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
02ceef1225
Fix vgremove 'all OK' check
2003-11-06 17:16:22 +00:00
Alasdair Kergon
2de96f501a
Ban vgcreate -s 0
2003-11-06 17:07:19 +00:00
Alasdair Kergon
8fd6f4b6fb
Fix pvchange segfault with orphans.
2003-11-06 17:06:06 +00:00
Alasdair Kergon
4af5827d07
Don't trigger error if changing PV allocation to the state it already is.
2003-11-06 17:04:35 +00:00
Alasdair Kergon
fee16e1049
Cope better with LVM1 minor numbers & LV numbers.
2003-11-06 16:58:38 +00:00
Alasdair Kergon
cfb7bfc7d9
More consistent error code usage.
2003-10-21 22:06:07 +00:00
Alasdair Kergon
81c15e1f11
Dump active configuration
2003-10-15 20:19:43 +00:00
Alasdair Kergon
dcc31da516
dumpconfig to dump active configuration
2003-10-15 20:17:19 +00:00
Alasdair Kergon
b53a9efda3
Fix >32bit lvcreate size calculation.
2003-10-15 20:07:55 +00:00
Alasdair Kergon
e807ead2f7
Don't forget to set 64-bit arg values too.
2003-10-15 20:05:30 +00:00
Alasdair Kergon
f2b7349e2f
macro changes
2003-10-15 20:02:46 +00:00
Alasdair Kergon
b2a849142b
Fix read-only snapshot creation.
2003-09-16 16:08:05 +00:00
Alasdair Kergon
5b6a23726a
Make dev_name optional to show details for all devices.
...
e.g. 'dmsetup info', 'dmsetup status -v', 'dmsetup table'
2003-09-16 14:13:51 +00:00
Alasdair Kergon
a7617ea224
Don't install the pvdata stub; update built-in mesg.
2003-09-15 15:05:23 +00:00
Alasdair Kergon
fdd4f3c005
Ensure more args aren't negative.
2003-09-15 15:04:39 +00:00
Alasdair Kergon
d0afc2c8b7
Missing vg_commit()
2003-09-15 15:03:54 +00:00
Alasdair Kergon
96bea84664
vgcfgrestore -l lists backup file too
2003-09-15 15:03:22 +00:00
Alasdair Kergon
fe22eb84e6
Prevent cmdline flags that take args getting repeated.
2003-09-15 15:02:24 +00:00
Alasdair Kergon
57c74fb5af
Missing ] in pvmove usage display
2003-09-15 15:01:36 +00:00
Alasdair Kergon
8387b47352
Generalise 'invalid chars' error mesg to just say 'invalid'
2003-09-15 15:01:00 +00:00
Alasdair Kergon
364a71ca82
Correct order of consistency/exists checks.
2003-09-15 15:00:01 +00:00
Alasdair Kergon
8b7a435dee
Log each command & args.
2003-08-26 21:00:05 +00:00
Alasdair Kergon
4c22730b53
Some tidyups and minor fixes.
2003-08-20 15:48:27 +00:00
Alasdair Kergon
36cf79384f
Also allow pvmove --abort when pvmove mirror not active (e.g. after a reboot).
2003-08-18 17:21:51 +00:00
Alasdair Kergon
28cb0299c1
Missing check for inconsistent VG in pvmove.
2003-08-18 13:52:43 +00:00
Alasdair Kergon
0b946db909
Restrict active lvchange -My with -f
2003-07-11 17:10:19 +00:00
Alasdair Kergon
914c97239f
Another sync point - numerous fixes & clean ups.
2003-07-04 22:34:56 +00:00
Alasdair Kergon
8ac9712539
Synchronise repository / 2.4.21 support
2003-07-04 19:38:49 +00:00
Alasdair Kergon
d71bfabe39
Support for v4 interface
2003-07-01 21:20:58 +00:00
Alasdair Kergon
13601dbfe8
remove global pvmove lock & poll for completion
2003-05-06 12:20:11 +00:00
Alasdair Kergon
46a29c0212
Check for locked LVs/pvmoves.
2003-05-06 12:14:36 +00:00
Alasdair Kergon
361e5e3fac
unsigned
2003-05-06 12:13:19 +00:00
Alasdair Kergon
982cb02dfb
Prevent renaming active VGs for now.
2003-05-06 12:11:46 +00:00
Alasdair Kergon
6e03b44cc8
Don't process locked LVs
2003-05-06 12:10:18 +00:00
Alasdair Kergon
31abe57cd6
Store argv
2003-05-06 12:09:28 +00:00
Alasdair Kergon
3a61b05422
--abort --background
2003-05-06 12:08:58 +00:00
Alasdair Kergon
d7ef2ca7cd
Don't move snapshots
2003-04-30 15:58:09 +00:00
Alasdair Kergon
43ecb8ffe4
Add pvmove
2003-04-30 15:28:17 +00:00
Alasdair Kergon
7512e5a202
use pvmove flag
2003-04-30 15:25:34 +00:00
Alasdair Kergon
6910c129a9
Display event number.
2003-04-29 11:34:40 +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
098102afc0
Stop more gracefully when in test mode.
2003-04-24 22:13:48 +00:00
Alasdair Kergon
75833edb80
indent
2003-04-24 22:00:29 +00:00
Alasdair Kergon
d9e14671aa
fix optind after last change to it
2003-04-24 21:59:42 +00:00
Alasdair Kergon
b896caa19b
Improve build robustness.
2003-04-15 13:24:42 +00:00
Alasdair Kergon
0e69d32bed
Display read-only state.
2003-04-15 12:30:44 +00:00
Alasdair Kergon
abc6d41532
Add major arg
2003-04-04 13:22:58 +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
6a149cba6b
Reinstate lost vg_write() in lvchange --permission.
2003-04-02 13:01:04 +00:00
Alasdair Kergon
8aa577ad34
Proposed changes to the ioctl interface to fix alignment issues on some
...
architectures and specify an explicit width for every numeric field.
2003-03-28 18:58:59 +00:00
Alasdair Kergon
1fa74f62e8
Avoid report segfault with non-partial inconsistent VG.
2003-03-24 18:22:48 +00:00
Alasdair Kergon
26e7f2e0c4
Tidy various pre-processing incl. making libdl optional.
2003-03-24 18:08:53 +00:00
Alasdair Kergon
7e4867f743
LV name validation
2003-02-03 20:09:58 +00:00
Alasdair Kergon
a0568eca2b
Allow optional verbose logging.
2003-01-21 21:25:51 +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
8ae908a085
Add success message; validate given VG name.
2003-01-17 21:02:04 +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
f3993cac4a
Correct error message for non-snapshot activation failure.
2003-01-06 21:06:43 +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
987c4c1519
Fix long arg processing.
2002-12-05 22:35:15 +00:00
Alasdair Kergon
15b38fa8dd
tidy
2002-12-03 13:27:23 +00:00
Alasdair Kergon
aa83fd4ebb
Default size unit normally MB not KB.
2002-12-03 13:24:38 +00:00
Alasdair Kergon
00958b5818
Suppress a (normally) unnecessary warning.
2002-12-03 13:23:50 +00:00
Alasdair Kergon
c80325cae4
Further help text tidying & support for -?.
2002-11-29 15:02:57 +00:00
Heinz Mauelshagen
62ef058497
tiny tidying
2002-11-28 15:27:59 +00:00
Heinz Mauelshagen
8b46b545c6
Corrected lvcreate synopsis.
...
Added --ignorelockingflag to synopsis where missing.
2002-11-28 15:27:29 +00:00
Alasdair Kergon
8c54f03db8
Fix snapshot lvcreate activation check.
2002-11-22 14:19:56 +00:00
Alasdair Kergon
5a52dca9c2
Some new features.
2002-11-18 14:04:08 +00:00
Andres Salomon
50762c2186
agk, I recall you saying you had a massive commit pending; if you need me
...
to back this out so you can do that commit, let me know. Also, if there's
an issue with the error message that's displayed, just change it in tools.h.
This causes a "device-mapper driver/module not loaded?" error message to
be displayed for the commands that require dm-mod, if the tools can't get
the driver version. It's not done for commands that don't require dm-mod.
This should clear up some problems people have had attempting to use lvm2
without rtfm'ing.
2002-10-27 21:04:03 +00:00
Andres Salomon
d43773d634
Wow, learn something new every day. Apparently, the signed-ness of char is
...
implementation-dependent; some archs (s390, arm, and ppc) default to
an unsigned char.
2002-10-08 20:16:44 +00:00
Alasdair Kergon
faaedea286
Support alternative lvrename syntax.
2002-09-05 12:49:23 +00:00
Joe Thornber
f55f988643
o Remove e2fsadm to stop people waiting expectantly for something that isn't going
...
to arrive.
2002-08-08 07:54:57 +00:00
Alasdair Kergon
fdf8038fe5
Improved snapshot-related arg validation
2002-07-17 16:04:05 +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
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
48ad31920d
Add --ignorelockingfailure
2002-07-10 20:43:32 +00:00
Alasdair Kergon
fbbe942c45
Add vgsplit.
2002-05-31 19:30:51 +00:00
Alasdair Kergon
d4e5f63e96
Tidy/fix segment rounding.
2002-05-31 19:29:43 +00:00
Alasdair Kergon
401ae21308
Fix vgcfgrestore segfault (wrong variable used).
2002-05-30 16:03:26 +00:00
Joe Thornber
99b1e8f19f
Drop the default chunk size for snapshots down to 8k
2002-05-13 15:14:21 +00:00
Alasdair Kergon
92ad2d555b
Import snapshot status & persistence + indent etc.
2002-05-10 15:25:38 +00:00
Joe Thornber
0474ad51c2
i) Put back chunksize_ARG for lvcreate.
2002-05-08 14:36:10 +00:00
Alasdair Kergon
a07e27374d
Always call init_log() to initialise logging defaults.
2002-05-08 12:26:45 +00:00
Alasdair Kergon
3fb25e3f0f
log/{prefix,command_names} use defaults.h & reset between shell cmds
2002-05-07 13:00:01 +00:00
Patrick Caulfield
f6524657fa
Add features to get table/status & wait for next event.
2002-05-03 11:55:58 +00:00
Alasdair Kergon
6b4c9ff740
Some partial VG support with format_text.
2002-04-30 17:12:37 +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
Heinz Mauelshagen
8877446463
Changed DEFAULT_PV and DEFAULT_LV to 256 (has been fixed in LVM1 before)
2002-04-25 10:53:58 +00:00
Alasdair Kergon
25b733809a
Merge with text format branch.
...
Lots of changes/very little testing so far => there'll be bugs!
Use 'vgcreate -M text' to create a volume group with its metadata stored
in text files. Text format metadata changes should be reasonably atomic,
with a (basic) automatic recovery mechanism if the system crashes while a
change is in progress.
Add a metadata section to lvm.conf to specify multiple directories if
you want (recommended) to keep multiple copies of the metadata (eg on
different filesystems).
e.g. metadata {
dirs = ["/etc/lvm/metadata1","/usr/local/lvm/metadata2"]
}
Plenty of refinements still in the pipeline.
2002-04-24 18:20:51 +00:00
Patrick Caulfield
f06bdc437d
add setlocale() call so that localisation of things like number entry
...
and display will work correctly.
2002-04-24 10:42:09 +00:00
Joe Thornber
0e06dd31fd
o Added support for chunk_size to lvcreate.
2002-04-15 18:49:20 +00:00
Alasdair Kergon
d6a766f138
Missing VG lock when iterating through all LVs.
2002-04-15 16:27:39 +00:00
Joe Thornber
6fa3c2d5ce
o Drop the default chunk size for snapshots down to 16k.
2002-04-15 08:41:00 +00:00
Patrick Caulfield
2fab033e9b
Implement an external locking interface.
2002-04-08 16:04:50 +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
8573c6bcac
Snapshots are now attached to their origin device for locking purposes
...
so lock the origin instead of the snapshot itself when creating one.
2002-03-26 15:01:57 +00:00
Alasdair Kergon
4bb3eccf2b
New-style persistent minor support.
2002-03-26 13:41:37 +00:00
Alasdair Kergon
9585e50fef
Better support for LVs with hyphens in names.
2002-03-19 16:41:44 +00:00
Alasdair Kergon
902098d615
Support device queries by uuid as well as by name. (Used by lvrename.)
2002-03-18 23:39:42 +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
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
c22c93f0b6
Suppress verbose/debug messages from libdevmapper.
2002-03-14 13:39:33 +00:00
Alasdair Kergon
b2de0b7d44
dmsetup display uuid
2002-03-13 16:19:17 +00:00
Alasdair Kergon
ad21a5585c
Let dmsetup store the uuid on device creation.
2002-03-11 22:44:36 +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
Alasdair Kergon
e09a7b5787
o dm_destroy_all() called on exit - but doesn't touch suspended devices yet.
...
o 'dmsetup remove_all' calls dm_destroy_all() to provide a quick way to
prepare for unloading the module
o Ran through indent again.
2002-03-07 20:56:10 +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
9f7b698007
Kernel functionality that returns device dependencies (ejt).
2002-03-06 19:42:23 +00:00
Joe Thornber
1ca81fafd0
o Rename dmsetup dependencies -> dmsetup deps
2002-03-06 14:47:13 +00:00
Joe Thornber
761e0a63e1
o Add support for getting dependencies for a device.
...
o dmsetup dependencies <dev>
2002-03-06 14:38:25 +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
8478180d9e
snapshot/zero logic
2002-03-04 15:25:52 +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
Alasdair Kergon
50270f1fdf
Fix unlock parameter.
2002-02-27 14:48:42 +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
Heinz Mauelshagen
9c42e035a0
pvresize command
2002-02-25 15:32:58 +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
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
Heinz Mauelshagen
dc511e9ecb
Removed wrong 'lv->vg' argument from lv_is_cow() call. Is used in lv_is_cow internally.
2002-02-21 14:00:45 +00:00
Joe Thornber
6633e1b863
o misc little fixes.
2002-02-21 10:15:54 +00:00
Alasdair Kergon
cc8b2cd706
Try out using LV locking for reactivation.
2002-02-20 21:30:27 +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
0eb83127ef
o Add support for the -s and -c flags to lvcreate.
2002-02-18 10:59:51 +00:00
Heinz Mauelshagen
e1d93eb457
Second path on "pvcreate -s"
2002-02-15 14:33:59 +00:00
Joe Thornber
052360e901
o split lvcreate into seperate functions for parsing the command line,
...
and creating the lv. A lot of changes in here so be on the lookout
for bugs.
2002-02-15 11:53:22 +00:00
Heinz Mauelshagen
fc18023a9b
Forgot to remove test printf :-)
2002-02-15 09:37:23 +00:00
Heinz Mauelshagen
f48d3bcbd0
First cut on "pvcreate -s"
2002-02-15 01:26:16 +00:00
Joe Thornber
0a9f8bcf97
o First pass at format1 snapshot support.
2002-02-13 11:43:29 +00:00
Alasdair Kergon
6fda126dd7
Run through indent - no (intentional) changes to any code.
2002-02-11 21:00:35 +00:00
Alasdair Kergon
60274aba6e
Preparation for an LVM2 liblvm - pass cmd_context into each tool and
...
link some globals that the tools need into that structure.
2002-02-11 20:50:53 +00:00
Alasdair Kergon
7d0e6e800e
o Support locking with local lock files
...
o Disable control-c during updates (except if blocked waiting for a lock)
2002-02-11 15:42:34 +00:00
Joe Thornber
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
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
Heinz Mauelshagen
af7bbe5a6c
Poor mans lvmdiskscan
2002-02-05 14:31:57 +00:00
Alasdair Kergon
812c699c8d
Basic support for persistent minor numbers;
...
slightly different from the current LVM1 method.
lvcreate --persistent y --minor 10 (to specify when created)
lvchange --persistent n (to turn off)
lvchange --persistent y --minor 11 (to change)
--persistent uses a new LV status flag stored on disk
minor number is stored on disk the same way as LVM1 does
(but major number stored is 0; any LVM1 major/minor setting gets lost)
lvchange -ay --minor 12 (to activate using minor 12, regardless of the
on-disk setting, which doesn't get changed)
--minor == -m
--persistent == -M
2002-02-01 17:54:39 +00:00
Alasdair Kergon
cb0cc2999a
Display error when running unimplemented functions.
2002-01-31 20:37:26 +00:00
Alasdair Kergon
257f5ca091
Remove gcc -D to support as different gcc versions handle it differently.
2002-01-31 20:15:26 +00:00
Alasdair Kergon
cabd882ced
"exit" means "quit" (lamer)
2002-01-31 20:08:52 +00:00
Alasdair Kergon
d2c3c0505c
Remove stray comma.
2002-01-30 17:25:51 +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
93d6fa7d0d
Correct statement order for case when 'stripes' parameter is not supplied.
2002-01-30 12:17:40 +00:00
Alasdair Kergon
2235e241cc
add vgimport
2002-01-29 19:23:46 +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
594cc87acf
Check that vgname doesn't already exits in dev_dir
2002-01-28 16:30:42 +00:00
Alasdair Kergon
1176eb2597
Tweak some error message levels.
2002-01-27 21:30:47 +00:00
Alasdair Kergon
2fb0db7710
If lv isn't active, skip reactivation.
2002-01-25 22:58:01 +00:00
Alasdair Kergon
265d372f94
Prevent lvextend from adding segments with different stripe characteristics
...
at the moment because the old LVM format doesn't support this.
2002-01-25 21:14:43 +00:00
Joe Thornber
168b7bf9e2
o extra fid parameter to lv_manip fns
2002-01-24 17:15:24 +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
22d79852ea
Reviewed interaction with lib/activate now that the interface has settled down.
2002-01-22 19:11:12 +00:00
Alasdair Kergon
7a403967d5
Customisable message output prefix / indentation.
2002-01-22 15:33:40 +00:00
Joe Thornber
6c31864f5f
o Fix inverted logic in list_empty test.
2002-01-22 14:16:27 +00:00
Alasdair Kergon
9f6f4d1e09
No need for file output to default to stderr now that log file can be
...
specified in config file.
2002-01-21 19:05:00 +00:00
Joe Thornber
75e4d06ade
o Allow fractional parts for size args. eg, lvcreate -L 34.4M
...
o Fix a couple of bugs related to the earlier lv_list change
2002-01-21 17:43:10 +00:00
Joe Thornber
f868d63582
o Similar changes for lv_list.
2002-01-21 16:49:32 +00:00
Joe Thornber
b926605531
o fail if create_pv_list would produce an empty list.
2002-01-21 16:15:25 +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