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

9833 Commits

Author SHA1 Message Date
Peter Rajnoha
02628413ca systemd: remove workaround for lvm2-monitor.service's ExecStop line
Bug https://bugzilla.redhat.com/show_bug.cgi?id=843587 is handled better
now - the hang does not occur anymore. There are still error messages
issued though during shutdown if someone stops lvm2-lvmetad.service
manually that lvm2-monitor.service depends on (even during shutdown).
These errors are correct though and will point to incorrect
configuration (still having use_lvmetad=1 in lvm.conf and stopping
lvm2-lvmetad.service manually).

The workaround to prevent the hang is not needed now. So the
'--config "global{use_lvmetad=0}"' is now removed from the
lvm2-monitor.service's ExecStop line.
2014-10-14 10:08:23 +02:00
Alasdair G Kergon
d1bcdd7338 device: Fix BLKSSZGET definition check. 2014-10-13 18:15:41 +01:00
Petr Rockai
22a6b0e40b lvchange: Allow appropriate actions on cache (in addition to thin) pools. 2014-10-13 16:21:41 +02:00
Zdenek Kabelac
b59335fb39 toollib: validate_restricted_lvname_param
Lets make a separate new function to validate names that has
to follow up restriction rules.
2014-10-08 11:35:50 +02:00
Peter Rajnoha
c87e5a308a filter-usable: filter out blocked and suspended devices firmly when scanning for lvmetad
We can't hang on blocked or suspended devices when the scan is done
for lvmetad update - when the device gets unblocked or resumed, there's
always CHANGE event generated which will fire the udev rule to run
extra pvscan --cache for that device which makes sure that lvmetad
is up-to-date.
2014-10-08 11:03:08 +02:00
Alasdair G Kergon
f3bb1c018f vgremove: Use process_each_lv_in_vg. 2014-10-07 16:45:45 +01:00
Petr Rockai
d623034e62 test: Fix lvconvert-raid-allocation's use of lvconvert --repair. 2014-10-07 16:12:04 +02:00
Petr Rockai
88959032f7 metadata: Fix find_pv_in_vg for missing PVs/filtered devices. 2014-10-07 16:11:56 +02:00
Zdenek Kabelac
0cbb381e15 lvcreate: regression fix on lv name limits
When we are given an existing LV name - it needs to be allowed
to pass in even restricted name as the LV could have existed
long before we introduced some new restriction on prefix/suffix.i

Fix the regression on name limits and drop restriction to be applied
on any existing LVs - only the new created LV names have to be
complient with current name restrictions.

FIXME: we are currently using restricted names incorrectly in few
other places - device_is_usable() skips restricted names,
and udev flags are also incorrectly set for restricted names
so these LVs are not getting links properly.
2014-10-07 15:52:31 +02:00
Zdenek Kabelac
27ff61d012 cleanup: rename _name, _lv and _size
Use some standard names for lv char * names, logical_volume * lv
and sizes internally.
2014-10-07 15:51:53 +02:00
Zdenek Kabelac
62802ddae0 tests: typos 2014-10-07 10:19:33 +02:00
Zdenek Kabelac
236db9fc0d tests: put devs into "" 2014-10-07 10:19:33 +02:00
Zdenek Kabelac
75c4d268e9 tests: check for cache and raid
Skip some tests on systems without cache or raid.
2014-10-07 10:19:33 +02:00
Zdenek Kabelac
c59ef73206 tests: move cache raid to separate file 2014-10-07 10:19:33 +02:00
Zdenek Kabelac
9810f8aac7 cleanup: dont hide pv_dev declaration from pv
Just skip using local vars here...
2014-10-07 10:19:32 +02:00
Petr Rockai
b836525d9c test: Creating a cache on top of active RAID works now. 2014-10-07 09:32:24 +02:00
Peter Rajnoha
888da17495 metadata: add internal error if PV has no existing device attached during find_pv_in_vg
find_pv_in_vg fn iterates over the list of PVs covered by the VG and
each PV's pvl->pv->dev is compared with device acquired from device
cache. However, in case pvl->pv->dev is NULL as well as device cache
returns NULL (e.g. when device is filtered), we'll get incorrect match
and the code calling find_pv_in_vg uses incorrect PV (as it thinks
it's the exact PV with the pv_name). The INTERNAL_ERROR covers this
situation and errors out immediately.
2014-10-07 09:15:12 +02:00
Petr Rockai
b66f16fd63 lvconvert: Allow --repair and --splitmirrors on reserved-name LVs. 2014-10-07 08:58:24 +02:00
David Teigland
86dad329be test: Add process-each toollib tests. 2014-10-07 01:15:43 +01:00
David Teigland
8dc5f42254 metadata: Use flags to control warnings.
The warnings arg was used to enable logging of warnings
when reading a PV.  This arg is turned into a set of flags
with the WARN_PV_READ flag matching the existing behavior.

A new flag WARN_INCONSISTENT is added that will cause
vg_read_internal() to log the "VG is not consistent"
warning so the various callers do not need to log
this warning themselves.

A new vg_read flag READ_WARN_INCONSISTENT is used from
reporting to enable the WARN_INCONSISTENT flag in
vg_read_internal.

[Committed by agk with cosmetic changes and tweaks.]
2014-10-07 01:15:43 +01:00
David Teigland
e458fc9a6a vgreduce: Use process_each_pv.
Adapt process_each_pv for use by vgreduce in the non-repair case.

[Committed by agk with cosmetic changes and tweaks.]
2014-10-07 01:15:43 +01:00
David Teigland
f1a000a477 toollib: Rewrite process_each_pv.
Process PVs by iterating through VGs, then iterating through
devices if the command needs to process non-PV devices.
The process_single function can always use the VG and PV args.

[Committed by agk with cosmetic changes and tweaks.]
2014-10-07 01:15:43 +01:00
Alasdair G Kergon
aeb4d3b740 lvmcache: Skip VG_GLOBAL cache lock state update.
Avoids message:
  Metadata cache has no info for vgname: "#global"
2014-10-07 01:15:43 +01:00
David Teigland
31f10a0554 man: lvmcache mention automatic pool conversion
When converting an origin to a cache lv, lvm will automatically convert
the specified cache pool into a cache pool if it is not already a cache
pool.
2014-10-06 16:22:54 -05:00
Alasdair G Kergon
97b16ec26f toollib: Shuffle PV functions. 2014-10-06 22:02:00 +01:00
David Teigland
b7c81769e7 man: lvmcache changes related to removal and splitting 2014-10-06 14:04:09 -05:00
David Teigland
902192abdc man: lvmthin show the lvcreate -n option for pools
lvcreate of thin pools can now use '-n lv vg' like other lv types,
or it can name the new thin pool in the free arg as 'vg/lv', which
is not allowed with other lv types.
2014-10-06 13:29:18 -05:00
Alasdair G Kergon
1115a9ea51 toollib: Remove unused functions from header file. 2014-10-06 15:22:01 +01:00
Zdenek Kabelac
fa517221a1 tests: lvconvert cache usage of thin pool
Checked stacking usage of thin pool data volume being cached.
2014-10-06 15:31:44 +02:00
Zdenek Kabelac
742d250cc5 tests: lvconvert thin pool
More tests.
2014-10-06 15:31:44 +02:00
Zdenek Kabelac
c243cf6581 tests: lvconvert cache
Many new tests
2014-10-06 15:31:44 +02:00
Zdenek Kabelac
52821572d5 tests: lvcreate external origin
Fix unsupportable case.
We cannot create thinpool and snapshot at the same time.
(-L could not have 2 meanings).
2014-10-06 15:31:33 +02:00
Zdenek Kabelac
de0e6029f1 tests: lvcreate thin-pool support --name 2014-10-06 15:23:08 +02:00
Zdenek Kabelac
4baf4b8cf9 tests: lvcreate cache interface updates 2014-10-06 15:23:08 +02:00
Zdenek Kabelac
b7a78d81bc cleanup: indent 2014-10-06 15:23:08 +02:00
Zdenek Kabelac
d9d50e4533 cleanup: typo update 2014-10-06 15:23:08 +02:00
Zdenek Kabelac
916a68585e cleanup: error is already logged
Function get_only_segment_using_this_lv() already prints error,
no need to show more internal logic to user as an error.
2014-10-06 15:23:08 +02:00
Zdenek Kabelac
73c74d582c cleanup: lvconvert use standard function exit
Use 1|0 inside _lvconvert_splitsnapshot to match rest of code.
2014-10-06 15:23:07 +02:00
Zdenek Kabelac
8d272ba0ad validation: use validate_pool_chunk_size
We could validation pool chunk size with a single function.
2014-10-06 15:23:07 +02:00
Zdenek Kabelac
6c44299006 validation: share more code for pool validation
Reuse thin validation code for cache pool validation.
2014-10-06 15:23:07 +02:00
Zdenek Kabelac
57a52e7878 lvcreate: validate sizes
Earlier validation of --size and --extents.
Reject 0 size on command line instantly.
2014-10-06 15:23:07 +02:00
Zdenek Kabelac
a0693da97f toolib: early validation of chunk size
Since we now have validate_pool_chunk_size() we could
validate entered values directly prior openning vg.
2014-10-06 15:23:07 +02:00
Zdenek Kabelac
59ced3c281 pool: use validation 2014-10-06 15:23:07 +02:00
Zdenek Kabelac
a2aa609810 pool: validate_pool_chunk_size
Introduce pool function for validation of chunk size.
It's good idea to be able to reject invalid chunk size
when entered on command line before we open VG.
2014-10-06 15:23:01 +02:00
Zdenek Kabelac
7783fe3e93 man: document -ff for removal
Make it visible in man page that -ff could make removal
process proceed in case of damaged pool.
2014-10-06 15:22:24 +02:00
Zdenek Kabelac
79ca382b2c vg/lvremove: support --yes
Make --yes equivalent to DONT_PROMT (--force).

So user could use 'lvremove --yes vg/lvol1' skipping prompt.
2014-10-06 15:22:24 +02:00
Zdenek Kabelac
fbf14b12d8 man: lvconvert new split options
Update man page with info how to split/uncache cached logical
volumes.

lvconvert: splitsnapshot support --yes

Allow to use --yes to skip prompt.
2014-10-06 15:22:24 +02:00
Zdenek Kabelac
cb49dd4aa4 lvconvert: splitsnapshot supports --yes
Handle --yes arg to skip prompt.
2014-10-06 15:22:22 +02:00
Zdenek Kabelac
b2b18a5f8b lvconvert more test for thin external origin
Some LV types were not properly disallowed to be used as external origin.
2014-10-06 15:21:36 +02:00
Zdenek Kabelac
60d2a63368 lvconvert: cache and thin conversion validation
More test for supported conversion.
2014-10-06 15:18:06 +02:00