| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Add sync wait for syncaction of raid1 test.
--syncaction requires raid to be in sync first.
|
| |
|
|
|
|
| |
Current lvm2 does support only 32bit extents count.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Add API call to calculate extents from percentage value.
Size is based in DM_PERCENT_1 units.
(Supporting decimal point number).
This commit is preparing functionality for more global
usage of % with i.e. --size option.
|
| |
|
|
|
|
|
|
|
| |
New size_mb_arg_with_percent is able to read size_mb_arg
but also it's able to read % values.
Percent parsing is share with int_arg_with_sign_and_percent.
|
|
|
|
|
|
|
|
| |
If root has locales with different decimal point then '.'
(i.e. Czech with ',') lets be tolerant and retry with
"C" locales in the case '.' is found during parse of number.
Locales are then restored back.
|
|
|
|
|
| |
Users of context provide their cmd pointer,
so don't keep it inside segtype.
|
|
|
|
|
|
|
|
| |
We need to be able to parse:
lvcreate --type snapshot -s
lvcreate --type thin -s
lvcreate --type cache-pool -H
|
|
|
|
| |
Document sparse device creation and its default segtype selection.
|
|
|
|
| |
Just rebuild after configure.in update.
|
|
|
|
|
|
|
|
|
|
|
| |
Support compile type configurable defaults for creation
of sparse volumes.
By default now create 'thin-pools' for sparse volumes.
Use the global/sparse_segtype_default to switch back to old
snapshots if needed.
Apply the same compile logic for newly introduces mirror/raid1 options.
|
|
|
|
|
| |
Drop double [[ ]] around default args.
(AC_HELP_STRING is already quoted so double [[]] are not needed).
|
|
|
|
| |
2f7f6932dcd450ba75fe590aba8c09838d2618dc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
using >, <, >=, <
Some values are reserved for special purpose like 'undefined', 'unmanaged' etc.
When using >, <, >= and < comparison operators where the range is considered,
do not include reserved values as proper values in this range which
would otherwise result in not so obvious criteria match (as the reserved value is
actually transparent for the user). It's incorrect.
Example scenario:
$ vgs -o vg_name,vg_mda_copies vg1 vg2
VG #VMdaCps
vg1 1
vg2 unmanaged
The "unmanaged" is actually mapped onto reserved value
18446744073709551615 (2^64 - 1) internally.
Such reseved value is already caught on selection criteria input
properly:
$ vgs -o name,vg_mda_copies vg1 vg2 -S 'vg_mda_copies=18446744073709551615'
Numeric value 18446744073709551615 found in selection is reserved.
However, we still need to fix situaton where the reserved value may be
included in resulting range:
Before this patch:
$ vgs -o vg_name,vg_mda_copies vg1 vg2 -S 'vg_mda_copies >= 1'
VG #VMdaCps
vg1 1
vg2 unmanaged
With this patch applied:
$ vgs -o vg_name,vg_mda_copies vg1 vg2 -S 'vg_mda_copies >= 1'
VG #VMdaCps
vg1 1
From the examples above, we can see that without this patch applied,
the vg_mda_copies >= 1 also matched the reserved value 18446744073709551615
(which is represented by the "unamanged" string on report). When
applying the operators, such values must be skipped! They're meant to
be matched only against their string representation only, e.g.:
$ vgs -o name,vg_mda_copies vg1 vg2 -S 'vg_mda_copies=unmanaged'
VG #VMdaCps
vg2 unmanaged
...or any synonyms:
$ vgs -o name,vg_mda_copies vg1 vg2 -S 'vg_mda_copies=undefined'
VG #VMdaCps
vg2 unmanaged
|
|
|
|
| |
Missing code for stacked hint estimation
|
| |
|
|
|
|
| |
Test with old mirror type.
|
| |
|
|
|
|
|
| |
As the rounding for cache creation may change the value of extents
postpone check for free extents.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unlike with thin-pool - with cache we support all args also
directly when create cache volume.
So the result of 'separate' cache-pool creation and setting its
options should give same result as specifying those args
during cache creation.
Cache-pool values are used as defaults if the params are
not specified with cache creation.
|
|
|
|
|
|
|
| |
Move code for creation of thin volume into a single place
out of lv_extend(). This allows to drop extra pool arg
for alloc_lv_segment() && lv_extend() and makes code
more easier to read and follow.
|
|
|
|
|
|
|
| |
When we create volumes with chunk size bigger then extent size
we try to round up to some nearest chunk boundary.
Until now we did this for thins - use same logic for
cache volumes.
|
|
|
|
|
| |
Load pool_lv and origin_lv at a single place and
use it for more types as they need them.
|
|
|
|
| |
lv_create_single is more type based.
|
|
|
|
|
|
| |
Unused since 67a7b7a87da65b2350f975272e581be5f41976e0:
report: Iterate over labels instead of PVs for label-only reports.
(included in 2.02.105).
|
|
|
|
|
|
|
| |
Add 'should' as we currently cannot pass this test.
FIXME:
Add properly wrapper to not use 'should' with fixed kernel.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed syntax parsing means that some commands that used to work are now
failing. Particullary this case:
$ invalid lvcreate -l1 --type thin vg/pool
> Needs to fail becase thin type LV needs --virtualsize
$ invalid lvcreate --type snapshot vg/lv1
> Needs to fail because old-snapshot segment type needs --size
Some reported error messages have been also updated.
|
| |
|
|
|
|
| |
Put validation of mirrorlog arg into a separate function.
|
|
|
|
|
| |
More description for cache support.
Introduce --pooldatasize option.
|
|
|
|
|
|
|
| |
Split validate_lv_cache_create() into 2 function
once is called for pool validation other for origin.
It's less misleading the accepting NULLs.
|
|
|
|
|
|
|
|
|
|
|
| |
Use segment flags to avoid zeroing of cache, cache pool
snapshot and thin pool segments.
We never want to zero these segment types.
Note:
Snapshot COW and Cache origin are created as stripes
thus are then properly zeroed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Let the finaly state of zero & wipe_signature to be
resolved later together with all the types.
Don't play with zero assigment and segtype flag
(i.e. thin-pool -Z has different meaning).
Check if the passed options do allow requested zeroing/wiping.
lvcreate without -Z or -W will fallback to warning if the device
cannot be zeroed, however if user requested them explicitely
it will give user error.
|
|
|
|
|
| |
Deduce -M from presence of --minor, --major option if
not specified on command line.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Refactor lvcreate code.
Prefer to use arg_outside_list_is_set() so we get automatic 'white-list'
validation of supported options with different segment types.
Drop used lp->cache, lp->cache and use seg_is_cache(), seg_is_thin()
Draw clear border where is the last moment we could change create
segment type.
When segment type is given with --type - do not allow it to be changed
later.
Put together tests related to individual segment types.
Finish cache conversion at proper part of lv_manip code after
the vg_metadata are written - so we could correcly clean-up created
stripe LV for cache volume.
|
|
|
|
|
| |
When pool volume is create - it has already managed to update metadata
once within lv_extend - so revert new created LV here.
|
|
|
|
|
|
|
| |
Put in code to accept 'linear' segment type
(when specified stripes cannot be used)
Also report 'error' when unknown type is specified.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move test for size of new LV names in front before
any creation of LV.
Properly check striped segtype kernel presence,
since passed 'segtype' is already tested.
Keep deactivation error path local to wiping part of the function.
Create metadata with temporary flag (it's activated, zeroed
and deactivated).
|
|
|
|
|
| |
Update comment and move code to new place.
Gets updated with next commit.
|
|
|
|
| |
It's used just in one place now.
|
|
|
|
| |
Show proper backtrace on error path.
|