summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* dmfilemapd: do not wait if file has been truncateddev-bmr-dmfilemapd-truncatedBryn M. Reeves2017-06-071-7/+9
|
* dmfilemapd: update file block count at daemon startBryn M. Reeves2017-06-071-11/+17
| | | | | | | | | | | The file block count stored in the filemap_monitor was lazily initialised at the time of the first check. This causes problems in the case that the file has been truncated between this time and the time the daemon started: the initial block count and current block count match and the daemon fails to detect a change. Separate the setting of the block count from the check and make a call to update the value at the start of _dmfilemapd().
* libdm: allow truncated files dm_stats_update_regions_from_fd()Bryn M. Reeves2017-06-072-12/+13
| | | | | | | It's not an error to attempt to update regions from an fd that has been truncated (or otherwise no longer has any allocated extents): in this case, the call should remove all regions corresponding to the group, and return an empty region table.
* lvconvert: reject RAID conversions on inactive LVsHeinz Mauelshagen2017-06-071-9/+16
| | | | | | | | | | | Only support RAID conversions on active LVs. If we'd accept e.g. upconverting linear -> raid1 on inactive linear LVs, any LV flags passed to the kernel aren't properly cleared thus errouneously passing them on every activation. Add respective check to lv_raid_change_image_count() and move existing one in lv_raid_convert() for better messages.
* lvmdbusd: Prevent stall when update thread gets exceptionTony Asleson2017-06-021-2/+8
| | | | | | | | If during the process of fetching current lvm state we experience an exception we fail to call set_result on the queued_requests we were processing. When this happens those threads block forever which causes the service to stall infinitely. Only clear the queued_requests after we have called set_result.
* lvmdbusd: Add background command to flight recorderTony Asleson2017-06-022-7/+20
| | | | | | | | We were not adding background tasks to flight recorder. Add the meta data to the flight recorder when we start the command and update the meta data when the command is finished. Locking was added to meta data to prevent concurrent update and returning string representation as these can happen in two different threads.
* lvmdbusd: cmdhandler.py vg_reduce, remove extranous '--all'Tony Asleson2017-06-021-2/+2
| | | | | | | | | | | | | | | vgreduce previously allowed --all and --removemissing together even though it only actual did the remove missing. The lvm dbus daemon was passing --all anytime there was no entries in pv_object_paths. This change supplies --all if and only if we are not removing missing and the pv_object_paths is empty. Vgreduce has and continues to enforce the invalid combination of supplying a device list when you specify --all or --removemissing so we do not need to check for that invalid combination explicitly in the lvm dbus service as it's already covered. Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1455471
* lvconvert: choose direct path to desired raid levelHeinz Mauelshagen2017-06-021-1/+1
| | | | | | Remove superfluous raid5_n interim LV type from raid4 -> raid10 conversion. Resolves: rhbz1458006
* print warning about in-use orphansDavid Teigland2017-06-012-0/+37
| | | | | | | | | | | | | | | | | | | | | | Warn about a PV that has the in-use flag set, but appears in the orphan VG (no VG was found referencing it.) There are a number of conditions that could lead to this: . The PV was created with no mdas and is used in a VG with other PVs (with metadata) that have not yet appeared on the system. So, no VG metadata is found by lvm which references the in-use PV with no mdas. . vgremove could have failed after clearing mdas but before clearing the in-use flag. In this case, the in-use flag needs to be manually cleared on the PV. . The PV may have damanged/unrecognized VG metadata that lvm could not read. . The PV may have no mdas, and the PVs with the metadata may have damaged/unrecognized metadata.
* disable repairing in-use flag on orphan PVsDavid Teigland2017-06-012-0/+18
| | | | | | | | | A PV holding VG metadata that lvm can't understand (e.g. damaged, checksum error, unrecognized flag) will appear as an in-use orphan, and will be cleared by this repair code. Disable this repair until the code can keep track of these problematic PVs, and distinguish them from actual in-use orphans.
* tests: longer delayZdenek Kabelac2017-05-311-3/+3
| | | | | Slower sync a bit more and use bigger raid arrays to be more sure we will catch raid being sychronized.
* tests: add some extra udev waitsZdenek Kabelac2017-05-311-1/+17
| | | | | To get less random results on older systems with systemd (i.e. fc23) put few extra udev wait operations to avoid any udev event collision.
* tests: skip reshaping raid10Zdenek Kabelac2017-05-311-1/+5
| | | | Needs newer target >= 1.10.1 for reshaping of raid10 LVs.
* lvconvert: reject changing number of stripes on single coreHeinz Mauelshagen2017-05-301-0/+12
| | | | | | | | Reject any stripe adding/removing reshape on raid4/5/6/10 because of related MD kernel deadlock on single core systems until we get a proper fix in MD. Related: rhbz1443999
* tests: missed to export lvm binary for fsadmZdenek Kabelac2017-05-301-0/+1
|
* tests: drop extra debug vvvvZdenek Kabelac2017-05-301-2/+3
| | | | Also show output of mount so when it fails we can check the state.
* tests: also check new flag with segtypeZdenek Kabelac2017-05-301-3/+6
| | | | Make sure new unknown flag is having same behavior as old unknown segtype.
* flags: improve unknown flags logicZdenek Kabelac2017-05-301-12/+22
| | | | | Use same logic as with unknown segment type - so preserve such name fully with all flags just with UNKNOWN segment type bits.
* flags: restore same logic with MISSINGZdenek Kabelac2017-05-301-0/+1
| | | | | | | | Since lvmetad is using 'MISSING' in status for 'another' purpose, we need to support ATM also flag get from this place. Until fixed better - we accept both flags - alhough lvm2 will only print in flags.
* flags: add segtype flag supportZdenek Kabelac2017-05-295-5/+30
| | | | | | | | | | | Switch METADATA_FORMAT flag usage to be stored via segtype instead of 'status' flag which appeared to cause major incompatibility troubles. For backward compatiblity segtype flags are still accepted also via 'status' bits which were used from version 2.02.169 so metadata saved by this newer lvm2 version should still work nicely, although new save version will no longer work on this older lvm2 version.
* flags: add read and print of segtype flagZdenek Kabelac2017-05-293-0/+62
| | | | | | | | Allow storing LV status bits with segment type name field. Switching to this since this field has better support for compatibility with older version of lvm2 - since such unknown segtype will not cause complete invisiblity of metadata from older lvm2 code - just the particular LV will become unusable with unknown type of segment.
* cleanup: backtraceZdenek Kabelac2017-05-291-5/+5
| | | | Add debug backtrace.
* cleanup: separate type and maskZdenek Kabelac2017-05-294-17/+20
| | | | | Split misused 'enum' into 2 fields - one for type of PV, VG, LV and other for mask.
* cleanup: bad flag is internal error hereZdenek Kabelac2017-05-291-1/+1
| | | | Convert to internal error.
* tests: wait for raid in syncZdenek Kabelac2017-05-291-0/+1
| | | | Lvchange needs synchronized raid.
* test: Fix dbus testing using testsuiteMarian Csontos2017-05-261-1/+6
| | | | | | - Must reread all objects as PVs might be removed. - Never consider testsuite provided PVs nested, or tearDown fails to remove any outstanding VGs on them.
* test: Use _pv suffix for nested devicesMarian Csontos2017-05-261-3/+4
| | | | | Testsuite uses global_filter to accept only test devices with suffix matching /_pv[0-9_]*$/ set by generate_config in aux.sh.
* spec: Enable notify-dbus in builds with dbusMarian Csontos2017-05-261-0/+1
|
* Proper dm_snprintf return checksHeinz Mauelshagen2017-05-241-7/+7
|
* Fix typoHeinz Mauelshagen2017-05-241-1/+1
|
* add comment about PV in-use repairDavid Teigland2017-05-231-0/+30
| | | | | copied from commit message for d97f1c89deb9a75452059cd62ebb20cf7d2d6bfa
* man lvmsystemid: change some wordingDavid Teigland2017-05-231-10/+9
| | | | Clarify the wording in a couple cases.
* tests: fix test for fsadmZdenek Kabelac2017-05-231-3/+4
| | | | | Avoid mountinfo Pass 'y' - since ATM lvresize cannot pass --yes to fsadm.
* fsadm: avoid hidden --yesZdenek Kabelac2017-05-232-2/+8
| | | | | | | When 'fsadm' was running without terminal (i.e. pipe), it's been automatically working like in '--yes'. Detect terminal and only accept empty "" input in this mode.
* raid: Drop unnecessary/incorrect use of dm_pool_freeAlasdair G Kergon2017-05-231-3/+0
|
* metadata: Unlock VG on more _vg_make_handle error pathsAlasdair G Kergon2017-05-231-7/+19
| | | | | Internal error: VG lock vg0 must be requested before vg3, not after. Internal error: 3 device(s) were left open and have been closed.
* format_text: More internal errors if given invalid internal metadataAlasdair G Kergon2017-05-221-2/+17
| | | | | Three more messages to ensure each failure in out_areas() results in a low-level message instead of sometimes just <backtrace>.
* man lvmraid: add more indirect conversion infoDavid Teigland2017-05-221-2/+51
|
* tests: catch some fsadm tricky pathsZdenek Kabelac2017-05-221-0/+98
| | | | | When user is renaming a device, we are getting into troubles. We needs to recognize which case is actually supportable by fsadm.
* fsadm: enhance detection of already mounted volumesZdenek Kabelac2017-05-222-9/+113
| | | | | | | Add more validation to catch mainly renamed devices, where filesystem utils are not able to handle devices properly, as they are not addressed by major:minor by rather via some symbolic path names which can change over time via rename operation.
* fsadm: always detect mounted fs with extXZdenek Kabelac2017-05-221-1/+4
| | | | | | Since we add more validation to 'detect_mounted' function make sure we always use it even with 'resize' action, so numerous validations are not skipped.
* man lvmraid: indirect conversionsDavid Teigland2017-05-181-41/+40
| | | | | | Start documenting multi-step conversions. Don't number examples.
* lvconvert: fix logic in automatic settings of possible (raid) LV typesHeinz Mauelshagen2017-05-181-14/+19
| | | | | | | | | Commit 5fe07d3574ddce3d194f0fa57af9028348a91008 failed to set raid5 types properly on conversions from raid6. It always enforced raid6_ls_6 for types raid6/raid6_zr/raid6_nr/raid6_nc, thus requiring 3 conversions instead of 2 when asking for raid5_{la,rs,ra,n}. Related: rhbz1439403
* lvmdbusd: Fix missed renameMarian Csontos2017-05-181-1/+1
| | | | | Introduced By: e53454d6 (2.02.169) Related: RHBZ#1348688
* lvconvert: fix indent and typo in last commitHeinz Mauelshagen2017-05-181-3/+3
|
* lvconvert: enhance automatic settings of possible (raid) LV typesHeinz Mauelshagen2017-05-182-91/+222
| | | | | | | | | | | | | | | | Offer possible interim LV types and display their aliases (e.g. raid5 and raid5_ls) for all conversions between striped and any raid LVs in case user requests a type not suitable to direct conversion. E.g. running "lvconvert --type raid5 LV" on a striped LV will replace raid5 aka raid5_ls (rotating parity) with raid5_n (dedicated parity on last image). User is asked to repeat the lvconvert command to get to the requested LV type (raid5 aka raid5_ls in this example) when such replacement occurs. Resolves: rhbz1439403
* lvmdbusd: Fix notify_dbus mangling config optionMarian Csontos2017-05-171-1/+3
| | | | | | | If config option is passed by caller, dbusd appends to the option not to the value, and also without using delimiter. Bug: RHBZ#1451612
* test: Fix conditionMarian Csontos2017-05-171-1/+1
|
* test: Fix skipped cleanupMarian Csontos2017-05-171-1/+1
|
* test: add missing yes option to lvconvert stripe removalHeinz Mauelshagen2017-05-161-1/+1
|