summaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* Add 'vgscan --cache' functionality for consistency with 'pvscan --cache'.Peter Rajnoha2012-03-272-6/+20
| | | | | | | | Calling vgscan alone should reuse information from the lvmetad (if running). The --cache option should initiate direct device scan and update lvmetad appropriately (if running). This is mainly for vgscan to behave consistently compared to pvscan.
* Keep exclusive activation in pvmove if LV is already active.Milan Broz2012-03-261-1/+1
| | | | | | | Pvmove should never try to downgrade exclusive lock for LVs. This allows pvmove to work again for exclusive activated LVs.
* Do not allow pvmove if some affected LVs are activatedMilan Broz2012-03-261-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | locally or on more nodes while others are activated exclusively. Current pvmove code can either use local mirror (for exclusive activation) or cmirror (for clustered LVs). Because the whole intenal pvmove LV is just segmented LV containing segments of several top-level LVs, code cannot properly handle situation if some segment need to be activated exclusively. Previously, it wrongly activated exclusive LV on all nodes (locing code allowed it) but now this is no lnger possible. If there is exclusively activated LV, pvmove is only possible if all affected LVs are aslo activated exclusively. (Note that in non-exclusive mode pvmove still activates LVs on other nodes during move.) # lvchange -aly vg_test/lv1 # lvchange -aey vg_test/lv2 # pvmove -i 1 /dev/sdc Error locking on node bar-01: Device or resource busy Error locking on node bar-03: Volume is busy on another node ... Failed to activate lv2
* Use new flag PVMOVE_EXCLUSIVE in update_metatada call.Milan Broz2012-03-261-5/+11
| | | | | | | There is no real functional change in this patch except it avoids checking cluster cmirror module twice. (Flag used in following patch.)
* Update and fix monitoring of thin pool devicesZdenek Kabelac2012-03-232-8/+7
| | | | | | | | | | | | | Code adds better support for monitoring of thin pool devices. update_pool_lv uses DMEVENTD_MONITOR_IGNORE to not manipulate with monitoring. vgchange & lvchange are checking real thin pool device for existance as we are using _tpool real device and visible LV pool device might not be even active (_tpool is activated implicitely for any thin volume). monitor_dev_for_events is another _lv_postorder like code it might be worth to think about reusing it here - for now update the code to properly monitory thin volume deps. For unmonitoring add extra code to check the usage of thin pool - in case it's in use unmonitoring of thin volume is skipped.
* Fix a regression in handling --major/--minor arguments to lvcreate & lvchange,Petr Rockai2012-03-162-1/+17
| | | | by allowing arg_int_value to be used with groupable options.
* Fix error message when pvmove LV activation fails with name already in use.Alasdair Kergon2012-03-131-1/+1
|
* Fix error path for create_toolcontextZdenek Kabelac2012-03-121-1/+4
| | | | | | | Never return unfinished toolcontext - since error path is hit on various stages of initialization we cannot leave it partially uninitialized, since we would need to spread many more test across the code for config_valid. Instead return NULL and properly release udev library resources as well.
* Fix warn message and update man pageZdenek Kabelac2012-03-061-3/+5
| | | | | | | | | | Fix regression in man page. The chunk size is in kilobyte units on command line input though in the source code we work with sector size unit so make it clear in the man page. Update chunksize for thin pool in man page - it's max value is 1024M == 1G. Fix warning range message to show proper max value.
* close ]Alasdair Kergon2012-03-061-1/+1
|
* Adjust wordingAlasdair Kergon2012-03-061-1/+1
|
* Switch pvscan --cache major:minor to --major --minor.Alasdair Kergon2012-03-067-56/+86
|
* Some more missing supposedly 64bit operations.Zdenek Kabelac2012-03-051-2/+2
| | | | Avoid use 32bit math for extent_size.
* Fit thin pool metadata into 128MBZdenek Kabelac2012-03-051-1/+17
| | | | | | | | | If the lvcreate may decide some automagical values for a user, try to keep the pool metadata size into 128MB range for optimal perfomance (as suggested by Joe). So if the pool metadata size and chunk_size were not specified, try to select such values they would fit into 128MB size.
* Check for multiple mangled names in auto mangling mode.Peter Rajnoha2012-03-051-0/+6
| | | | | Auto mode can't deal with multiple mangled names. We can do that while working in hex mode, but in auto mode, this would lead to device name ambiguity.
* Add FIXMEsZdenek Kabelac2012-03-041-0/+8
| | | | Processing loop needs some thinking
* Scan all devices for lvmetad if 'pvscan --cache' used without device list.Alasdair Kergon2012-03-033-10/+104
|
* Obtain VG list from lvmetad before relying on get_vgs, otherwise PVs in VGsAlasdair Kergon2012-03-031-2/+6
| | | | don't appear.
* Reinstate accidentally-deleted line.Alasdair Kergon2012-03-031-0/+1
|
* Merge metadata size checkingZdenek Kabelac2012-03-021-38/+24
| | | | | | Move the code for poolmetadatasize operation into one place. Report override for minimum and maximum size. Drop _read_thin_params function its error reporting is handled elsewhere.
* Change pvscan --lvmetad to pvscan --cache.Alasdair Kergon2012-03-023-6/+6
|
* Fix estimation of pool metadata device sizeZdenek Kabelac2012-03-021-2/+2
| | | | | | | If no size was give the later added minimal size check efectively disable this code. Also the argument for size now must be kept in sector_size, so adding division by SECTOR_SIZE (moved into a const expression)
* Allow multiple device names with pvscan --lvmetad.Alasdair Kergon2012-03-023-10/+33
| | | | | | Hold global lock in pvscan --lvmetad. (This might need refinement.) Add PV name to "PV gone" messages. Adjust some log message severities. (More changes needed.)
* Reinstate error if e.g. daemon comms fails.Alasdair Kergon2012-03-021-1/+2
|
* Check for error from dup2Zdenek Kabelac2012-03-011-3/+3
| | | | Do not take correct fd as error result.
* Add some more pointer validationZdenek Kabelac2012-03-011-3/+8
| | | | | Ensure _display_name() and _add_dep() would not deref NULL names. Switch to use internal dm_basename().
* Test alloc failZdenek Kabelac2012-03-011-1/+3
|
* Replace goto with just log_debugZdenek Kabelac2012-03-011-1/+1
| | | | | FIXME: temporal quick hack to make things green There might be a better reaction.
* Check for alloc errorZdenek Kabelac2012-03-011-2/+5
| | | | Simplify segtype_str usage and check for NULL segtype.
* Log sys errorsZdenek Kabelac2012-03-011-3/+6
|
* Backtrace for failing drop_cached_metadataZdenek Kabelac2012-03-012-2/+4
|
* Correct enum typeZdenek Kabelac2012-03-012-4/+4
| | | | Using debug_t and some forgetten alloc_policy_t, force_t from past commit.
* Few more close and dev_close traceZdenek Kabelac2012-03-011-4/+6
| | | | Adding (void) where we cannot really report an error.
* Reflect new file locations, include file updates etc.Alasdair Kergon2012-02-281-3/+1
|
* Check return values after calling new lvmetad fnsAlasdair Kergon2012-02-286-12/+22
| | | | (Haven't checked error path handling though)
* Using enum types for enumsZdenek Kabelac2012-02-2812-32/+33
| | | | alloc_policy_t, dm_string_mangling_t, percent_range_t, sign_t
* Duplicate standard in/out descriptors for daemonZdenek Kabelac2012-02-281-4/+21
| | | | | | | | | | | | | | | Addressing somewhat tricky bug here. Since stdin,stdout,stderr were closed it's been occasionally possible to see some unexpected messages to be flowing into a clvmd and generating some randomly sized allocation of many megabytes. Since the message was not being generated by standard send_message() construction, after some more testing it apperead to be a debug log message - thus something has flown to local socket opened on strandard out descriptor. To fix the issue - use standard file descriptor duplication code for daemons. For making easier debugging of polling daemon - developer might want to recompile without modifition of standard file descriptors.
* Add some log_sys_errors to close() callZdenek Kabelac2012-02-271-3/+5
|
* Make force_t enum usage obviousZdenek Kabelac2012-02-272-2/+2
|
* Always check result of _set_vg_name()Zdenek Kabelac2012-02-271-4/+6
|
* Keep same sign for 's' counterZdenek Kabelac2012-02-231-1/+2
|
* Require number of stripes to be greater than parity devices in higher RAID.Jonathan Earl Brassow2012-02-231-3/+4
| | | | | Also, add some comments to code that I recently added that may be unclear otherwise.
* The lvmetad client-side integration. Only active when use_lvmetad = 1 is set inPetr Rockai2012-02-2312-6/+35
| | | | lvm.conf *and* lvmetad is running.
* Allow 'lvconvert --repair' to operate on RAID 4/5/6.Jonathan Earl Brassow2012-02-221-1/+2
| | | | | The higher level RAIDs should be allowed for repair along with 'mirror' and 'raid1' segment types.
* Add some messages that indicate completion of RAID device replacement.Jonathan Earl Brassow2012-02-221-1/+9
| | | | | | There were no messages printed upon completiion of RAID device replacement. This could cause confusion/concern during automated recovery, because the user sees the failure messages but no other messages indicating correction.
* Fix a bad return code in 'lvconvert_raid'Jonathan Earl Brassow2012-02-221-4/+3
| | | | Functions at this level do return 0 or 1, not ECMD_* values.
* Initialize dmeventd monitoring for every commandZdenek Kabelac2012-02-156-28/+7
| | | | | | | | | | Read lvm.conf setting for monitoring for each command. So we should not activate monitoring if the default compilation is set to monitor during lvconvert commnads. Patch also removes check for clustered VG and allows to disable monitoring for clustered VG with the assumption, the problem with monitoring and dmeventd flag passing for INGNORE is already fixed.
* Simplify with dm_strdupZdenek Kabelac2012-02-151-2/+1
|
* Fix segfault in dmsetup when using table specification with --table.Peter Rajnoha2012-02-151-1/+5
| | | | | Segfault introduced with the patch that added dm_free(_table) at the end of dmsetup (in this release).
* Turn a warning to an error in vgreduce --removemissing, since we exit with aPetr Rockai2012-02-151-2/+2
| | | | failure status there.