| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
when reading VG text metadate and called from pvscan --lvmetad.
(Longer-term, that check needs moving outside of that code.)
|
|
|
|
| |
lvm.conf *and* lvmetad is running.
|
|
|
|
| |
Test both data and metadata percent usage.
|
|
|
|
|
|
|
|
|
|
| |
Add pool_has_message and use it in attach_pool_message.
Also update header to make more obvious which segment type is
expected as parameter.
Rename 'read_only' to 'no_update' (no auto update transaction_id)
to better fit how it's used.
Fix problem when there was only one stacked message replaced with delete
message that caused unwanted transaction_id increase.
|
|
|
|
|
|
|
| |
Full support for thin snapshots.
Create and remove is supported.
TODO: lvconvert support is not yes available.
|
|
|
|
| |
Move there also vg_write and vg_commit.
|
|
|
|
|
|
| |
Support stripe options to create thin data pool LV.
TODO: combine chunk size and stripe size.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Code in _lv_insert_empty_sublvs was not able to provide proper
initialization order for thin pool LV.
New function extend_pool() first adds metadata segment to pool LV which
is still visible. Such LV is activate and cleared.
Then new meta LV is created and metadata segments are moved there.
Now the preallocated pool data segment is attached to the pool LV
and layer _tpool is created. Finaly segment is marked as thin_pool.
|
|
|
|
|
|
|
|
| |
This function could be useful for other _manip source files.
Use dm_list manipulation function for provided functionality,
which make the code more readable and avoid touching list
internal details here.
|
|
|
|
|
|
| |
Check we do not combine multiple messages for same LV target
and switch to use 'delete_id' to make it clear for what this device_id
is being used.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
lvm part of messaging.
Each message is now stored it's own thin pool section:
message1 {
create = lv
}
Messages are queued to thin pool dm target when this target
is going to be resumed or used through some dependency.
Currently 'delete' message are purely queued and processed
with next thin pool resume operation (i.e. create_thin).
WARNING - thin provisioning support is developmental code.
|
|
|
|
| |
Initial simple implementation for finding some free device_id.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
move basic lv_is_* to macros
data_lv -> pool_lv - we decided to call it 'pool' everywhere now
|
|
|
|
|
|
| |
tdata -> tpool
remove commented out definitions from metadata.h
formatting clean-ups
|
|
|
|
| |
Since these function returns buffer size - use size_t type for them.
|
|
|
|
|
|
|
| |
leaving behind the LVM-specific parts of the code (convenience wrappers that
handle `struct device` and `struct cmd_context`, basically). A number of
functions have been renamed (in addition to getting a dm_ prefix) -- namely,
all of the config interface now has a dm_config_ prefix.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As this flag could not have been set by the current code - removing it.
Note: because of the wrong code logic this call:
lvmcache_update_vg(correct_vg, correct_vg->status & PRECOMMITTED &
(inconsistent ? INCONSISTENT_VG : 0));
had always passed '0' - now after flag removal it's passing
PRECOMMITTED flag in - this present functinal change in this patch.
To match the original functionality - 0 had to be always passed.
More testing is needed here.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implementation described in doc/lvm2-raid.txt.
Basic support includes:
- ability to create RAID 1/4/5/6 arrays
- ability to delete RAID arrays
- ability to display RAID arrays
Notable missing features (not included in this patch):
- ability to clean-up/repair failures
- ability to convert RAID segment types
- ability to monitor RAID segment types
|
|
|
|
| |
Let's find out if this makes things better or worse overall...
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
transient error), stemming from the following sequence of events:
1) devices fail IO, triggering repair
2) dmeventd starts fixing up the mirror
3) during the downconversion, a new metadata version is written
--> the devices come back online here
4) the mirror device suspend/resume is called to update DM tables
5) during the suspend/resume cycle, *pre*-commit metadata is read;
however, since the failed devices are now back online, we get back
inconsistent set of precommit metadata and the whole operation fails
The patch relaxes the check that fails in step 5 above, namely by ignoring
inconsistencies coming from PVs that are marked MISSING.
|
|
|
|
| |
Store label_sector only in struct physical_volume.
|
|
|
|
| |
issued repeatedly on the same VG, keeping the PARTIAL_LV flags up to date.
|
|
|
|
|
|
| |
This is essential for proper format instance ref_count support. We must
use these functions to set the fid everywhere from now on, even the NULL
value!
|
| |
|
|
|
|
|
|
|
|
|
| |
We allow writing non-orphan PVs only for resize now. The "orphan PV" assert
in pv_write fn uses the "allow_non_orphan" parameter to control this assert.
However, we should find a more elaborate solution so we can remove this
restriction altogether (pv_write together with vg_write is not atomic, we
need to find a safe mechanism so there's an easy revert possible in case of
an error).
|
|
|
|
| |
resizing a PV with two metadata areas.
|
|
|
|
| |
and changes in format_instance.
|
|
|
|
|
| |
Change pv_create code to work with these changes together with using new
pv_add_metadata_area fn to add metadata areas for a PV being created.
|
|
|
|
|
| |
pv_initiliase initialises a new PV
pv_setup sets up an existing PV with a VG
|
| |
|
| |
|
|
|
|
| |
format instance)
|
|
|
|
|
|
| |
This function also sets a reference to a new VG format instance for all PVs
that are part of the VG so the PV-VG interconnection is consistent after the
change.
|
|
|
|
|
|
|
|
| |
Add supporting functions to work with the format instance and metadata area
structures stored within the format instance. Add support for simple indexing
of metadata areas using PV id and mda order (for on-disk PV only for now, we
can extend the indexing even for other mdas if needed - we only need to define
a proper key for the index).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add configurable option to define minimal size of
of block device usable as a PV.
pv_min_size() is added to lvm-globals and it's being
initialized through _process_config.
Macro PV_MIN_SIZE is unused and removed.
New define DEFAULT_PV_MIN_SIZE_KB is added to lvm-global
and unlike PV_MIN_SIZE it uses KB units.
Should help users with various slow devices attached to the system,
which cannot be easily filtered out (like FDD on /dev/sdX):
https://bugzilla.redhat.com/show_bug.cgi?id=644578
|
|
|
|
|
|
| |
Change function import_vg_from_buffer() to import_vg_from_config_tree().
Instead of creating config tree inside the function allow config tree to
be passed as parameter - usable later for caching.
|
|
|
|
|
|
| |
As const segment_type or const format_type are never released
use their non-const version and remove const downcast from dm_free calls.
This change fixes many gcc warnings we were getting from them.
|
|
|
|
| |
Minor const warning fixes and internal API updates.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Set cmd->independent_metadata_areas if metadata/dirs or disk_areas in use.
- Identify and record this state.
Don't skip full scan when independent mdas are present even if memlock is set.
- Clusters and OOM aren't supported, so no problem doing the proper scans.
Avoid revalidating the label cache immediately after scanning.
- A simple optimisation.
Support scanning for a single VG in independent mdas.
- Not used by the fix but I left it in anyway as later patches might use it.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In other LVM memory structures such as volume_group, the field
used to store flags is called "status", and on-disk fields are called
'flags', so rename the one inside metadata_area to be consistent.
Not only is it more consistent with existing code but is cleaner
to say "the status of this mda is ignored".
Background for this patch - prajnoha pinged me on IRC this morning
about a fix he was working on related to metadataignore when
metadata/dirs was set. I was reviewing my patches from this year
and realized the 'flags' field was probably not the best choice
when I originally did the metadataignore patches.
|
| |
|
|
|
|
|
|
| |
Add a common function to allocate memory and format a string of
tags.
Call tags_format_and_copy() from _tags_disp().
|
|
|
|
|
|
|
|
| |
Move the creating of the 'attr' strings into a common function so
they can be called from the 'disp' functions as well as the new
'get' property functions.
Add "_dup" suffix to indicate memory is allocated.
Refactor pvstatus_disp to take pv argument and call pv_attr_dup().
|
|
|
|
|
|
| |
The metadata.[ch] files are very large. This patch makes a first
attempt at separating out vg functions and data, particularly
related to the reporting fields calculations.
|