summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix cling policy not to behave like normal policy if no previous LV seg.Alasdair Kergon2012-05-111-26/+33
| | | | Fix alloc cling to cling to PVs already found with contiguous policy.
* Fix allocation policy loop so it doesn't continue beyond cling using laterAlasdair Kergon2012-05-111-3/+3
| | | | | policies it shouldn't be using when --alloc cling is specified but no tags are defined.
* Append _TO_LVSEG to names of internal A_CONTIGUOUS and A_CLING flags.Alasdair Kergon2012-05-111-12/+14
| | | | Remove some unnecesary prev_lvseg checks.
* Always include debug mesg when cling to allocated is set.Alasdair Kergon2012-05-111-1/+1
|
* Refactor _has_matching_pv_tag to provide a fn that takes PV structs.Alasdair Kergon2012-05-111-7/+12
|
* More comments on metadata area types.Peter Rajnoha2012-05-101-2/+5
|
* Comment on auxiliary metadata areas.Peter Rajnoha2012-05-101-2/+5
|
* Fix division by zero if PV with zero PE count is used during vgcfgrestore.Peter Rajnoha2012-05-091-1/+1
|
* Fix regression in for_each_sub_lvZdenek Kabelac2012-05-091-7/+0
| | | | | | pool_lv is not a sub lv in terms for this function. It has caused problem with renaming thin_volume, where it has tried to rename pool LV as well.
* Fix up-convert when mirror activation is controled by volume_list and tags.Jonathan Earl Brassow2012-05-051-1/+15
| | | | | | | | | | | | When mirrors are up-converted, a transient mirror layer is put in so that only the new devices are sync'ed. That transient layer must carry the tags of the original mirror LV, otherwise it will fail to activate when activation is regulated by lvm.conf:activation/volume_list. The conversion would then fail. The fix is to do exactly the same thing that is being done for linear -> mirror converting (lib/metadata/mirror.c:_init_mirror_log()). We copy the tags temporarily for the new LV and remove them after the activation.
* Disallow snapshots of mirror segment types.Jonathan Earl Brassow2012-05-011-6/+4
| | | | | | | | | | | Snapshots of RAID logical volumes are allowed (including "raid1"). However, snapshots of "mirror" logical volumes has been disallowed due to unsolvable issues inherent to the design. The fact that mirroring (dm-raid1.c) must stop all I/O as the result of a failure and wait for userspace intervention can lead to a circular dependency if userspace is simultaneously waiting for snapshots (on mirrors) to make an I/O update before proceeding. Various snapshot on mirror tests have been removed as a result.
* Disallow changing cluster attribute of VG while RAID LVs are active.Jonathan Earl Brassow2012-04-251-3/+5
| | | | | Mirror and snapshot LVs are already checked for when switching the cluster attribute of a VG. This patch adds RAID.
* Allow a subset of failed devices to be replaced in RAID LVs.Jonathan Earl Brassow2012-04-241-0/+18
| | | | | | If two devices in an array failed, it was previously impossible to replace just one of them. This patch allows for the replacement of some, but perhaps not all, failed devices.
* Add some lock commentsZdenek Kabelac2012-04-241-5/+5
|
* Handle replacement of an active device that goes missing with an error device.Alasdair Kergon2012-04-241-7/+25
| | | | (E.g. lvchange --refresh --partial on striped LV if a PV disappeared.)
* Unlike 'mirror' segtype, 'raid1' should perform flush on suspend.Jonathan Earl Brassow2012-04-201-1/+2
| | | | | | | | | | The 'mirror' segtype and 'raid1' segtype both set the 'MIRRORED' flag. However, due to differences in the way these device-mapper targets behave 'mirror' must be suspended with the 'noflush' option and 'raid1' does not have to be. This patch ensures that when the 'MIRRORED' flag is checked to see if 'noflush' is needed that it does not also set it for 'raid1' by mistake.
* Fix code that performs RAID device replacement while under snapshot.Jonathan Earl Brassow2012-04-121-4/+4
| | | | | | | The code should have been calling [suspend|resume]_lv_origin() rather than [suspend|resume]_lv. This addresses bug 807069.
* Fix inability to split RAID1 image while specifying a particular PV.Jonathan Earl Brassow2012-04-111-19/+40
| | | | | | | | The logic for resuming the original and newly split LVs was not properly done to handle situations where anything but the last device in the array was split. It did not take into account the possible name collisions that might occur when the original LV undergoes the shifting and renaming of its sub-LVs.
* Change message severity to log_very_verbose for missing dev info in udev db.Peter Rajnoha2012-04-111-5/+19
| | | | | | | | | | | | | | | | | | | | | Libudev does not provide transactions when querying udev database - once we get the list of block devices (devices/obtain_device_list_from_udev=1) and we iterate over the list to get more detailed information about device node and symlink names used etc., the device could be removed just in between we get the list and put a query for more info. In this case, libudev returns NULL value as the device does not exist anymore. Recently, we've added a warning message to reveal such situations. However, this could be misleading if the device is not related to the LVM action we're just processing - the non-related block device could be removed in parallel and this is not an error but a possible and normal operation. (N.B. This "missing info" should not happen when devices are related to the LVM action we're just processing since all such processing should be synchronized with udev and the udev db must always be in consistent state after the sync point. But we can't filter this situation out from others, non-related devices, so we have to lower the message verbosity here for a general solution.)
* RAID LVs could not handle a down-convert if a device other than the last oneJonathan Earl Brassow2012-04-111-2/+16
| | | | in the array was specified for removal. This change addresses that (bz806111).
* Check if info struct returned is not NULL.Peter Rajnoha2012-04-102-2/+6
| | | | Just some missing checks revealed by Coverity in recent code.
* Minor fixesZdenek Kabelac2012-03-283-7/+7
| | | | Just small updates and remove <backtrace> after log_error.
* Fix exclusive lvmchange -aey to fail if volume is active on different node.Milan Broz2012-03-271-1/+1
| | | | | | | | | Activation on remote node should be tried only if it is masked by tags locally (like when hosttags enabled, IOW activate_lv_excl_local() doesn't return error.) Introduced change caused that lvchange -aey succeeded even if volume was activated exclusively remotely.
* 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.
* Remove unused and wrongly set cluster VG flag from clvmd lock query command.Milan Broz2012-03-261-1/+1
|
* First veritysetup version using configure --with-veritysetup.Alasdair Kergon2012-03-241-0/+9
|
* Fix pvmove if LV is activated exclusively but cmirror is not running.Milan Broz2012-03-231-1/+4
| | | | | | | | | In this case we should allow to use local mirror, check for cmirror should apply only for lvconvert/lvcreate. Introduced in 2.02.86 by removing !(lv->status & ACTIVATE_EXCL). (Partially workaround, it is minimalistic patch for now.)
* Update and fix monitoring of thin pool devicesZdenek Kabelac2012-03-233-0/+36
| | | | | | | | | | | | | 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 typo in config option checkZdenek Kabelac2012-03-231-1/+1
|
* Fix regression in thin monitoringZdenek Kabelac2012-03-201-42/+42
| | | | | | | Patch https://www.redhat.com/archives/lvm-devel/2012-February/msg00118.html removed initilization of thin volume monitoring, leaving it only for thin pool - but missed the code move part for monitoring of thin pools. Effectively making thin pools not monitorable.
* Support improperly formated device numbersZdenek Kabelac2012-03-201-2/+15
| | | | | | | | | | | | | There are kernel drivers (smblk) which set '-1' as their device major number. This number is listed in /proc/devices then - but the kernel itself is using just 12 bits - thus device is accessible via 4095 - there is posted patch for 3.4 to fix this behavior (0 for auto allocation was mean to be used). However to still allow using such devices with older kernels add some code to use same behavior - so cut 12 bits from the major number from /proc/devices. For now use log_warn() - maybe the severity of the message could be lowered to just verbose level.
* Fix name conflicts that prevent down-converting RAID1 when specifying a deviceJonathan Earl Brassow2012-03-151-1/+13
| | | | | | | | | | | | | When down-converting a RAID1 device, it is the last device that is extracted and removed when the user does not specify a particular device. However, when a device is specified (and it is not the last), the device is removed and the remaining sub-LVs are "shifted down" to fill the hole. This cause problems when resuming the LV because if the shifted devices were resumed (and thus renamed) before the sub-LV being extracted, there would be a name conflict. The solution is to resume the extracted sub-LVs first so that they can be properly renamed preventing a possible conflict. This addresses bug 801967.
* Just move declarationZdenek Kabelac2012-03-141-1/+2
|
* Improve thin_check option passingZdenek Kabelac2012-03-142-16/+32
| | | | | | | Update a way we handle option passing - so we now support path and options with space inside. Fix dm name usage for thin pools with '-' in name. Use new lvm.conf option thin_check_options to pass in options as string array.
* Add --with-thin-check configure optionZdenek Kabelac2012-03-141-0/+3
| | | | | If specified - use given path without test (Path could be empty) If autodetection is in use - check for command in available PATH.
* Removing call of release_vg(NULL)Zdenek Kabelac2012-03-121-1/+0
| | | | | Since we are in error path were vg must be always NULL, skip call of release_vg() like we do in other places.
* Using %u modifier to print unsigned values.Zdenek Kabelac2012-03-121-6/+6
|
* Better structure layout for device_infoZdenek Kabelac2012-03-123-22/+20
| | | | | | Save some relocation entries and use directly char[]. Since we do not need yes more then 127 partitions per device, use just int8_t. Move lvm_type_filter_destroy into local static function.
* Simplify error path code for filter initializationZdenek Kabelac2012-03-121-11/+8
| | | | | Use 'int' counter. Use 'bad' with goto_bad macro.
* Switch to normal log_verbose messageZdenek Kabelac2012-03-121-2/+2
| | | | Here it's not an error case - so do not push this message to stderr.
* Fix error path for create_toolcontextZdenek Kabelac2012-03-121-0/+5
| | | | | | | 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.
* re-word warnings to be clearer to userAlasdair Kergon2012-03-061-3/+3
|
* Some more missing supposedly 64bit operations.Zdenek Kabelac2012-03-053-5/+5
| | | | Avoid use 32bit math for extent_size.
* Fit thin pool metadata into 128MBZdenek Kabelac2012-03-051-0/+1
| | | | | | | | | 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.
* Improve warningZdenek Kabelac2012-03-051-4/+17
| | | | | | | | Use thin_dump --repair suggestion in log error message and use just warning on deactivation path without repair info (since node has been deactivated). Also check whether there is not 16 args for thin_check configured.
* Use 64bit mathZdenek Kabelac2012-03-051-2/+2
| | | | | Prevent 32bit overflow and resulting weird error reports when working with TB sizes..
* Validate udev structuresZdenek Kabelac2012-03-041-5/+12
| | | | | | Avoid using NULL pointers from udev. It seems like some older versions of udev were improperly returning NULL in some case, so do not silently break here, and give at least a warning to the user.
* Just make error message more clearZdenek Kabelac2012-03-041-1/+1
| | | | Make more obvious, the origin LV for snapshot must be active.
* Scan all devices for lvmetad if 'pvscan --cache' used without device list.Alasdair Kergon2012-03-032-56/+13
|
* Just space movingZdenek Kabelac2012-03-021-2/+2
| | | | Don't leave space on EOL.