summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* dmeventd: use normal dbus send apidev-dct-notify7David Teigland2016-01-263-17/+23
| | | | the async didn't work as expected
* lvmnotify: fixes from TonyDavid Teigland2016-01-261-4/+6
|
* lvmnotify: add initial dbus notificationDavid Teigland2016-01-2617-0/+222
| | | | | | Use --enable-notify-dbus in configure. May need to remove --enable-python-bindings.
* lvmlockd: remove noisy log_debugDavid Teigland2016-01-211-3/+1
| | | | | The debug message appeared even when lvmlockd was not used, and the lockd operation was simply being skipped.
* vgimportclone: fix VG name variable reference in error message after failed ↵Peter Rajnoha2016-01-211-1/+1
| | | | PV uuid change
* cleanup: add missing prototypeZdenek Kabelac2016-01-211-0/+1
| | | | | Commit 2304286f68debd4755b44fa8b779b762142bfada missed to add function prototype.
* toollib: restore command break supportZdenek Kabelac2016-01-212-0/+5
| | | | | | | Fix regression caused by c9f021de0b4d2c873ef5b97d17c602d0380359fd. This commit actually transfered real-action (e.g. device removal) into the next loop which has however missed to check for break. So add check for break also there.
* toollib: use cmd mempool for listZdenek Kabelac2016-01-212-1/+2
| | | | | | | When creating a list in 'context of command' - use proper mempool. vg->vgmem is mempool related to VG metadata - and can be eventually locked read-only when VG struct is shared.
* doc: change fsf addressZdenek Kabelac2016-01-21690-691/+691
| | | | | Hmm rpmlint suggest fsf is using a different address these days, so lets keep it up-to-date
* cleanup: join if/elseZdenek Kabelac2016-01-211-4/+1
|
* man: show hidden piecesZdenek Kabelac2016-01-212-4/+5
| | | | | | | | W: manual-page-warning /usr/share/man/man8/lvm.8.gz 491: warning: macro `_cdata',' not defined rpmlint actually notices we had few hidden word in man page. the line cannot start with apostrophe as it has then a different meaning.
* man: dmsetupZdenek Kabelac2016-01-212-2/+3
| | | | Typo in CMD_UDEVCREATECOOKIE macro name noticed by rpmlint.
* configure: fix configure to set proper use_blkid_wiping if autodetected as ↵Peter Rajnoha2016-01-214-3/+4
| | | | | | | | | | | | | disabled If not using explicit --enable-blkid-wiping/--disable-blkid-wiping configure option, the configure script tries to enable/disable blkid wiping feature automatically based on blkid library version found. The script incorrectly set default value for lvm.conf's allocation/use_blkid_wiping" setting to "1" (enabled) if proper blkid library version was not found or the version found was less than the minimum required. It should be set to "0" in this case.
* cleanup: reformat sentence about max sizesZdenek Kabelac2016-01-202-2/+2
| | | | | | | | | | | | | | | | | | | | | | The extent size must fits all blocks in 4294967295 sectors (in 512b units) this is 1/2 KiB less then 2TiB. So while previous statement 'suggested' 2TiB is still acceptable value, make it clear it's not. As now we support any multiples of 128KB as extent size - values like 2047G will still 'flow-in' otherwise the largest power-of-2 supported value is 1TiB. With 1TiB user needs 8388608 extents for 8EiB device. (FYI such device is already unusable with todays glibc-2.22.90-27) 4GiB extent size is currently the smallest extent size which allows a user to create 8EiB devices (with 2GiB it's less then 8EiB). TODO: lvm2 may possibly print amount of 'lost/unused space' on a PV, since using such ridiculously sized extent size may result in huge space being left unaccessible.
* cleanup: drop extra cmd passed argZdenek Kabelac2016-01-201-29/+26
| | | | Use vg->cmd when needed cmd struct.
* cleanup: relocate size assignZdenek Kabelac2016-01-201-6/+10
| | | | Directly set thin-pool size when thin data LV size changes.
* cleanup: adjust onceZdenek Kabelac2016-01-201-78/+73
|
* cleanup: update check functionZdenek Kabelac2016-01-201-26/+28
| | | | | | Use display_lvname(). Use lv_is_lockd_sanlock_lv(). Order 'error' checks ahead of 'ignore' ones.
* cleanup: shuffle check of thresholdZdenek Kabelac2016-01-201-4/+7
| | | | Check first threshold and then policy_amount.
* cleanup: use log_printZdenek Kabelac2016-01-201-5/+5
| | | | | Using log_print for ignoring message instead of log_warn. Add some missing '.'.
* activation: remote node check doesn't work yetAlasdair G Kergon2016-01-201-1/+1
|
* clvmd: Initialise udev.Alasdair G Kergon2016-01-202-1/+7
| | | | | | | Since commit 2fc126b00d83991c6a2f3ed9aa61457294a4c45e, the library code requires udev to be initialised for device scanning and clvmd can fail to find VGs if devices/external_device_info_source is set to "udev".
* activation: Add lv_is_active_remotely.Alasdair G Kergon2016-01-191-12/+37
|
* locking: Add node parameter to query_resource.Alasdair G Kergon2016-01-197-13/+19
|
* man: mention GPT id for LVM in pvcreate man pagePeter Rajnoha2016-01-191-1/+2
|
* report: fix off-by-one error when reporting LV segment's metadata device ↵Peter Rajnoha2016-01-191-1/+1
| | | | | | | extent count Commit a3f484f812bfb89063fbc25e378f34cacd50bf7d used "-1" two times by mistake for the extent count when reporting seg_metadata_le_ranges.
* report: add note about seg_pe_ranges and seg_le_ranges in -o helpPeter Rajnoha2016-01-191-1/+1
|
* report: add seg_le_ranges report fieldPeter Rajnoha2016-01-196-0/+34
|
* report: make devices, metadata_devices, seg_pe_ranges and ↵Peter Rajnoha2016-01-194-11/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | seg_metadata_le_ranges fields consistent There are two basic groups of fields for LV segment device reporting: - related to LV segment's devices: devices and seg_pe_ranges - related to LV segment's metadata devices: metadata_devices and seg_metadata_le_ranges The devices and metadata_devices report devices in this format: "device_name(extent_start)" The seg_pe_ranges and seg_metadata_le_ranges report devices in this format: "device_name:extent_start-extent_end" This patch reverts partly what commit 7f74a995029caa41ee3cf9aec0bd024a34bfd89a (v 2.02.140) introduced in this area - it added [] for hidden devices to mark them for all four fields mentioned above. We won't be marking hidden devices in devices and metadata_devices fields. The seg_metadata_le_ranges field will have hidden devices marked - it's new enough that we don't need to care about compatibility much yet. The seg_pe_ranges is old enough that we shouldn't be changing this one - so we're reverting to not marking hidden devices here. Instead, there's going to be a new field "seg_le_ranges" which is going to replace the seg_pe_ranges and it will mark hidden devices - this is going to be introduced in a patch later. So in the end we'll end up with: (LV segment's devices) devices field with "device_name(extent_start)" format, not marking hidden devices seg_pe_ranges field with "device_name:extent_start-extent_end" format, not marking hidden devices (deprecated, new seg_le_ranges should be used instead for standardized format) seg_le_ranges field with "device_name:extent_start-extent_end" format, marking hidden devices (LV segment's metadata devices) metadata_devices field with "device_name:extent_start-extent_end" format, not marking hidden devices seg_metadata_le_ranges field with "device_name:extent_start-extent_end" format, marking hidden devices Also, both seg_le_ranges and seg_metadata_le_ranges will honour the report/list_item_separator setting which can be used to configure the delimiter used for list items. So, to sum it up, we will recommend using the new seg_le_ranges and seg_metadata_le_ranges fields because they display devices with standard extent range format, they can mark hidden devices and they honour the report/list_item_separator setting. We'll be keeping devices,seg_pe_ranges and metadata_devices fields for compatibility.
* report: change _format_pvsegs to return list instead of plain string, change ↵Peter Rajnoha2016-01-195-89/+132
| | | | | | | | | | | | | | associated report fields from STR to STR_LIST The associated devices,metadata_devices,seg_pe_ranges and seg_metadata_le_ranges are reported as genuine string lists now. This allows for using the items separately in -S|--select (so searching for subsets etc.) and also it allows for configuring the separator using report/list_item_separator which may be useful in scripts (however, we'll enable this only for seg_le_metadata_ranges and not for devices,seg_pe_ranges and seg_metadata_devices for compatibility reasons - see following patch).
* refactor: add 'delimiter' variable for non-default delimiter when reporting ↵Peter Rajnoha2016-01-191-14/+15
| | | | string list
* lvconvert: disallow test mode in shared VGDavid Teigland2016-01-181-0/+7
| | | | | | until test mode can be checked in all the necessary locations related to lvmlockd to prevent making actual changes.
* toollib: add comment about missing deviceDavid Teigland2016-01-181-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a comment in _process_pvs_in_vg() to document the place where there have been problems with processing PVs twice. For a while we had a hacky workaround here where we'd skip processing a PV if its device wasn't found in all_devices (and !is_missing_pv since we want to process PVs with missing devices.). That workaround was removed in commit 5cd4d46f because it was no longer needed. The workaround had originally been needed to prevent a device from being processed twice when the PV had no MDAs -- it would be processed once in its real VG and then the workaround would prevent it from being processed a second time in the orphan VG. Wrongly appearing as an orphan likely happened because lvmcache would consider the no-MDA PV an orphan unless the real VG holding that PV was also in lvmcache. This issue is also mentioned in pvchange where holding the global lock allows VGs to remain in lvmcache so PVs with 0 mdas are not considered orphans. The workaround in _process_pvs_in_vg() was originally intended for reporting commands, not for pvchange. But, it was accidentally helping pvchange also because the method described by the pvchange global lock comment had been subverted by commit 80f4b4b8. Commit 80f4b4b8 was found to be unnecessary, and was reverted in commit e710bac0. This restored the intended global lock lvmcache effect to pvchange, and it no longer relied on the workaround in toollib.
* report: Fix seg_pe_ranges LV sizes.Alasdair G Kergon2016-01-182-1/+6
| | | | | | When reporting on LVs, take the end of the range from the size of the underlying (hidden) LV rather than the logical size of the current segment (that PVs use).
* pvmove: use toollibDavid Teigland2016-01-182-124/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously, pvmove used the function find_pv_in_vg() which did the equivalent of process_each_pv() by doing: find_pv_by_name() -> get_pvs() -> get_pvs_internal() -> _get_pvs() -> get_vgids() -> /* equivalent to process_each_pv */ dm_list_iterate_items(vgids) vg = vg_read_internal() dm_list_iterate_items(&vg->pvs) With the found 'pv', it would do vg_read() on pv_vg_name(pv), and then do the actual pvmove processing. This commit simplifies by using process_each_pv() and putting the actual pvmove processing into the "single" function. This eliminates both find_pv_by_name() and the vg_read(). The processing code that followed vg_read remains the same. The return code for the pvmove command is not based on the process_each_pv return code, but is based on the success/fail conditions in the existing code.
* Revert "Revert "process_each_pv: remove unnecessary workaround""David Teigland2016-01-181-16/+1
| | | | | | This reverts commit 6d09c8c2c45ea1dea243134b8badc841a87cc979. Try again to remove the workaround.
* lvmlockd: cosemtic improvements to loggingDavid Teigland2016-01-183-25/+29
| | | | | Also pass our name to sanlock so it appears in the sanlock status output.
* lvmlockd: fix lvb validation for conversionDavid Teigland2016-01-181-0/+4
| | | | | | | Make the lvb validation rules for convert match those for unlock (even though it would be very unlikely or impossible for convert to deal with zero lvb.)
* pvchange, pvresize: fix lockd_gl() usageDavid Teigland2016-01-182-4/+10
| | | | | | | | When an orphan PV is changed/resized, the lvmlockd global lock is converted from sh to ex. If the command is changing two orphan PVs, the conversion to ex should be done only once.
* report: add kernel_cache_settings fieldPeter Rajnoha2016-01-184-0/+72
| | | | | | | | | | | | | | | | | | | Existing cache_settings field displays the settings which are saved in metadata. Add new kernel_cache_settings fields to display the settings which are currently used by kernel, including fields for which default values are used. This way users have complete view of the set of cache settings supported (and which they can set) and their values which are used at the moment by kernel. For example: $ lvs -o name,cache_policy,cache_settings,kernel_cache_settings vg LV Cache Policy Cache Settings KCache Settings cached1 mq migration_threshold=1024,write_promote_adjustment=2 migration_threshold=1024,random_threshold=4,sequential_threshold=512,discard_promote_adjustment=1,read_promote_adjustment=4,write_promote_adjustment=2 cached2 smq migration_threshold=1024 migration_threshold=1024 cached3 smq migration_threshold=2048
* post-releaseAlasdair G Kergon2016-01-164-2/+8
|
* pre-releasev2_02_140Alasdair G Kergon2016-01-164-7/+4
|
* lvm2app: fix lvm2app to return either 0 or 1 for lvm_vg_is_{clustered,exported}Peter Rajnoha2016-01-152-4/+5
| | | | | | | Fix lvm2app to return either 0 or 1 for lvm_vg_is_{clustered,exported}, including internal functions pvseg_is_allocated and vg_is_resizeable which are not yet exposed in lvm2app but make them consistent with the rest.
* lvmlockd: fixes for test modeDavid Teigland2016-01-143-14/+66
| | | | | Get the test mode working (lvmlockd running with no lock manager).
* Revert "lvmcache: skip drop when vg_write lock is not held"David Teigland2016-01-141-1/+1
| | | | | | | | | | | | | | | | This reverts e28e22b9e1e4f7243608aa24ddf43ec63afd1751 The problem that that commit was fixing (pytest failure) no longer appears with the current code, so the commit is not needed. That commit is a problem for pvchange, because it prevents lvmcache from retaining VG metadata even while the global lock is held. pvchange holds the global lock to ensure that VG metadata is kept in lvmcache throughout processing. If the cache is not kept, a PV with zero MDAs will appear first in its actual VG and then appear again in the orphan VG. It wrongly appears a second time in the orphan VG only if the actual VG is dropped from lvmcache.
* report: add kernel_discards report field to display thin pool discard used ↵Peter Rajnoha2016-01-148-0/+90
| | | | | | | | in kernel Thin pool discard mode set in metadata can be different from the one actually used if any device underneath does not support that mode. Add kernel_discard report field to make it possible to see this difference.
* Revert "process_each_pv: remove unnecessary workaround"David Teigland2016-01-141-1/+16
| | | | This reverts commit be1b1f3d8941543bcde2f42e65ed0f22fd07b122.
* lvmanip: fix last commit and drop elseZdenek Kabelac2016-01-141-1/+2
| | | | | In last commit when removing if() branch this 'else' now has to be dropped.
* cleanup: order ac membersZdenek Kabelac2016-01-141-6/+5
|
* cleanup: spacesZdenek Kabelac2016-01-141-23/+23
|