summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* dmsetup: do not suppress kernel key descriptions in tablesdev-okozinaOndrej Kozina2017-02-103-2/+77
| | | | | | | | | | Kernel 4.10 (dm-crypt v1.15.0) and later supports loading device tables with crypt segment having key in kernel keyring retention service. dmsetup hid key section of tables output. With this patch dmsetup no longer hides key section if it detects kernel key description instead of hex byte representation of key itself.
* lvreduce/lvresize: add ability to reduce the size of a RaidLVHeinz Mauelshagen2017-02-097-77/+204
| | | | | | | | | - support shrinking of raid0/1/4/5/6/10 LVs - enhance lvresize-raid.sh tests: add raid0* and raid10 - fix have_raid4 in aux.sh to allow lv_resize-raid.sh and other scripts to test raid4 Resolves: rhbz1394048
* lvconvert: add support to change RAID region size (fixup)Heinz Mauelshagen2017-02-071-19/+14
| | | | | | | | | | | | | | Commit cfb6ef654d3d1f1dd02569a1d5bd2fc252ae2494 introduced support to change RAID region size. Fix: - don't change region_size until after prompting the user - use log_print_unless_silent() instead of log_warn() - avoid superfluous sigint() calls which are already covered in yes_no_prompt() - typo Related: rhbz1392947
* lvconvert: avoid setting segment flagHeinz Mauelshagen2017-02-071-1/+0
| | | | | | | Fix: - don't set SEG_RAID in _convert_mirror_to_raid1() errounously Related: rhbz1366296
* lvconvert: add support to change RAID region size (fixup)Heinz Mauelshagen2017-02-073-39/+75
| | | | | | | | | | | | | | Commit cfb6ef654d3d1f1dd02569a1d5bd2fc252ae2494 introduced support to change RAID region size. Add: - missing conditions to support any types to function with it in lv_raid_convert(); temporary workaround used until cli validation patches get merged - tests requesting "-R " to lvconvert-raid-takeover.sh involving a cleanup of the script Related: rhbz1392947
* lvconvert: add segtype raid5_n and conversions to/from it (cleanup)Heinz Mauelshagen2017-02-072-5/+15
| | | | | | | | | | Cleanups as of Jons review: - enhance comment about mandatory raid4 <-> raid5_n activation w/o metadata SubLVs - remove bogus segment flag setting - fix to sync related comments on conversions to raid0/striped and amongst raid4/5 - add missing error message for non-synced conversion to raid0/striped Related: rhbz1366296
* lvconvert: add support to change RAID region sizeHeinz Mauelshagen2017-02-074-2/+198
| | | | | | | | | | Add: - support to change region size of existing RaidLVs (all RAID LV types but raid0/raid0_meta) - lvconvert-raid-regionsize.sh with test variations for different RAID types and region sizes Resolves: rhbz1392947
* tests: drop zeroingZdenek Kabelac2017-02-061-11/+11
| | | | | | | Well waiting for zeroing may take enough time to finish 'raid' sync. So make the test running faster without zeroing and better avoid race to have chance to happen (i.e. lvcreate is finished after array gets already in sync).
* tests: drop /tmp polutionZdenek Kabelac2017-02-061-2/+0
| | | | Drop forgotten extra metadata debug.
* cleanup: hide gcc warningZdenek Kabelac2017-02-061-2/+2
| | | | | Gcc is not clever enough to see these vars are actually initialize in given code path so let's just make sure it has a value.
* debug: add space before uuidZdenek Kabelac2017-02-051-5/+5
| | | | | | With commit 88534625282e8d533ae439ed308a285da10e3ef0 we added uuid right after device name. Add space between them. (Also fix some indenting)
* comment: updateZdenek Kabelac2017-02-051-1/+1
| | | | Fix can -> cannot.
* cleanup: rename to use track_ prefixZdenek Kabelac2017-02-051-9/+10
| | | | | | Since we use 'track_' prefix for other deps tracking, convert skip_external_lv to use same logical meaning. (just converts 1->0 0->1)
* clvmd: add mutex protection for cpg_ callZdenek Kabelac2017-02-052-0/+5
| | | | | The library for corosync multicasting is not supporting multithread usage - add local mutex to avoid parallel call of cpg_mcast_joined().
* lvconvert: add segtypes raid6_{ls,rs,la,ra}_6 and conversions to/from itHeinz Mauelshagen2017-02-056-225/+248
| | | | | | | | | | | | Add: - support for segment types raid6_{ls,rs,la,ra}_6 (striped raid with dedicated last Q-Syndrome SubLVs) - conversion support from raid5_{ls,rs,la,ra} to/from raid6_{ls,rs,la,ra}_6 - setting convenient segtypes on conversions from/to raid4/5/6 - related tests to lvconvert-raid-takeover.sh factoring out _lvcreate,_lvconvert funxtions Related: rhbz1366296
* WHATS_NEW: New segment type raid6_n_6Heinz Mauelshagen2017-02-041-0/+1
|
* lvconvert: add segtype raid6_n_6 and conversions to/from itHeinz Mauelshagen2017-02-044-21/+140
| | | | | | | | | Add: - support for segment type raid6_n_6 (striped raid with dedicated last parity/Q-Syndrome SubLVs) - conversion support from striped/raid0/raid0_meta/raid4 to/from raid6_n_6 - related tests to lvconvert-raid-takeover.sh Related: rhbz1366296
* WHATS_NEW: New segment type raid5_nHeinz Mauelshagen2017-02-031-0/+1
|
* lvconvert: add segtype raid5_n and conversions to/from itHeinz Mauelshagen2017-02-031-11/+2
| | | | | | | | Change: - missed a return_0 - use lvseg_name() rather than my own function Related: rhbz1366296
* lvconvert: add segtype raid5_n and conversions to/from itHeinz Mauelshagen2017-02-035-85/+259
| | | | | | | | | Add: - support for segment type raid5_n (striped raid with dedicated last parity SubLVs) - conversion support from striped/raid0/raid0_meta/raid4 to/from raid5_n - related tests to lvconvert-raid-takeover.sh Related: rhbz1366296
* lvmdbusd: cmdhandler.py, remove duplicate codeTony Asleson2017-02-011-9/+7
| | | | Move similar code to common functions, less is more!
* lvmdbusd: manager.py, remove duplicate codeTony Asleson2017-02-011-26/+16
| | | | Move similar code to common functions, less is more!
* lvmdbusd: lvmdb.py, remove duplicate codeTony Asleson2017-02-011-23/+16
| | | | Move similar code to common functions, less is more!
* lvmdbusd: pv.py, remove duplicate codeTony Asleson2017-02-011-40/+25
| | | | Move similar code to common functions, less is more!
* lvmdbusd: vg.py, remove duplicate codeTony Asleson2017-02-011-290/+128
| | | | Move similar code to common functions, less is more!
* lvmdbusd: lv.py, remove duplicate codeTony Asleson2017-02-011-176/+92
| | | | Move similar code to common functions, less is more!
* man: add update_filemap to dmstats.8.indev-bmr-dmstats-filemap-updateBryn M. Reeves2017-01-251-0/+26
|
* dmstats: allow --filemap groups to be updatedBryn M. Reeves2017-01-251-9/+122
| | | | | | | | | | | | | | | Add a new update_filemap command to dmstats that allows a filemap group to be updated: # dmstats update_filemap --groupid 0 vm.img /var/lib/libvirt/images/vm.img: Updated group ID 0 with 137 region(s). This will update the set of regions mapped to the file to reflect the current file system allocation. Currently this needs to be run manually - a future update will add support for monitoring file maps via a daemon, allowing them to be automatically updated when the underlying file is modified.
* libdm: add dm_stats_update_regions_from_fd()Bryn M. Reeves2017-01-253-37/+391
| | | | | | | | | | | | | | | | | | | | | | | Add a call to update the regions corresponding to a file mapped group of regions. The regions to be updated must be grouped, to allow us to correctly identify extents that have been deallocated since the map was created. Tables are built of the file extents, and the extents currently mapped to dmstats regions: if a region no longer has a matching file extent, it is deleted, and new regions are created for any file extents without a matching region. The FIEMAP call returns extents that are currently in-memory (or journaled) and awaiting allocation in the file system. These have the FIEMAP_EXTENT_UNKNOWN | FIEMAP_EXTENT_DELALLOC flag bits set in the fe_flags field - these extents are skipped until they have a known disk location. Since it is possile for the 0th extent of the file to have been deallocated this must also handle the possible deletion and re-creation of the group leader: if no other region allocation is taking place the group identifier will not change.
* libdm: test for DM_STATS_GROUP_NOT_PRESENT in _stats_group_id_presentBryn M. Reeves2017-01-251-0/+3
| | | | | | If the group_id passed to _stats_group_id_present is equal to the special value DM_STATS_GROUP_NOT_PRESENT there is no need to perform any further tests: return false immediately.
* libdm: fix stats comment formatting in libdevmapper.hBryn M. Reeves2017-01-241-3/+3
|
* toolcontext: action for LVM_RUN_BY_DMEVENTD env varZdenek Kabelac2017-01-232-0/+8
| | | | | When LVM_RUN_BY_DMEVENTD is set to 1, ensure there will be no interaction with dmeventd.
* dmeventd_thind: set LVM_RUN_BY_DMEVENTDZdenek Kabelac2017-01-231-5/+9
| | | | | Set LVM_RUN_BY_DMEVENTD envvar to expose the command is runing from dmeventd environment.
* clean: move code to lib partZdenek Kabelac2017-01-233-4/+13
| | | | | Move actual processing part of the lvm2_disable_dmeventd_monitoring() into a /lib part so we can reuse the code later for other cases.
* tests: umount when above 95Zdenek Kabelac2017-01-211-0/+6
| | | | | Add code to check if resulting data or metadata remained over 95% and in such case invoke umount.
* tests: properly quote heredocZdenek Kabelac2017-01-211-7/+9
| | | | | | Prepend \$ for vars which should remain in script. Also drop --lazy umount. Move inittest call up, so mntdir and mntusedir have proper full path.
* tests: implement umount in scriptZdenek Kabelac2017-01-211-0/+16
| | | | | | Since dmeventd no longer umounts thin devices, such logic needs to be implemented by external script. Add some very simple one for the start.
* tests: enusure units in TiBZdenek Kabelac2017-01-211-4/+4
|
* dmeventd_thin: internal command without lvm prefixZdenek Kabelac2017-01-211-1/+2
| | | | Internal command processing needs to go without 'lvm ' prefix.
* dmeventd_thin: enable support for external commandZdenek Kabelac2017-01-212-2/+2
| | | | | With this commit we start to support configurable action from thin-pool monitoring via 'dmeventd/thin_command'
* dmeventd_thin: new logic for calling commandsZdenek Kabelac2017-01-201-20/+24
| | | | | | | | | | | | | | | | | | | | | | | For more advanced support we need to ensure better logic for calling external much more advanced script for maintanance of thin-pool. So this new code ensures: When thin-pool data or metadata is bigger then 50%, then with each 5% increment, action is called. This is independent from autoextend_threshold. This action always happens when thin-pool is over threshold, (so no action when it's exactly i.e. 60%). The only exception is 100% full thin-pool - which invokes 'last' action. Since thin-pool occupancy may change also downward, code needs to also handle possibly reduction of occupancy of thin-pool. So when usage drop from 90% to 50%, thin-pool will start to call again action when it will pass 55% threshold. This give external commands lot of option i.e. to call 'fstrim' before actual resize is needed.
* dmeventd_thin: drop umounting on error pathZdenek Kabelac2017-01-201-257/+2
| | | | | | | Default internal logic will stop trying to do any 'rescue' action when executed command fails. This will be now fully in hands of external script if such behaviour is needed.
* dmeventd_thin: rework failure handlingZdenek Kabelac2017-01-201-8/+20
| | | | | | | | | Instead of stopping monitoring after couple failing retries, keep monitoring forever, just make larger delays between command retries (ATM upto ~42 minutes). So syslog is not spammed too often, yet commands have a chance to be retried and succeed eventually...
* dmeventd_thin: SIGCHLD handlerZdenek Kabelac2017-01-201-0/+40
| | | | | | To improve reaction time on when child is finished, lets handle SIGCHLD in particular thread. Let's hope kernel will route SIGCHLD to matching thread.
* dmeventd_thin: init commandZdenek Kabelac2017-01-201-0/+16
| | | | | | When dmeventd configured command does not start with 'lvm ' prefix, it's going to be an 'external' command. In this case we split command by spaces to argv strings.
* dmeventd_thin: add wait_pidZdenek Kabelac2017-01-201-0/+55
| | | | Add support handling command exit.
* dmeventd_thin: add run_commandZdenek Kabelac2017-01-201-4/+49
| | | | | Implement forking of executable command. When command is forked, dmeventd may continue monitor device.
* dmeventd_thin: better warning logicZdenek Kabelac2017-01-201-7/+12
| | | | | | When fullness is passing WARN_THRESHOLD, print warning, when it drops bellow and crossed again, we should print warning again, but always only once.
* dmeventd_thin: switch to struct percentZdenek Kabelac2017-01-201-18/+15
| | | | | Later we can use stored percent values to pass them to executed commands.
* dmeventd_thin: handling of internal commandZdenek Kabelac2017-01-201-0/+16
|