1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 11:55:55 +03:00
Commit Graph

428 Commits

Author SHA1 Message Date
Milan Broz
095bbca691 Properly release VG memory pool in activation code and clvmd. 2009-04-10 10:00:04 +00:00
Alasdair Kergon
81680dce3c Fix last check-ins: seg can be NULL. 2009-02-28 20:04:24 +00:00
Alasdair Kergon
ed82bfd2ba Attempt cleanup in child before execing new binary in exec_cmd() 2009-02-28 00:54:06 +00:00
Zdenek Kabelac
c8669f6b13 Fixed bug where lvresize option -t was not properly passed to fsadm.
Using argv[] list in exec_cmd() to allow more params for external commands.
Fsadm does not allow checking mounted filesystem.
Fsadm no longer accepts 'any other key' as 'no' answer to y/n.
Fsadm improved handling of command line options.
2009-02-24 15:48:00 +00:00
Alasdair Kergon
0f817d38f7 If kernel supports only one dm major number, use in place of any supplied.
No longer require kernel and metadata major numbers to match.
2009-02-12 20:42:07 +00:00
Milan Broz
0c8bdaf33c Fail add tree node when requested major/minor is used.
Check for major/minor collision is added in _add_dev_to_dtree()
where we already read info by uuid,
so in the case of requesting major/minor it queries device-mapper
by major/minor for device availability.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=204992
2008-12-19 15:23:03 +00:00
Peter Rajnoha
3ad47d16ab Fix vgrename using UUID in case there are VGs with the same name. 2008-12-19 14:22:48 +00:00
Peter Rajnoha
b47952641a Added displayable_lvs_in_vg and lv_is_displayable functions to deal with
the counts of visible LVs from user's perspective consistently throughout
the code.
2008-12-04 15:54:26 +00:00
Alasdair Kergon
2c44337bd5 Right, a simple build (without options) is working again. 2008-11-03 22:14:30 +00:00
Alasdair Kergon
87ec948433 . 2008-09-19 07:18:03 +00:00
Alasdair Kergon
cda354087f rename var 2008-09-19 07:12:45 +00:00
Alasdair Kergon
8c5bcdabab Improve the way VGs with PVs missing are handled so manual intervention
is required in fewer circumstances.  (mornfall)
2008-09-19 06:42:00 +00:00
Alasdair Kergon
82185ada82 Cease recognising snapshot-in-use percentages returned by early development kernels. 2008-07-15 00:25:52 +00:00
Zdenek Kabelac
5f2c195933 Improve/Fix read ahead 'auto' calculation for stripe_size
Fix lvchange output for -r auto setting if auto is already set
Add testcase for read ahead
2008-06-18 11:32:14 +00:00
Alasdair Kergon
424dd43e6f Revert assuming precommitted metadata is live when activating (unnecessary). 2008-06-08 11:33:15 +00:00
Alasdair Kergon
e4b34bfad0 When activating, if precommitted metadata is still cached, assume it's live. 2008-06-05 13:06:39 +00:00
Alasdair Kergon
4bfa132445 When removing LV symlinks, skip any where the VG name is not determined. 2008-06-05 12:45:55 +00:00
Dave Wysochanski
5ca6698f12 Add lv_is_active() to determine whether an lv is active.
Handles non-clustered as well as clustered.  For clustered,
the best we can do is try exclusive local activation.  If this
succeeds, we know it is not active elsewhere in the cluster.
Otherwise, we assume it is active elsewhere.
2008-04-10 21:34:18 +00:00
Dave Wysochanski
985ca02b6a Add vg_is_clustered() helper function.
Should be no functional change.
2008-04-10 17:09:32 +00:00
Milan Broz
5619c629f6 Add detection of clustered mirror log capability.
Currently only check for kernel module presence.
2008-04-07 10:23:47 +00:00
Alasdair Kergon
4e9083db10 Fix mirror log name construction during lvconvert. (2.02.30)
Make monitor_dev_for_events recurse through the stack of LVs.
Clean up some more compiler warnings.
Add mirror names test script.
2008-01-31 12:19:36 +00:00
Alasdair Kergon
67cdbd7e4d Some whitespace tidy-ups. 2008-01-30 14:00:02 +00:00
Alasdair Kergon
c51b9fff19 Use stack return macros throughout. 2008-01-30 13:19:47 +00:00
Alasdair Kergon
0c06de632a pre-release review cleanups 2008-01-17 17:17:09 +00:00
Alasdair Kergon
876003dc44 allow a mirror to contain only one mimage 2008-01-16 19:18:51 +00:00
Petr Rockai
67961c7c10 Add snapshot dmeventd library (enables dmeventd snapshot monitoring). 2008-01-09 15:32:19 +00:00
Zdenek Kabelac
1c1b068ff8 readahead at least twice the strip size (same as raid0 driver does) 2008-01-08 16:47:10 +00:00
Alasdair Kergon
9b6135dca4 round readahead to multiple of page size in tools 2007-12-05 19:24:32 +00:00
Alasdair Kergon
fd0af4bd29 fix changed parms 2007-12-03 18:00:38 +00:00
Alasdair Kergon
69506f1dc4 uncomment libdevmapper readahead calls 2007-11-29 15:04:12 +00:00
Alasdair Kergon
a6b22cf317 readahead activation code (but no dm support yet) 2007-11-12 20:51:54 +00:00
Alasdair Kergon
be6845999b Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1. 2007-08-20 20:55:30 +00:00
Jim Meyering
08c9ff434b Add "const" attributes where possible: first cut. 2007-08-07 09:06:05 +00:00
Jim Meyering
e5e120a502 For consistency, rename local variable: s/newname/new_name/g. 2007-08-06 14:57:48 +00:00
Jonathan Earl Brassow
5efd97f108 lib/activate/activate.c:_lv_activate tries to monitor a device
regardless of whether it was successfully activated.  Now fixed
to only monitor if it was successfully activated.
2007-08-01 20:29:07 +00:00
Alasdair Kergon
03eee0e2ed Split metadata-external.h out from metadata.h for the tools to use. 2007-07-18 15:38:58 +00:00
Dave Wysochanski
13835b5f6c Don't use index and rindex functions marked by SUSv3 as legacy - Jakub Bogusz <qboosh@pld-linux.org> 2007-07-02 11:17:21 +00:00
Petr Rockai
e7ddf4168d Make warnings go to stderr. Change log_warn to that effect, log_print
continues to send messages to stdout.
2007-06-28 17:33:44 +00:00
Milan Broz
5efa3f1edf Remove symlinks if parent volume is deactivated. 2007-05-15 14:42:01 +00:00
Milan Broz
76b74ab11f Fix a segfault if a device has no target (no table) 2007-05-14 11:27:34 +00:00
Alasdair Kergon
1bf5aae913 Change some #include lines to search only standard system directories. 2007-04-27 17:46:16 +00:00
Alasdair Kergon
4f2f566b06 Add devices/preferred_names config regex list for displayed device names.
Free a temporary dir string in fcntl_lock_file() after use.
Fix a dm_pool_destroy() in matcher_create().
Introduce goto_bad macro.
2007-04-26 16:44:59 +00:00
Alasdair Kergon
b45c9f49d0 Fix vgrename active LV check to ignore differing vgids. 2007-03-08 21:08:25 +00:00
Alasdair Kergon
8fe54fddba Remove no-longer-used uuid_out parameter from activation info functions. 2007-03-08 19:58:04 +00:00
Alasdair Kergon
41aec14ed5 also ignore mirrors 2007-01-25 23:03:48 +00:00
Alasdair Kergon
f247a4e76f Add devices/ignore_suspended_devices to ignore suspended dm devices. 2007-01-25 21:22:30 +00:00
Alasdair Kergon
20db8ffcae lvm.static no longer interacts with dmeventd unless explicitly asked to. 2007-01-24 23:43:27 +00:00
Alasdair Kergon
24f4552bbe fix earlier checkin 2007-01-24 22:06:11 +00:00
Alasdair Kergon
57fc4cc0b6 Add field definitions to report help text.
Remove unnecessary cmd arg from target_*monitor_events().
2007-01-24 16:51:24 +00:00
Alasdair Kergon
8a37910d51 register->monitor etc. 2007-01-19 22:21:45 +00:00
Alasdair Kergon
8ef6eb30d9 Report dmeventd mirror monitoring status. 2007-01-12 20:38:30 +00:00
Alasdair Kergon
33f732c5e9 Add configure --with-dmdir to compile against a device-mapper source tree.
Use no flush suspending for mirrors.
2007-01-09 20:31:08 +00:00
Alasdair Kergon
0ce83a83f0 Fix some activate.c prototypes when compiled without devmapper. 2006-12-20 16:19:01 +00:00
Alasdair Kergon
4dc0ec2253 Adjust some alignments for ia64 and sparc.
(Some of the changes are probably unnecessary.)
2006-11-30 23:11:42 +00:00
Alasdair Kergon
253751656b Fix check for snapshot module when activating snapshot. 2006-11-20 16:45:45 +00:00
Alasdair Kergon
7c5ec12630 Add segment parameter to target_present functions. 2006-10-18 18:01:53 +00:00
Alasdair Kergon
6c81ed26f0 Add LV column to reports listing kernel modules needed for activation. 2006-10-03 17:55:20 +00:00
Alasdair Kergon
0550c1b618 Move lvm_snprintf into libdevmapper. 2006-08-21 12:54:53 +00:00
Alasdair Kergon
7d7736b7b4 Add dm_split_words() and dm_split_lvm_name() to libdevmapper. 2006-08-21 12:07:03 +00:00
Alasdair Kergon
9cd3426d3a Fix missing lockfs on first snapshot creation. 2006-08-08 21:20:00 +00:00
Alasdair Kergon
fe686a5180 Don't ignore persistent minor numbers when activating. 2006-07-10 19:17:40 +00:00
Alasdair Kergon
4aae724656 Fix target_register_events args. 2006-05-25 13:32:26 +00:00
Alasdair Kergon
aba30ebcdb Add DISTCLEAN_TARGETS to make template for configure.h.
More fixes to error paths.
2006-05-16 20:53:13 +00:00
Alasdair Kergon
2293567c8c Fix lvcreate corelog validation.
Add --config for overriding most config file settings from cmdline.
  Quote arguments when printing command line.
  Remove linefeed from 'initialising logging' message.
  Add 'Completed' debug message.
  Don't attempt library exit after reloading config files.
  Always compile with libdevmapper, even if device-mapper is disabled.
2006-05-16 16:48:31 +00:00
Alasdair Kergon
3e3d5d8593 Add --monitor to vgcreate and lvcreate to control dmeventd registration.
Propagate --monitor around cluster.
Filter LCK_NONBLOCK in clvmd lock_vg.
2006-05-12 19:16:48 +00:00
Alasdair Kergon
898e6f8e41 Add mirror_library description to example.conf.
More compile-time cleanup.
2006-05-11 17:58:58 +00:00
Alasdair Kergon
72b2cb613a Make SIZE_SHORT the default for display_size().
Fix some memory leaks in error paths found by coverity.
Use C99 struct initialisers.
Move DEFS into configure.h.
Clean-ups to remove miscellaneous compiler warnings.
2006-05-09 21:23:51 +00:00
Alasdair Kergon
2f1489a673 Fix activation code to check for pre-existing mirror logs. 2006-04-28 17:01:07 +00:00
Alasdair Kergon
e24e713001 _register_dev_for_events to return error on failure 2006-04-28 14:06:06 +00:00
Alasdair Kergon
8a2fc58645 Check for libsepol.
Add some cflow & scope support.
Separate out DEFS from CFLAGS.
Remove inlines and use unique function names.
2006-04-19 15:33:07 +00:00
Alasdair Kergon
472ac5bdd5 more snapshot code tidying 2006-04-06 14:06:27 +00:00
Alasdair Kergon
e408d62eaf suspend using existing LV metadata; vgreduce then needs partial flag 2006-02-03 19:36:20 +00:00
Alasdair Kergon
e4c11ad108 Only do lockfs filesystem sync when suspending snapshots.
Switchover library building to use LIB_SUFFIX.
2006-01-31 14:52:30 +00:00
Alasdair Kergon
8b888354c8 When suspending, dmeventd deregistration needs to use existing details
not precommitted ones.
2006-01-27 20:39:37 +00:00
Alasdair Kergon
ed09d7e394 Rename register_dev; fix missing initialisation; reduce number of ifdefs. 2006-01-27 18:38:14 +00:00
Alasdair Kergon
bfe2b5480e Always print warning if activation is disabled. 2005-12-22 16:13:38 +00:00
Alasdair Kergon
bbf83db14a Set block_on_error parameter if available.
Add target_version.
2005-12-19 21:01:39 +00:00
Alasdair Kergon
e64934773b Fix lvscan snapshot full display.
dmeventd fixes
2005-12-08 17:49:34 +00:00
Alasdair Kergon
15d91f5a68 More dmeventd support. 2005-12-02 20:35:07 +00:00
Alasdair Kergon
b9641812a5 Remove a resolved FIXME. 2005-11-22 19:37:14 +00:00
Alasdair Kergon
e178963c0b workaround for pvmove with new activation code 2005-11-09 23:56:36 +00:00
Alasdair Kergon
abbca21248 more mirror fixing 2005-11-09 18:13:10 +00:00
Alasdair Kergon
ad6b0ebb73 rename deptree 2005-11-09 13:08:41 +00:00
Alasdair Kergon
e88f56d9da rename deptree 2005-11-09 13:05:17 +00:00
Alasdair Kergon
5f4b2acfe5 Replacement activation code. [Don't use this yet!] 2005-11-08 22:52:26 +00:00
Alasdair Kergon
7a5933259f Clear up precommitted metadata better on disk after use.
[Some activation-related features will stop working for a while now.
Some types of activation are getting split into two steps, with the
first step using the precommitted metadata.]
2005-10-31 20:15:28 +00:00
Alasdair Kergon
5727a8fa85 Add mirror_seg pointer to lv_segment struct. (incomplete & untested) 2005-10-27 19:58:22 +00:00
Alasdair Kergon
7a419a5d48 remove unused suspend code path 2005-10-26 19:50:00 +00:00
Alasdair Kergon
633f889c34 suppress status err mesg when LVM- uuid prefix is missing 2005-10-26 17:56:31 +00:00
Alasdair Kergon
9e356e11e0 remove remaining hard-coded prefix lengths 2005-10-26 17:31:12 +00:00
Alasdair Kergon
d5aeb4bc34 a missing lvid/dlid conversion 2005-10-26 15:54:50 +00:00
Alasdair Kergon
878467cd7c Attempt to cope with LVM- prefix transition. 2005-10-26 15:00:51 +00:00
Alasdair Kergon
b427ecee79 switch in new suspend code (untested) 2005-10-26 14:13:52 +00:00
Alasdair Kergon
352a99b95a Use dm_is_dm_major instead of local copy.
Allow mapped devices to be used as PVs safely.
2005-10-25 19:08:21 +00:00
Alasdair Kergon
ffbfce30b5 Move set_selinux_context into libdevmapper 2005-10-25 17:28:46 +00:00
Alasdair Kergon
9011aed958 Fix LVM2- prefix changes; export build_dlid. 2005-10-20 21:07:57 +00:00
Alasdair Kergon
03b49fe193 Add 'LVM-' prefix to uuids. 2005-10-19 13:59:18 +00:00
Alasdair Kergon
9fdc84c328 Move deactivation code into libdevmapper. 2005-10-18 12:39:20 +00:00
Alasdair Kergon
619449b4ca some deactivation fixes 2005-10-17 19:06:20 +00:00
Alasdair Kergon
3e8479bdf6 Only one dump_memory. 2005-10-17 18:21:05 +00:00
Alasdair Kergon
f894b4b1b7 Attempt to load missing targets using modprobe.
Simplify dev_manager_info().
2005-10-17 18:00:02 +00:00
Alasdair Kergon
2262b32057 Use hash, bitset, malloc, pool from libdevmapper. 2005-10-16 23:03:59 +00:00
Alasdair Kergon
07d318310b Prepare tools to support clustered mirrors. 2005-08-14 23:18:28 +00:00
Alasdair Kergon
197632009b Move compose_log_line() into mirror directory. 2005-08-10 17:19:46 +00:00
Alasdair Kergon
7b68df96dc fix last checkin 2005-08-04 01:29:18 +00:00
Alasdair Kergon
78a352c2eb Prevent snapshots getting activated in a clustered VG. 2005-08-04 01:27:25 +00:00
Alasdair Kergon
a4be2c013c Separate out _build_dev_string. 2005-08-04 01:15:30 +00:00
Alasdair Kergon
5e947dac48 Various allocation-related pvmove fixes. 2005-06-14 17:54:48 +00:00
Alasdair Kergon
56c3d1f7fc Use matchpathcon mode parameter. 2005-06-13 13:13:15 +00:00
Alasdair Kergon
8211a13ce0 Always insert an intermediate layer for mirrors.
Suppress hidden LVs from reports unless --all is given.
Use square brackets for hidden LVs in reports.
Centralise restrictions on LV names.
2005-06-03 14:49:51 +00:00
Alasdair Kergon
60f13f01d2 Basic support for mirrors. 2005-06-01 16:51:55 +00:00
Alasdair Kergon
15db9fcfbf Reinstate full PV size when removing from VG.
Support loopfiles for testing.
Complete the pv_segment support.
2005-05-03 17:28:23 +00:00
Alasdair Kergon
f1379332dc extract compose_log_line 2005-04-17 23:59:04 +00:00
Alasdair Kergon
072893aabd Internal snapshot code restructuring. 2005-04-07 12:39:44 +00:00
Alasdair Kergon
0aa8e5be94 Avoid rmdir opendir error messsages when dir was already removed. 2005-03-21 14:43:02 +00:00
Alasdair Kergon
c45a8a2c1c Store snapshot and origin sizes separately. 2005-01-19 17:19:39 +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
bd46a496c7 pool debugging 2004-11-23 18:23:23 +00:00
Alasdair Kergon
be495a46bf Fix return code from rm_link for vgmknodes. 2004-09-22 13:38:37 +00:00
Alasdair Kergon
c4ddb31abf Rename old segtypes files to segtype. 2004-09-16 18:40:56 +00:00
Alasdair Kergon
7f64c8e5fa Export dm name build & split functions. 2004-09-15 15:02:36 +00:00
Alasdair Kergon
b588726e9f Fix /dev/vgname mkdir perms. 2004-09-02 14:38:46 +00:00
Alasdair Kergon
63aead84ee indent 2004-05-18 21:55:55 +00:00
Alasdair Kergon
e0a86d8c18 Ensure presence of virtual targets before attempting activation. 2004-05-12 20:43:34 +00:00
Alasdair Kergon
369028100b Attempt to fix resizing of snapshot origins. 2004-05-12 20:40:34 +00:00
Alasdair Kergon
f75c11ed27 update comment 2004-05-11 18:18:14 +00:00
Alasdair Kergon
ff4b8b64c8 Only include visible LVs in active/open counts. 2004-05-11 17:09:09 +00:00
Alasdair Kergon
224565478c Some basic checking for presence of device-mapper targets. 2004-05-05 18:11:43 +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
470a1e923c Don't abort operations if selinux is present but disabled. 2004-05-04 15:29:26 +00:00
Alasdair Kergon
627f730e18 fix selinux error mesg 2004-04-14 18:10:10 +00:00
Alasdair Kergon
c8f601b30f Fix lvs_in_vg_opened counting. 2004-04-14 17:33:04 +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
036f273ad0 Basic selinux support 2004-04-07 14:08:22 +00:00
Alasdair Kergon
6606c3ae81 Update copyright notices. 2004-03-30 19:35:44 +00:00
Alasdair Kergon
8b07664860 Fix vgmknodes to remove dud /dev/mapper entries 2004-03-30 14:40:03 +00:00
Alasdair Kergon
f09fe0ad0f Rename dev_manager_mknodes -> dev_manager_lv_mknodes etc. 2004-03-30 14:38:57 +00:00
Alasdair Kergon
d1f4953ad4 Add list_versions to library 2004-03-26 19:52:09 +00:00
Alasdair Kergon
c1f5052199 Ignore open hidden LVs when checking if deactivation is OK. 2004-03-26 19:13:39 +00:00
Alasdair Kergon
b65b777d2a Suppress move percentage when inactive 2004-03-26 19:10:48 +00:00
Alasdair Kergon
4bd9480dce lv_info_by_lvid 2004-03-26 15:35: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
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
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
0cf96f33ea Check no fs mounted before deactivating. 2003-10-21 22:00:36 +00:00
Alasdair Kergon
aa37899857 Extract some common functions. 2003-09-17 20:35:57 +00:00
Alasdair Kergon
b2a849142b Fix read-only snapshot creation. 2003-09-16 16:08:05 +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
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
b9e67d4f46 Distinguish between visible & top level devices. 2003-05-06 12:00:29 +00:00
Alasdair Kergon
10b29b8d2d pvmove support 2003-04-30 15:26:25 +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
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
26e7f2e0c4 Tidy various pre-processing incl. making libdl optional. 2003-03-24 18:08:53 +00:00
Alasdair Kergon
711f7fc681 Activation commands now return success in test mode. 2003-01-17 20:16:23 +00:00
Alasdair Kergon
199e490e7d configure --disable-devmapper if you don't have libdevmapper 2003-01-08 22:44:07 +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
d1d9800ef1 Refactoring. 2002-11-18 14:01:16 +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
Patrick Caulfield
aefa3c6d82 Get rid of compile warnings on 64bit platforms. 2002-06-07 08:37:07 +00:00
Alasdair Kergon
c826c0d17c Rename; add some FIXMEs. 2002-05-22 14:03:45 +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
6b4c9ff740 Some partial VG support with format_text. 2002-04-30 17:12:37 +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
Alasdair Kergon
69e8a53ee4 Allow deactivation of final snapshot. 2002-04-16 14:42:20 +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
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
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
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