summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* WIP: Diagnosticsdev-mcsontos-test-dbusdMarian Csontos2016-03-231-0/+4
|
* [WIP] Session bus is still not workingMarian Csontos2016-03-231-1/+1
|
* [WIP] More verbose...Marian Csontos2016-03-231-0/+1
|
* test: Allow using DBus session busMarian Csontos2016-03-231-12/+40
| | | | When session bus does not exist create one and kill it afterwards.
* test: Move bus configuration to prepare functionMarian Csontos2016-03-232-9/+8
|
* test: Remove pidfile after killing the processMarian Csontos2016-03-231-0/+1
| | | | | Though unlikely keeping files in place may result in random process killed.
* test: Fix lvmdbusd tests to work with installed testsuiteMarian Csontos2016-03-233-9/+17
|
* test: Fix checks to skip lvmdbusd testsMarian Csontos2016-03-231-2/+4
| | | | | The executable is always present in the tree, need to check the runtime dependencies.
* properties: use proper 'get' variant for unimplemented _pv_major_get and ↵Peter Rajnoha2016-03-231-2/+2
| | | | _pv_minor_get fns
* raid: Tidy dm_get_status_raid. [HM]Alasdair G Kergon2016-03-221-34/+53
|
* libdm: Move _skip_fields within file.Alasdair G Kergon2016-03-221-11/+12
|
* libdm: Change _advance_to_next_word to _skip_fieldsAlasdair G Kergon2016-03-221-16/+15
|
* activate: Use macros for target and module names.Alasdair G Kergon2016-03-2212-43/+69
|
* coverity: fix some issues reported by coverity for recent codePeter Rajnoha2016-03-222-14/+20
|
* tests: update vg-check-devs-used.shPeter Rajnoha2016-03-221-2/+2
| | | | Snapshot needs to be activated exclusively in cluster...
* tests: update vg-check-devs-used.shPeter Rajnoha2016-03-221-1/+11
|
* dev: also count with suffixes in UUID for LVs when constructing VGID and ↵Peter Rajnoha2016-03-221-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LVID index UUID for LV is either "LVM-<vg_uuid><lv_uuid>" or "LVM-<vg_uuid><lv_uuid>-<suffix>". The code before just checked the length of the UUID based on the first template, not the variant with suffix - so LVs with this suffix were not processed properly. For example a thin pool LV (as an example of an LV that contains sub LVs where UUIDs have suffixes): [0] fedora/~ # lsblk -s /dev/vg/lvol1 NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT vg-lvol1 253:8 0 4M 0 lvm `-vg-pool-tpool 253:6 0 116M 0 lvm |-vg-pool_tmeta 253:2 0 4M 0 lvm | `-sda 8:0 0 128M 0 disk `-vg-pool_tdata 253:3 0 116M 0 lvm `-sda 8:0 0 128M 0 disk Before this patch (spurious warning message about device mismatch): [0] fedora/~ # pvs WARNING: Device mismatch detected for vg/lvol1 which is accessing /dev/mapper/vg-pool-tpool instead of (null). PV VG Fmt Attr PSize PFree /dev/sda vg lvm2 a-- 124.00m 0 With this patch applied (no spurious warning message about device mismatch): [0] fedora/~ # pvs PV VG Fmt Attr PSize PFree /dev/sda vg lvm2 a-- 124.00m 0
* dev: also check for blank sysfs value containing only '\n'Peter Rajnoha2016-03-221-1/+1
|
* report: Add pv_major, pv_minor to reports.Alasdair G Kergon2016-03-224-0/+25
|
* lvmdbusd: Change print statements to log_errorTony Asleson2016-03-211-6/+6
| | | | | | Should not be using print() in the service code. Signed-off-by: Tony Asleson <tasleson@redhat.com>
* lvmdbusd: Add lvm flight recorderTony Asleson2016-03-213-3/+47
| | | | | | | | To help out with debug, when an exception is thrown in the dbus service we will dump all the information we have on the last 16 commands that were executed along with the stack strace. Signed-off-by: Tony Asleson <tasleson@redhat.com>
* lvmdbusd: Allow PV devices to be referenced by symlink(s)Tony Asleson2016-03-212-8/+29
| | | | | | See: https://bugzilla.redhat.com/show_bug.cgi?id=1318754 Signed-off-by: Tony Asleson <tasleson@redhat.com>
* lvmdbusd: Remove --udev in service fileTony Asleson2016-03-211-1/+1
| | | | | | | | With commit 2d5dc6512e10924ab68e6a139081d7121bc3f7d6 the dbus server no longer needs to utilize udev to know when to update its internal state. Signed-off-by: Tony Asleson <tasleson@redhat.com>
* tests: add vg-check-devs-used.shPeter Rajnoha2016-03-211-0/+24
|
* dev: be safer when reading sysfs propertiesPeter Rajnoha2016-03-211-1/+8
| | | | | | Check if the value we read from sysfs is not blank and replace the '\n' at the end only when needed ('\n' should usually be there for sysfs values, but better check this).
* test: Turn on dbus testMarian Csontos2016-03-211-1/+1
| | | | (cherry picked from commit f1ea96c6c1dc6414169bda1a18cf14cd9ebb1493)
* metadata: use own mem pool to report PV device mismatch in VGPeter Rajnoha2016-03-211-3/+10
|
* dev: detect mismatch between devices used and devices assumed for an LVPeter Rajnoha2016-03-215-2/+385
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's possible for an LVM LV to use a device during activation which then differs from device which LVM assumes based on metadata later on. For example, such device mismatch can occur if LVM doesn't have complete view of devices during activation or if filters are misbehaving or they're incorrectly set during activation. This patch adds code that can detect this mismatch by creating VG UUID and LV UUID index while scanning devices for device cache. The VG UUID index maps VG UUID to a device list. Each device in the list has a device layered above as a holder which is an LVM LV device and for which we know the VG UUID (and similarly for LV UUID index). We can acquire VG and LV UUID by reading /sys/block/<dm_dev_name>/dm/uuid. So these indices represent the actual state of PV device use in the system by LVs and then we compare that to what LVM assumes based on metadata. For example: [0] fedora/~ # lsblk /dev/sdq /dev/sdr /dev/sds /dev/sdt NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sdq 65:0 0 104M 0 disk |-vg-lvol0 253:2 0 200M 0 lvm `-mpath_dev1 253:3 0 104M 0 mpath sdr 65:16 0 104M 0 disk `-mpath_dev1 253:3 0 104M 0 mpath sds 65:32 0 104M 0 disk |-vg-lvol0 253:2 0 200M 0 lvm `-mpath_dev2 253:4 0 104M 0 mpath sdt 65:48 0 104M 0 disk `-mpath_dev2 253:4 0 104M 0 mpath In this case the vg-lvol0 is mapped onto sdq and sds becauset this is what was available and seen during activation. Then later on, sdr and sdt appeared and mpath devices were created out of sdq+sdr (mpath_dev1) and sds+sdt (mpath_dev2). Now, LVM assumes (correctly) that mpath_dev1 and mpath_dev2 are the PVs that should be used, not the mpath components (sdq/sdr, sds/sdt). [0] fedora/~ # pvs Found duplicate PV xSUix1GJ2SK82ACFuKzFLAQi8xMfFxnO: using /dev/mapper/mpath_dev1 not /dev/sdq Using duplicate PV /dev/mapper/mpath_dev1 from subsystem DM, replacing /dev/sdq Found duplicate PV MvHyMVabtSqr33AbkUrobq1LjP8oiTRm: using /dev/mapper/mpath_dev2 not /dev/sds Using duplicate PV /dev/mapper/mpath_dev2 from subsystem DM, ignoring /dev/sds WARNING: Device mismatch detected for vg/lvol0 which is accessing /dev/sdq, /dev/sds instead of /dev/mapper/mpath_dev1, /dev/mapper/mpath_dev2. PV VG Fmt Attr PSize PFree /dev/mapper/mpath_dev1 vg lvm2 a-- 100.00m 0 /dev/mapper/mpath_dev2 vg lvm2 a-- 100.00m 0
* device: add DEV_OPEN_FAILURE flagPeter Rajnoha2016-03-212-0/+4
| | | | | DEV_OPEN_FAILURE flag is set if the most recent "open" for a device failed and it's unset if any subsequent "open" succeeds.
* post-releaseAlasdair G Kergon2016-03-194-2/+8
|
* pre-releasev2_02_147Alasdair G Kergon2016-03-194-6/+3
|
* fsadm: use stat to get major:minor pair for non-standard /dev layoutsPeter Rajnoha2016-03-181-0/+7
| | | | | | | If we're using non-standard /dev layout so we can't get the dm-X name easily, we can't also look at the /sys/blocl/dm-X/dev to get the major:minor pair. Use "stat" in this case even though it triggers automounts (but there's no better way for now).
* fsadm: if available, use /proc/self/mountinfo to detect mounted volumePeter Rajnoha2016-03-182-4/+26
| | | | | | | | | | | The /proc/self/mountinfo is not bound to device names like /proc/mounts and it uses major:minor pairs instead. This fixes a situation in which a volume is mounted and then renamed later on - that makes /proc/mounts unreliable when detecting mounted volumes. See also https://bugzilla.redhat.com/show_bug.cgi?id=1196910.
* tests: stacked resize of thin on raidZdenek Kabelac2016-03-151-0/+35
|
* lvresize: fix stacked resizeZdenek Kabelac2016-03-152-15/+29
| | | | | | | | Commit b64703401da1f4bef60579a0b3766c087fcfe96a cause regression when handling stacked resize of pool metadata volume that would be a raid LV. Fix it by properly setting up size also for layer extension.
* tests: update lvconvert testZdenek Kabelac2016-03-141-1/+8
|
* tests: use own PID path for lvmetad checkingZdenek Kabelac2016-03-141-0/+1
| | | | Do not try to check PID of running lvmetad and use own path.
* lvconvert: fix error path testZdenek Kabelac2016-03-142-1/+2
| | | | | lvremove_single toollib function returns ECMD_FAILED or ECMD_PROCESSED.
* report: Use default vg_name field width too.Alasdair G Kergon2016-03-141-1/+1
|
* post-releaseAlasdair G Kergon2016-03-114-2/+8
|
* pre-releasev2_02_146Alasdair G Kergon2016-03-118-8/+130
|
* man: vgcreate sharedDavid Teigland2016-03-101-1/+2
|
* pvchange, pvresize: move exported VG checkDavid Teigland2016-03-102-3/+12
| | | | | | | | | | | | | Allow pvchange and pvresize to process exported VGs, and have them check for the exported state in their single function. Previously, the exported VG state would trigger a failure in vg_read()/ignore_vg() because the VGs are being read with READ_FOR_UPDATE. Because these commands read all VGs to search for the intended PVs, any exported VG would trigger a failure, even if it was not related to the intended PV.
* lvconvert: update --helpZdenek Kabelac2016-03-101-21/+21
| | | | | | | | | | | | | Use <> around user entered option parameters to make it visually different (just like we use Italic style in man page). TODO: In the future we should consistently provide such notation and possibly generate it automagically from some internal data structures. Preferably for man pages as well so we report actual set of supported options.
* tests: uncache with missing PVZdenek Kabelac2016-03-101-0/+121
| | | | | For now repair of cache with missing PVs via usage of --uncache. More will follow later.
* cleanup: display_lvnameZdenek Kabelac2016-03-101-23/+23
|
* cleanup: reoder linesZdenek Kabelac2016-03-101-10/+10
|
* cleanup: add backtraceZdenek Kabelac2016-03-101-10/+8
|
* gcc: cast time_t to 64bitZdenek Kabelac2016-03-101-1/+1
| | | | | Value is printed as uint64, so make sure right type is passed on all platforms. Fixes gcc warning on some 32bit platforms.
* topology: handle reported sizes smaller then sectorZdenek Kabelac2016-03-101-0/+6
| | | | | | | | | | Recent kernel (4.4) start to report values smaller then sector size (but in reporting size for SSD which support data zeroing on discard). For now log warning and assume it really means 1 sector. Addressing RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1313377