summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* New plan for duplicate PV designdev-dct-lvmetad-14David Teigland2015-11-101-141/+216
|
* Add plan for preventing use of any duplicate devDavid Teigland2015-11-061-0/+18
|
* Add plan for handling duplicate PVsDavid Teigland2015-11-051-0/+130
| | | | | to be reworded as the documentation when completed.
* Warn about duplicate PVs when using lvmetadDavid Teigland2015-11-056-1/+234
| | | | | | | | A flag is set in lvmetad when duplicate PVs have been found. Commands check this flag and print a warning about duplicate PVs if it's set. When devices are scanned, the flag is set or cleared in lvmetad.
* Strictly ignore duplicate PVsDavid Teigland2015-11-055-547/+33
| | | | | | | | | | | | | | | | In commands and lvmetad, if a pvid already exists on one device, and a second device appears with the same pvid, then ignore the second device. Previously, commands and lvmetad attempted to juggle both devices for the same PV. Commands using lvmetad will no longer see persistent warnings about duplicates because they won't be seen. In 'pvs -a' or 'pvs dev', an ignored duplicate device now looks like a non-PV, and the chosen device in a duplicate pair looks like the only device for the PV.
* lvmetad: preemptively check and rescan in commandsDavid Teigland2015-11-047-14/+269
| | | | | | | | | | | | | | | | | | Move checking the lvmetad state, and the possible rescan, out of lvmetad_send() to the start of the command. Previously, the token mismatch and rescan would occur within lvmetad_send() for some other request. Now, the token mismatch is detected earlier, so the rescan can be done before the main command is in progress. Rescanning deep within the processing of another command will disturb the lvmcache state of that other command. A rescan already exists at the start of the command for the case where foreign VGs are going to be read. This same rescan is now also performed when there is an lvmetad token mismatch (from a changed global_filter).
* vg_read: skip repair and wipe for foreign and shared VGsDavid Teigland2015-11-031-0/+36
| | | | | | | | | | | | | | | | When reading a foreign VG we cannot write it, since it belongs to another host. When reading a shared VG we cannot write it because we may not have an ex lock. (Or we may be reading the shared VG while not using lvmlockd in which case it's like reading a foreign VG.) Add the same checks for wiping outdated PVs. We may read a foreign or shared VG, or see the PVs, while another host is part way through writing a new version of the VG to the PVs. This might cause us to think some of the PVs are outdated. We do not want to write another host's PVs, especially when we may wrongly conclude they are outdated.
* lvmcache: change log_verbose to log_warnDavid Teigland2015-11-031-3/+3
| | | | | Without this, some cases miss printing a warning for duplicate PVs.
* lvmetad: log duplicate PVs returned from lvmetadDavid Teigland2015-11-031-3/+8
| | | | | | | When the command gets a list of alternate devices from lvmetad, log each one directly. This is not the same as the warnings when adding lvmcache, which are related to which duplicate is preferred.
* tests: skip duplicate vg names test with lvmetadDavid Teigland2015-11-031-0/+1
| | | | | | | If two PVs have different VGs with the same name (different uuids), one of the VGs is ignored by lvmetad. A FIXME exists in lvmetad to find a better response.
* lvmetad: refactor and documentDavid Teigland2015-11-031-280/+1565
| | | | | | | | | | | | | | | | | | | update_metadata and pv_found update the cached metadata; these are both reworked to improve the code, organize it by each possible state and transition, make it much more clear what's changing, add more error checking and handling, and add comments. The state and content of the cache (hash tables) does not change (apart from some things that didn't work before), and the communication to/from commands does not change. The implementation and organization of the code making the state changes does change significantly. One detail related to the content of the cache does change: different hash tables do not reference the same memory any more; the target values in each hash table are allocated and freed individually.
* config: fix copy error in examplesDavid Teigland2015-11-031-11/+11
| | | | | The same example was copied without changing the variable name.
* test: api subdirectory is needed in PATH by pytestdev-mcsontos-spec-pythonMarian Csontos2015-11-021-1/+1
|
* test: Run pytest with installed libsMarian Csontos2015-11-021-5/+11
|
* spec: Add python bindingsMarian Csontos2015-11-023-35/+117
|
* post-releaseAlasdair G Kergon2015-10-314-2/+8
|
* pre-releasev2_02_133Alasdair G Kergon2015-10-305-7/+7
|
* WHATS_NEW: reporting commands and -o-/-o+ extensionPeter Rajnoha2015-10-301-0/+2
|
* commands: update command help for -o|--options for reporting commandsPeter Rajnoha2015-10-301-7/+7
|
* man: pvs/vgs/lvs and -o+, -o-, -o#Peter Rajnoha2015-10-306-12/+27
|
* tests: add report-fields.sh testPeter Rajnoha2015-10-301-0/+91
|
* report: support "-o #field_name1,field_name2,..."Peter Rajnoha2015-10-301-5/+29
|
* report: recognize known prefix when processing "-o -field_name1,field_name2,..."Peter Rajnoha2015-10-301-4/+31
|
* report: add report_get_field_prefix functionPeter Rajnoha2015-10-302-0/+16
|
* report: support "-o -field_name1,field_name2,...."Peter Rajnoha2015-10-301-1/+23
|
* report: make report options defined by "-o" groupablePeter Rajnoha2015-10-302-16/+47
| | | | | | Also, besides making "-o" groupable, use string lists to store lists of options temporarily while processing all instances of the "-o" group.
* refactor: move code detecting report options to a separate functionPeter Rajnoha2015-10-301-19/+27
|
* str_list: add str_list_destroy functionPeter Rajnoha2015-10-302-0/+15
| | | | | | The str_list_destroy function may be called to cleanup memory when the list is not used anymore and the list itself was not allocated from the memory pool.
* str_list: add str_list_to_str and str_to_str_list functionsPeter Rajnoha2015-10-302-0/+89
| | | | | The str_list_to_str and str_to_str_list are helper functions to convert string list to a single string and vice versa.
* str_list: also allow memory allocation without memory poolPeter Rajnoha2015-10-301-2/+4
|
* New entries for pvs related fixes.David Teigland2015-10-301-0/+2
|
* metadata: format_text: also count with calculated mda size of 0Peter Rajnoha2015-10-301-6/+6
| | | | | | | | When checking minimum mda size, make sure the mda_size after alignment and calculation is more than 0 - if there's no place for an MDA at the end of the disk, the _text_pv_add_metadata_area does not try to add it there and it returns (because we already have the MDA at the start of the disk at least).
* tests: add test for minimum mda sizePeter Rajnoha2015-10-301-0/+9
|
* metadata: format_text: better check for metadata overlapPeter Rajnoha2015-10-301-2/+1
| | | | | | | | | | | | | | | | | | | | | | | Actually, we don't need extra condition as introduced in commit 00348c0a630a7e5578edf48052ec695b15de752f. We should fix the last condition: (mdac->rlocn.size >= mdah->size) ...which should be: (MDA_HEADER_SIZE + (rlocn ? rlocn->size : 0) + mdac->rlocn.size >= mdah->size)) Where the "mdac" is new metadata, the "rlocn" is old metadata. So the main problem with the previous condition was that it didn't count in MDA_HEADER_SIZE properly (and possible existing metadata - the "rlocn"). This could have caused the error state where metadata in ring buffer overlap to not be hit. Replace the new condition introduced in 00348c0a630a7e5578edf48052ec695b15de752f with the improved one for the condition that existed there already but it was just incomplete.
* WHATS_NEW: recent commitsPeter Rajnoha2015-10-291-1/+2
|
* metadata: format_text: check VG metadata do not overlap themselvesPeter Rajnoha2015-10-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | We're already checking whether old and new meta do not overlap in ring buffer (as we need to keep both old and new meta during vg_write up until vg_commit). We also need to check whether the new metadata do not overlap themselves in case we don't have old metadata yet (...because we're in vgcreate). This could happen if we're creating a VG so that the very first metadata written are long enough that it wraps themselves in metadata ring buffer. Although we limited the minimum metadata area size better with the previous commit ccb8da404d00288b7d49c7a28006ec5d4687bb55 which makes the initial VG metadata overlap in ring buffer to be less probable, the risk of hitting this overlap condition is still there if we still manage to generate big enough metadata somehow. For example, users can provide many and/or long VG tags during vgcreate so that the VG metadata is long enough to start to wrap in the ring buffer again...
* metadata: format_text: check metadata area size is at least MDA_SIZE_MINPeter Rajnoha2015-10-292-1/+7
|
* tests: update test for resizeZdenek Kabelac2015-10-291-22/+6
| | | | | | | | Drop already tested 'threshold & create' which is in lvextend-thin-full.sh Count with now match faster 'dmeventd' wakeup on watermark as it's now nearly instant after crossing threshold value.
* tests: replace invalid use of 'fail' with 'die'Ondrej Kozina2015-10-291-1/+1
|
* tests: let pass bigger readaheadZdenek Kabelac2015-10-291-3/+2
| | | | | | If the underlaying device has actually bigger read-ahead settings, let it pass. But anyway switch to 512 strip-size to get really high R-A sector count.
* tests: fix wrong line has been commentedZdenek Kabelac2015-10-291-3/+3
|
* tests: no point in using shouldZdenek Kabelac2015-10-291-5/+10
| | | | lvmetad does not support lvm1 - so expect failure.
* cleanup: error is not a WARNINGZdenek Kabelac2015-10-291-1/+1
| | | | | Drop 'WARNING' from error message. It's plain error message leading to command failure.
* cleanup: remove thin low_water_mark from metadataZdenek Kabelac2015-10-294-11/+0
| | | | | | | This option could never have been printed in lvm2 metadata, so it could be safely removed as it could have been set only as 0. These configurable setting is supported via metadata profile.
* cleanup: use same typeZdenek Kabelac2015-10-291-1/+1
|
* cleanup: easier error messagesZdenek Kabelac2015-10-291-4/+4
|
* thin: enable usage of kernel low_water_markZdenek Kabelac2015-10-292-1/+14
| | | | | | | | | | Now with correctly functioning dmeventd enable usage of low_water_mark for faster reaction on pool's threshold. When user select e.g. 80% as a threshold value, dmeventd doesn't need to wait 10 seconds till monitoring timer expires, but nearly instantly resizes thin-pool to fit bellow threshold.
* thin: dmeventd plugin check number of failuresZdenek Kabelac2015-10-292-3/+17
| | | | | | If plugin's lvm command execution fails too often (>10 times), there is no point to torture system more then necessary, just log and drop monitoring in this case.
* revert: 3d03e504cda6307f692c5879f6850b2e27af7d71: message about VG metadata ↵Peter Rajnoha2015-10-291-5/+2
| | | | | | size vs. PV mda size The message needs refinement - it's not correct in all situations.
* pvs: don't treat duplicate PVs as missedDavid Teigland2015-10-271-3/+21
| | | | | | | | | | The recent addition to check for PVs that were missed during the first iteration of processing was unintentionally catching duplicate PVs because duplicates were not removed from the all_devices list when the primary dev was processed. Also change a message from warn back to verbose.