Alasdair Kergon
07ae1d4943
Add lv_path to reports to offer full /dev pathname.
2010-06-23 12:32:08 +00:00
Alasdair Kergon
ae6164cee3
If unable to obtain snapshot percentage leave value blank on reports.
2010-05-20 22:24:33 +00:00
Zdenek Kabelac
d251e86856
Use dm_report_field_int32 instead of dm_report_field_uint64 for printing '-1'
2010-02-15 20:27:33 +00:00
Zdenek Kabelac
810349313a
Cleanup float arithmetic gcc warning.
2010-02-15 18:35:06 +00:00
Zdenek Kabelac
88c4995d1d
* add more 'const' - fixes gcc constness warning
2010-02-15 18:34:00 +00:00
Dave Wysochanski
629efc6a89
Export lvm_pv_get_size(), lvm_pv_get_free(), lvm_pv_get_dev_size in lvm2app.
...
We add these exports to show the pv_size and pv_free and dev_size
fields.
Fixes rhbz561423.
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-02-14 03:21:37 +00:00
Mike Snitzer
c79b425135
Add snapshot merge wrappers to abstract the associations and flags used
...
to represent merging origin and snapshot volumes.
2010-01-13 01:55:43 +00:00
Mike Snitzer
c582e3c039
Merge on activate support.
...
If either the origin or snapshot that is to be merged is open the merge
will not start; only the merge metadata will be written. The merge will
start on the next activation of the origin (or via lvchange --refresh)
IFF both the origin and snapshot are closed.
Merge on activate is particularly important if we want to merge over a
mounted filesystem that cannot be unmounted (until next boot) --- for
example root.
2010-01-13 01:54:34 +00:00
Mike Snitzer
c45af88a83
When there is merging snapshot, report percentage on the origin LV.
...
Because the snapshot LV will be hidden this is needed so the user can
see merging progress with "lvs" command.
2010-01-13 01:49:22 +00:00
Mike Snitzer
3b6a076e1e
Report merging snapshot as 'S' instead of 's':
...
This is useful for when the snapshot is still active and merging hasn't
started yet; it shows a merge is pending. Once merging starts the
merging snapshot will be hidden but can still be displayed with 'lvs -a'
Report snapshot origin with merging snapshot as 'O' instead of 'o':
Before merge starts this shows that a merge is pending. While merging
the snapshot will be hidden, 'O' enables a user to see that there is a
snapshot merging.
2010-01-13 01:48:38 +00:00
Zdenek Kabelac
c75550f5ba
Use offsetof() macro and avoid defining dummy static union for FIELD() macro.
...
Makes it compilable by clang compiler.
2010-01-07 14:37:11 +00:00
Dave Wysochanski
29aa56df68
Add vg_mda_count library function.
2009-10-31 17:26:13 +00:00
Alasdair Kergon
984abde146
Permit snapshots of mirrors. (brassow)
2009-10-26 10:01:56 +00:00
Alasdair Kergon
3d32c5f88b
Add percent_range to copy_percent too.
2009-10-01 01:04:27 +00:00
Alasdair Kergon
78ad1549a5
Introduce percent_range_t and centralise snapshot full/mirror in-sync checks.
2009-10-01 00:35:29 +00:00
Dave Wysochanski
68fac97a07
Add vg_is_resizeable() and cleanup references.
...
Clean up VG_RESIZEABLE flag by creating vg_is_resizeable().
Update comment - we no longer have ALLOW_RESIZEABLE.
Also use vg_is_exported() in one place missed by earlier patch.
Should be no functional change.
2009-09-15 18:35:13 +00:00
Dave Wysochanski
905240f91d
Use vg_is_exported(vg) macro everywhere.
...
This patch is all just cleanup and no other patch depends on it.
Replace explicit dereference and check with vg_is_exported().
Update a few copyrights and remove unnecessary whitespace.
Should be no functional change.
2009-09-14 19:44:15 +00:00
Dave Wysochanski
483a7cb6d5
Refactor a few report field calculations into separate functions.
...
For liblvm 'get' functions, we should share code with the reporting functions.
This means we need common code to return the values for the fields.
In this patch we refactor a few of the fields needed in liblvm.
Unfortunately, for the simple fields that do derefernces of structure
members (for example, vg_extent_count), we cannot call the common function
from the reporting infrastructure without more refactoring. The reason is
that the dereference of the simple fields is done deep inside the reporting
code (to get the generic "data" pointer), and the display function is a
generic 'size32' function. We can fix these issues later with more
refactoring.
Should be no functional change and the testsuite should cover any possible
regressions. The only fields in the report affected by this patch are:
vg_size, vg_free, and pv_mda_count.
Author: Dave Wysochanski <dwysocha@redhat.com>
2009-07-26 12:41:09 +00:00
Alasdair Kergon
25a2e7b80e
Pre-release cleanups.
2009-05-21 03:04:52 +00:00
Milan Broz
afd9ba98c1
Merge lv_is_displayable and lv_is_visible.
...
Displayable and visible is the same thing.
volumes_count(vg) is now vg_visible_lvs() and always
returns number of LVs from user perspective.
2009-05-13 21:27:43 +00:00
Milan Broz
2f9a9d1a7f
Remove snapshot_count from VG and use function instead.
2009-05-12 19:12:09 +00:00
Dave Wysochanski
14f5aa2753
Update columns.h comment.
2009-05-06 15:25:23 +00:00
Alasdair Kergon
87f42fda5e
Add sparse devices: lvcreate -s --virtualoriginsize (hidden zero origin).
...
Add lvs origin_size field.
Fix linux configure --enable-debug to exclude -O2.
Still a few rough edges, but hopefully usable now:
lvcreate -s vg1 -L 100M --virtualoriginsize 1T
2009-04-25 01:17:59 +00:00
Dave Wysochanski
d85cf5d14d
Update columns.h comment to describe macro args.
2009-04-23 16:27:58 +00:00
Milan Broz
81c7482974
Fix pvs -a for segmented output
...
# pvs -a -o devices
Volume group name (null) has invalid characters
Skipping volume group (null)
...
_pvsegs_sub_single creates fake vg, we need to check
that pv is real here.
2009-04-21 12:57:31 +00:00
Milan Broz
83d026861c
pe_start can be overwritten in VG metadata, so it is not PV label-only field.
2009-02-25 23:31:06 +00:00
Milan Broz
ea0cdd28c1
Separate PV label attributes which do not need parse metadata when reporting.
...
When reporting explicitly label attributes (pv_uuid for example), we do not
need to read metadata.
This patch separate the label fileds and removes scan_vgs_for_pvs
in process_each_pv() if not needed.
(There should be no user visible change in output.)
2009-02-09 09:45:49 +00:00
Milan Broz
92a4d6b28a
Fix pvs segfault when pv mda attributes requested for not available PV.
2009-02-06 12:41:51 +00:00
Alasdair Kergon
9bbd343f3a
More fields can cause segfaults with orphans.
...
Fix these by populating the dummy VG struct more completely.
2009-01-10 17:09:40 +00:00
Dave Wysochanski
2815870302
Fix pvs segfault when run with orphan PV and vg_mda_size or vg_mda_free fields
...
We display '0' for these fields now in this case. Ideally these values are
undefined for an orphan PV but today there is no way to specify undefined
with display functions such as _size64_disp().
2009-01-10 15:04:28 +00:00
Dave Wysochanski
e9f57f2beb
Add pv_mda_size to 'pvs' and vg_mda_size to 'vgs'.
...
Reports the size of the smallest metadata area in a PV or a VG.
Useful to confirm pvcreate --metadatasize or pvmetadatasize setting in
/etc/lvm/lvm.conf file.
NOTE: Actual value in these fields will most always differ from that
given in pvcreate options due to rounding and alignment effects.
2009-01-09 22:44:33 +00:00
Dave Wysochanski
539f903fd2
Fix segfault when invalid field given in reporting commands.
...
Problem is dm_report_init() may return NULL and subsequent call to
dm_report_set_output_field_name_prefix() doesn't handle NULL value.
Example:
pvs --nameprefixes --rows --unquoted --noheadings -opv_name,fred
Logical Volume Fields
---------------------
lv_uuid - Unique identifier
lv_name - Name. LVs created for internal use are enclosed in brackets.
...
Physical Volume Segment Fields
------------------------------
pvseg_start - Physical Extent number of start of segment.
pvseg_size - Number of extents in segment.
Unrecognised field: fred
Segmentation fault
2008-12-15 13:30:45 +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
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
36081ccf2d
Fix reporting of LV fields alongside unallocated PV segments.
2008-06-25 16:52:27 +00:00
Alasdair Kergon
1f787aca28
Add --rows to reports.
2008-06-24 22:48:53 +00:00
Alasdair Kergon
30ef4c738a
Add --unquoted to reporting tools.
2008-06-24 21:21:04 +00:00
Alasdair Kergon
ec40d92889
post-release
2008-06-06 19:28:35 +00:00
Alasdair Kergon
697e3bb2df
back out unnecessary changes for this release
2008-06-06 17:36:19 +00:00
Alasdair Kergon
eddc0f3307
post-release - reinstate incomplete enhancements
2008-04-29 16:11:28 +00:00
Alasdair Kergon
04ed52f6a0
pre-release (bug fixes only - enhancements excluded)
2008-04-29 15:58:25 +00:00
Alasdair Kergon
f419a87150
Add --prefixes to reporting tools for field name prefix output format.
...
E.g. lvs --prefixes --noheadings --unbuffered --units m --nosuffix
(Used '--prefixes' for now, but I'm looking for a better name.)
2008-04-20 00:15:08 +00:00
Alasdair Kergon
2e050bfc36
Fix vgdisplay 'Cur LV' field to match lvdisplay output.
...
Fix lv_count report field to exclude hidden LVs.
2008-04-10 17:19:02 +00:00
Dave Wysochanski
985ca02b6a
Add vg_is_clustered() helper function.
...
Should be no functional change.
2008-04-10 17:09:32 +00:00
Alasdair Kergon
bb097a97ea
split orphan VG by format type
2008-02-06 15:47:28 +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
962b2a559d
Rely upon internally-cached PV labels while corresponding VG lock is held.
2008-01-29 23:45:48 +00:00
Alasdair Kergon
72baf0c345
Maintain lists of stacked LV segments using each LV.
2008-01-16 19:00:59 +00:00
Alasdair Kergon
06ea7eaa27
Various lvconvert/polldaemon-related fixes from NEC. See lvm-devel
...
for original patches & explanations.
2008-01-10 18:35:51 +00:00
Alasdair Kergon
b9c69aa63a
a few more changes/fixes to recent code
2007-12-22 02:13:00 +00:00
Alasdair Kergon
ac089d9015
avoid some compiler warnings
2007-12-20 16:49:37 +00:00
Alasdair Kergon
dd007cfdd5
Append fields to report/pvsegs_cols_verbose.
...
Permit LV segment fields with PV segment reports.
Add seg_start_pe and seg_pe_ranges to reports.
2007-12-14 21:53:02 +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
00a7c302ea
Add pv_mda_free and vg_mda_free fields to reports for raw text format.
2007-11-05 17:17:55 +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
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
be6845999b
Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1.
2007-08-20 20:55:30 +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
Alasdair Kergon
eac952f3fe
tidy
2007-07-10 18:20:00 +00:00
Alasdair Kergon
19fa139341
Fix pv_mda_count to cope with missing PV.
...
[vgcreate vg1 pv1 pv2; pvremove -ff pv1; pvs -P -o+pv_mda_count =>segfault]
2007-07-10 18:18:33 +00:00
Alasdair Kergon
d27e123310
Add vg_mda_count and pv_mda_count columns to reports.
2007-07-09 15:40:43 +00:00
Alasdair Kergon
b4fb5226c0
Update lists of attribute characters in man pages.
...
Change cling alloc policy attribute character from 'C' to l'.
2007-03-27 13:35:33 +00:00
Alasdair Kergon
ce4c33102f
Fix vgsplit to handle mirrors.
...
Reorder fields in reporting field definitions.
2007-01-29 23:01:18 +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
7fee061a6d
Streamline dm_report_field_* interface.
2007-01-22 15:07:21 +00:00
Alasdair Kergon
594a27942b
No longer necessary to specify alignment for report fields.
2007-01-18 17:48:29 +00:00
Alasdair Kergon
d838a1e314
Move basic reporting functions into libdevmapper.
2007-01-16 18:06:12 +00:00
Alasdair Kergon
de5c82a0d9
add cling allocation policy
2006-10-08 12:01:13 +00:00
Alasdair Kergon
d547cbb00d
Add report columns with underscore before field names ending 'size'.
2006-10-07 10:42:27 +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
1baed0e1ae
Show available fields if report given invalid field. (e.g. lvs -o list)
2006-10-02 16:46:27 +00:00
Alasdair Kergon
0550c1b618
Move lvm_snprintf into libdevmapper.
2006-08-21 12:54:53 +00:00
Alasdair Kergon
d9ac88a501
M for unsynced mirror
2006-05-11 20:17:17 +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
ace652e673
lv_is_visible()
2006-04-07 17:41:56 +00:00
Alasdair Kergon
472ac5bdd5
more snapshot code tidying
2006-04-06 14:06:27 +00:00
Alasdair Kergon
2cd0aa727a
Introduce origin_from_cow()
2006-04-06 13:39:16 +00:00
Alasdair Kergon
5f4b2acfe5
Replacement activation code. [Don't use this yet!]
2005-11-08 22:52:26 +00:00
Alasdair Kergon
31b5c6e65c
Add pe_start to pvs.
2005-10-20 22:24:46 +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
88d2bdc668
Fix chunksize field in reports.
2005-09-23 17:06:01 +00:00
Alasdair Kergon
540b379902
Don't hide snapshots from default 'lvs' output.
2005-09-23 16:22:17 +00:00
Alasdair Kergon
3d38769798
Add clustered VG attribute to report.
2005-08-15 23:34:11 +00:00
Alasdair Kergon
5e947dac48
Various allocation-related pvmove fixes.
2005-06-14 17:54:48 +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
c54a940540
Initial pv_segment code.
2005-04-19 20:58:25 +00:00
Alasdair Kergon
072893aabd
Internal snapshot code restructuring.
2005-04-07 12:39:44 +00:00
Alasdair Kergon
1165258cda
Alignment tidying.
2005-04-06 13:47:41 +00:00
Alasdair Kergon
274c88be9f
More 64-bit display/report fixes.
2005-02-01 16:19:48 +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
c4ddb31abf
Rename old segtypes files to segtype.
2004-09-16 18:40:56 +00:00
Alasdair Kergon
a303dcde2a
Add dev_size column to pvs.
2004-08-11 13:15:05 +00:00
Alasdair Kergon
5fd24a89ec
Add report columns for in-kernel device number.
2004-07-03 22:07:52 +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
30bab85be1
Fix rounding of large displayed sizes.
2004-06-07 15:22:43 +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
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
0e3d94526a
Reporting uses line-at-a-time output.
2004-05-05 18:23:11 +00:00
Alasdair Kergon
cb919290c2
Separate out polldaemon.
2004-05-05 17:56:20 +00:00
Alasdair Kergon
0b2b87b717
Add devices to segments report; some move->copy renaming.
2004-05-05 10:58:44 +00:00
Alasdair Kergon
4922197a33
Begin to separate out segment types.
2004-05-04 21:25:57 +00:00
Alasdair Kergon
6606c3ae81
Update copyright notices.
2004-03-30 19:35:44 +00:00
Alasdair Kergon
b65b777d2a
Suppress move percentage when inactive
2004-03-26 19:10:48 +00:00
Alasdair Kergon
cf6dd25126
tagging
2004-03-08 17:19:15 +00:00
Alasdair Kergon
914c97239f
Another sync point - numerous fixes & clean ups.
2003-07-04 22:34:56 +00:00
Alasdair Kergon
44c319cf0d
move fields
2003-05-06 12:06:02 +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
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
79be52c881
Indicate full (dropped) snapshot.
2003-01-21 18:50:50 +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
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