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

151 Commits

Author SHA1 Message Date
Alasdair G Kergon
177ece01a9 reports: Use X for unknown LV attr when no dm.
It's safer not to tell people an LV is inactive when we aren't sure.
2014-04-18 02:23:39 +01:00
Zdenek Kabelac
5553a099d1 cleanup: use DM_ARRAY_SIZE
More use of libdevmapper macro
2014-04-08 11:00:15 +02:00
Zdenek Kabelac
2a93eba68e cleanup: easier casting
Use 32bit for extent calcs.
Drop uneeded implicit case.
2014-03-26 14:11:37 +01:00
Zdenek Kabelac
506091be70 pv_vg_name: do not expose internal orphans to lvm2 users
Check for orphan VG name and return just empty string,
Use internally pv->vg_name if the real orphan name is needed.
2014-03-19 00:57:59 +01:00
Alasdair G Kergon
13c3f53f55 allocation: misc fixes for percent/raid rounding
Several fixes for the recent changes that treat allocation percentages
as upper limits.
Improve messages to make it easier to see what is happening.
Fix some cases that failed with errors when they didn't need to.
Fix crashes when first_seg() returns NULL.
Remove a couple of log_errors that were actually debugging messages.
2014-02-22 00:26:01 +00:00
Alasdair G Kergon
83358d4c03 tools: Add internal tags command. 2014-01-30 13:09:15 +00:00
Zdenek Kabelac
ff112eee18 thin: merge display 2013-12-04 14:30:26 +01:00
Tony Asleson
0dd247502a lvm2app: Add VG/LV name validation
C library portion for
https://bugzilla.redhat.com/show_bug.cgi?id=883689

Signed-off-by: Tony Asleson <tasleson@redhat.com>
2013-11-19 14:40:39 -06:00
Zdenek Kabelac
37b7c67079 thin: report thin device id
Support   lvs -o+thin_id  to report thin device id.
This device_id is connection between kernel and lvm2 user space thin
metadata.
2013-11-15 12:38:37 +01:00
Zdenek Kabelac
8e1f2e733e gcc: fix comparing floating point warning
Since we enabled some more gcc warnings - let's adapt for
it and check for double equals with DBL_EPSILON.

Current close_enough() is far from perfect
for more details see i.e. here:
http://randomascii.wordpress.com/2012/01/11/tricks-with-the-floating-point-format/
but fairly enough for lvm2 use-case.
2013-10-25 10:43:32 +02:00
Alasdair G Kergon
357df34133 display: fix units for sizes <1k 2013-07-18 17:55:58 +01:00
Zdenek Kabelac
9ba7783350 cleanup: update comments
Add and indent.
2013-07-15 15:40:46 +02:00
Mike Snitzer
f9e0adcce5 snapshot: Rename snapshot segment returning methods from find_*_cow to find_*_snapshot
find_cow -> find_snapshot, find_merging_cow -> find_merging_snapshot.
Will thin snapshot code to reuse these methods without confusion.
2013-07-02 16:26:03 -04:00
Peter Rajnoha
d6a91da4be config: add profile arg to find_config_tree_bool 2013-07-02 15:19:09 +02:00
Zdenek Kabelac
78a42bac15 thin: fix cut&paste bug
Use proper external_lv.
(In release fix)
2013-04-21 23:07:00 +02:00
Peter Rajnoha
386886f71c config: refer to config nodes using assigned IDs
For example, the old call and reference:

  find_config_tree_str(cmd, "devices/dir", DEFAULT_DEV_DIR)

...now becomes:

  find_config_tree_str(cmd, devices_dir_CFG)

So we're referring to the named configuration ID instead
of passing the configuration path and the default value
is taken from central config definition in config_settings.h
automatically.
2013-03-06 10:14:33 +01:00
Zdenek Kabelac
30c13eff37 thin: report external origin
Use the field 'origin' for reporting external origin lv name.

For thin volumes with external origin, report the size of
external origin size via:

  lvs -o+origin_size
2013-02-23 10:37:01 +01:00
Alasdair G Kergon
3acc85caa8 buffering: use unbuffered silent mode for liblvm
Disable private buffering when using liblvm.
When private stdin/stdout buffering is not used always use silent
mode.
2012-08-26 00:15:45 +01:00
Alasdair G Kergon
438e0050df config: add silent mode
Accept -q as the short form of --quiet.
Suppress non-essential standard output if -q is given twice.
Treat log/silent in lvm.conf as equivalent to -qq.
Review all log_print messages and change some to
log_print_unless_silent.

When silent, the following commands still produce output:
dumpconfig, lvdisplay, lvmdiskscan, lvs, pvck, pvdisplay,
pvs, version, vgcfgrestore -l, vgdisplay, vgs.
[Needs checking.]

Non-essential messages are shifted from log level 4 to log level 5
for syslog and lvm2_log_fn purposes.
2012-08-25 20:35:48 +01:00
Zdenek Kabelac
172c87f7ca Never try to test character past given buffer
In case units[0] would be already '\0', do not check units[1].
2012-02-13 14:23:40 +00:00
Alasdair Kergon
a1991f101d pre-release 2012-01-26 14:02:42 +00:00
Alasdair Kergon
a2167d2d1d & -> && 2012-01-25 17:14:56 +00:00
Alasdair Kergon
46c67b5279 Use chunk_size consistently for thin_pool within LVM. 2012-01-24 00:55:03 +00:00
Zdenek Kabelac
c54998209d Update lvdisplay to show more info about thin LVs
Reformat name and path how the LV is represented with lvm1 compatible option,
to switch to the old way - which had number of  problem - i.e. many links
do not exist - since for private devices we are not creating them.
Add more info about thin pools and volumes.
2012-01-20 16:59:58 +00:00
Zdenek Kabelac
d8106dfee2 Thin rename seg var pool_metadata_lv to metadata_lv
Better fits the code.
2012-01-19 15:23:50 +00:00
Alasdair Kergon
8f95d94b4f Show read-only activation in display tools. 2012-01-12 16:58:43 +00:00
Alasdair Kergon
c122e5e7a3 Move y/n prompts to stderr and repeat if response has both 'n' and 'y'.
(Note that in a future release we might make this stricter and insist
on exactly 'y' or 'n'.)
2011-11-23 01:34:38 +00:00
Zdenek Kabelac
c0b9c64a77 Use capital letters 2011-10-04 12:39:59 +00:00
Zdenek Kabelac
97bde15a9f Display transaction_id for thin_pool 2011-10-03 18:31:03 +00:00
Alasdair Kergon
d71fd30e5d typo 2011-09-27 12:34:14 +00:00
Zdenek Kabelac
1d526c8585 Show some Thin related info in lvdisplay 2011-09-26 13:11:02 +00:00
Milan Broz
cbedb99e4c Fix some compile warnings on RHEL5
- returned char not needed to be explicitly const
- warn if pipe() fails in clvmd (more fixes here needed for error paths...)
- assign (and ignore) read() output in drain buffer
2011-03-01 20:17:56 +00:00
Alasdair Kergon
a8d13f9499 Handle decimal digits with --units instead of ignoring them silently.
Fix remaining warnings and compile with -Wpointer-arith.
2011-02-18 23:09:55 +00:00
Petr Rockai
8191fe4f4a Refactor the percent (mirror sync, snapshot usage) handling code to use
fixed-point values instead of a combination of a float value and an enum.
2010-11-30 11:53:31 +00:00
Alasdair Kergon
eb82bd0525 Extend cling allocation policy to recognise PV tags (cling_by_tags).
Add allocation/cling_tag_list to lvm.conf.
2010-11-09 12:34:40 +00:00
Alasdair Kergon
2aa06d73ca pre-release 2010-10-25 13:54:29 +00:00
Alasdair Kergon
2d6fcbf67d Allow internal suspend and resume of origin without its snapshots. 2010-08-17 16:25:32 +00:00
Alasdair Kergon
08f1ddea6c Use __attribute__ consistently throughout. 2010-07-09 15:34:40 +00:00
Alasdair Kergon
db3c1ac1c8 Add printf format attributes to yes_no_prompt & dm_{sn,as}printf and fix a calle 2010-07-02 21:16:50 +00:00
Dave Wysochanski
6b596f685f Use vg_mda_count() in vgdisplay.
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
2010-06-28 20:32:21 +00:00
Zdenek Kabelac
b1ebf028de Cleanup returns for void functions. 2009-12-11 13:16:37 +00:00
Mike Snitzer
a2552d4f59 Switch status from 32-bit to 64-bit
The physical_volume, volume_group, logical_volume and lv_segment
structures' 'status' member is now uint64_t.

The alignment of these structures was also audited to remove holes.  The
movement of some members in 'volume_group' and 'lv_segment' eliminates
holes.  The 'physical_volume' structure still has one 4-byte hole after
'pe_size'; the other structures no longer have any holes.  Each
structures' size has not changed.
2009-11-24 22:55:55 +00:00
Zdenek Kabelac
61c146fb97 Add fflush for the case the log is redirected to the buffered file.
Without this patch it have not been obvious, why the application
waits on the stdin as the prompt might be still buffered in memory.
2009-11-03 10:50:57 +00:00
Alasdair Kergon
984abde146 Permit snapshots of mirrors. (brassow) 2009-10-26 10:01:56 +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
Alasdair Kergon
8e4858ccd1 Distinguish between powers of 1000 and powers of 1024 in unit suffixes. 2009-09-30 14:19:00 +00:00
Alasdair Kergon
673ecf73cf Treat input units of both 's' and 'S' as 512-byte sectors. (2.02.49)
's' and 'S' are special suffixes representing sectors and are always 512 bytes,
regardless of whether you're using powers of 1000 or 1024.
2009-09-28 16:36:03 +00:00
Alasdair Kergon
95eaa68309 Add global/si_unit_consistency to enable cleaned-up use of units in output.
Add configure --enable-units-compat to set si_unit_consistency off by default.

Use standard output units for 'PE Size' and 'Stripe size' in pv/lvdisplay.
2009-09-28 16:23:44 +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