Alasdair Kergon
c6f8ef3814
define LCK_NONE for cases when vg_lock_and_read already holds lock
...
(temporary - library will use internal ref counting instead)
2007-11-15 02:55:22 +00:00
Alasdair Kergon
e5f7352bef
Convert some vg_reads into vg_lock_and_reads
2007-11-15 02:20:03 +00:00
Alasdair Kergon
204a12e594
Accept sizes with --readahead argument.
...
Store size arguments as sectors internally.
2007-11-14 00:08:25 +00:00
Alasdair Kergon
a6b22cf317
readahead activation code (but no dm support yet)
2007-11-12 20:51:54 +00:00
Alasdair Kergon
b4068515e8
Enhance the management of readahead settings.
2007-11-09 16:51:54 +00:00
Alasdair Kergon
19c865437a
Prevent lvconvert -s from using same LV as origin and snapshot.
2007-11-07 16:33:12 +00:00
Alasdair Kergon
00a7c302ea
Add pv_mda_free and vg_mda_free fields to reports for raw text format.
2007-11-05 17:17:55 +00:00
Alasdair Kergon
40ec927b3f
attempt to fix human-readable unit output when number of sectors is odd
2007-11-05 17:13:54 +00:00
Alasdair Kergon
180b4569e2
fix inverted orphan test
2007-11-05 17:12:50 +00:00
Alasdair Kergon
1f2ed21dde
adjust sizes for metadata
2007-11-05 02:10:39 +00:00
Alasdair Kergon
fd4ff5d201
Show 'not usable' space when PV is too large for device in pvdisplay.
...
Ignore and fix up any excessive device size found in metadata.
2007-11-05 01:47:49 +00:00
Alasdair Kergon
2b0249ec42
Add LVM2 version to 'Generated by' comment in metadata.
2007-11-04 19:16:34 +00:00
Alasdair Kergon
b7940c98c1
fix new lvremove checks - mustn't fail when activation is disabled
2007-11-04 16:28:57 +00:00
Alasdair Kergon
612548c04d
Fix error message when fixing up PV size in lvm2 metadata (2.02.11).
2007-11-04 15:43:50 +00:00
Alasdair Kergon
d38bf3616c
Fix orphan-related locking in pvdisplay and pvs.
...
Fix missing VG unlocks in some pvchange error paths.
Add some missing validation of VG names.
Rename validate_vg_name() to validate_new_vg_name().
Change orphan lock to VG_ORPHANS.
Change format1 to use ORPHAN as orphan VG name.
2007-11-02 20:40:05 +00:00
Bryn M. Reeves
8b98c12815
Add is_orphan_vg() and change all hardcoded checks to use it.
2007-11-02 13:06:42 +00:00
Alasdair Kergon
e1d586d70e
explanation of md superblock location & avoid compilation warnings
2007-10-24 11:24:24 +00:00
Alasdair Kergon
47c06763b7
Detect md superblocks version 1.0, 1.1 and 1.2.
2007-10-24 00:51:05 +00:00
Alasdair Kergon
951e1064c9
refactor dev-md.c, separating out the magic number detection
2007-10-24 00:30:30 +00:00
Dave Wysochanski
0f8387c2d6
Remove comment about allocation of pv->vg_name.
2007-10-12 21:08:38 +00:00
Dave Wysochanski
0283c439ec
Add _alloc_pv() and _free_pv() from _pv_create() code and fix error paths.
...
Modified original patch by Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
2007-10-12 18:37:19 +00:00
Dave Wysochanski
1b8de4cb25
Add pv_dev_name() to access PV device name.
...
Patch by Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
2007-10-12 14:29:32 +00:00
Dave Wysochanski
70d9f98ed3
Accessor functions for PV will not modify the given PV.
...
So we can add 'const' to it.
Patch by Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
2007-10-12 14:08:10 +00:00
Dave Wysochanski
9ea1d647af
Non-functional change - refactor lv_create_empty().
...
Remove struct format_instance param - we can safely obtain
this from vg->fid inside the function.
2007-10-11 19:20:38 +00:00
Dave Wysochanski
8fd14f09e2
Non-functional change - refactor vg_add_snapshot fid parameter.
2007-10-11 18:51:21 +00:00
Alasdair Kergon
6aca8e9297
Handle new sysfs subsystem/block/devices directory structure.
2007-10-10 11:31:21 +00:00
Jim Meyering
4df0c15074
Fix the fsadm build failure without using -llvm.
...
* lib/misc/util.c (last_path_component): Move definition to ...
* lib/misc/last-path-component.h (last_path_component): ...here.
New file. Make the function "static inline".
* include/.symlinks: Add last-path-component.h.
* lib/misc/util.h (last_path_component): Remove declaration.
* tools/fsadm/fsadm.c: Include "last-path-component.h".
* tools/lvmcmdline.c: Likewise.
Author: Jim Meyering <meyering@redhat.com>
2007-10-03 16:10:04 +00:00
Dave Wysochanski
bf4f5b21a4
Some const fixups for previous checkins
2007-09-24 21:30:00 +00:00
Jim Meyering
7f8f8bfa09
Correct typo in comments: s/is part of the LVM2/is part of LVM2/.
...
Signed-off-by: Jim Meyering <jim@meyering.net>
Author: Jim Meyering <jim@meyering.net>
2007-09-21 10:16:45 +00:00
Dave Wysochanski
dfef7f6942
Add %PVS extents option to lvresize, lvextend, and lvcreate.
2007-09-20 21:39:08 +00:00
Alasdair Kergon
9eea0107ba
Fix strdup memory leak in str_list_dup().
2007-09-17 16:02:46 +00:00
Dave Wysochanski
a0fe21ccb6
Undo previous checkin - output format not good, info already available in other form(s)
2007-09-11 13:49:52 +00:00
Dave Wysochanski
45ea446910
Add pvseg_free field to 'pvs' output
2007-09-10 20:05:29 +00:00
Jim Meyering
b45b846449
Include strerror string in dev_open_flags' stat failure message.
...
* lib/device/dev-io.c (dev_open_flags):
Use log_sys_error after failed stat to report strerror(errno).
Use a slightly different diagnostic to report mismatched device number.
2007-09-07 11:24:19 +00:00
Dave Wysochanski
c6ea067fed
move guts of pvresize into library
2007-08-30 20:30:41 +00:00
Jonathan Earl Brassow
a2cb3d17a7
When mirrors are created with the --nosync option, a status flag
...
(MIRROR_NOTSYNCED) is added to the LVM metadata. This flag is
not cleared when converting to linear. Subsequently, if you
up-convert the linear to a mirror, the flag remains - even though
an up-convert will always force a complete resync.
2007-08-29 20:19:11 +00:00
Dave Wysochanski
f603fe64bd
Modify lvremove to prompt for removal if LV active on other cluster nodes.
...
Add '-f' to vgremove to force removal of VG even if LVs exist.
Update vgremove man page for '-f'.
2007-08-28 16:14:49 +00:00
Patrick Caulfield
5982271096
Locking P_global causes a cache refresh.
2007-08-23 15:43:20 +00:00
Alasdair Kergon
e935d21752
Introduce VG_GLOBAL lock type for vgscan/pvscan to trigger clvmd -R.
2007-08-23 15:02:26 +00:00
Alasdair Kergon
21bc366486
Clean up numerous compiler warnings that crept in recently.
...
Remove several unused parameters from _allocate().
2007-08-22 14:38:18 +00:00
Alasdair Kergon
edb3374d32
Clean up mirrorlog argument processing.
...
Only permit --force, --verbose and --debug arguments to be repeated.
2007-08-21 19:46:36 +00:00
Dave Wysochanski
16669b5aa0
Move guts of vgremove into lvm library.
...
Include archiver.h in metadata.c as a result of prior move.
2007-08-21 17:38:20 +00:00
Dave Wysochanski
3d33abbb8c
Prepare to move guts of vgremove into lvm library.
...
Fixup force_t.
2007-08-21 16:40:33 +00:00
Alasdair Kergon
be6845999b
Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1.
2007-08-20 20:55:30 +00:00
Dave Wysochanski
cc78b9800d
Move lv_remove_single() into library (lv_manip.c, metadata-exported.h).
...
Move yes_no_prompt() into library (display.c, display.h).
Fixup includes as a result of movement of prior two functions.
Fixup force_t enum to be more descriptive.
2007-08-20 17:04:53 +00:00
Dave Wysochanski
9eb05d9761
Prepare to move guts of lvremove into lvm library
2007-08-20 16:16:54 +00:00
Alasdair Kergon
7a197a6220
Update to use autoconf 2.61, while still supporting 2.57.
2007-08-14 19:11:31 +00:00
Dave Wysochanski
be51e010b4
Remove extra checks for sub LV renaming.
...
Patch by Jun'ichi Nomura <j-nomura@ce.jp.nec.com>.
2007-08-08 18:00:36 +00:00
Dave Wysochanski
2835f025b6
A few more cleanups for lvrename of mirrors checkin:
...
* add struct lv_names for old/new names
* replace lv->status & MIRROR checks with lv_is_visible()
2007-08-07 18:55:38 +00:00
Dave Wysochanski
4f4d5fdc67
Some simple fixups for last checkin:
...
* remove "_" from "return_0"
* improve some naming and terminology
* add 'const'
2007-08-07 16:57:09 +00:00