Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:GA
dracut.4966
0098-Do-not-call-lvm-for-non-LVM-device-mapper-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0098-Do-not-call-lvm-for-non-LVM-device-mapper-devices.patch of Package dracut.4966
From 438b80786d2d3f729620bcf73d65732e9e84c52e Mon Sep 17 00:00:00 2001 From: Hannes Reinecke <hare@suse.de> Date: Thu, 3 Jul 2014 14:44:22 +0200 Subject: Do not call 'lvm' for non-LVM device-mapper devices If a device-mapper device is not created by LVM it's pointless to call any 'lvm' programs got extract details; they'll be failing anyway. So check the UUID before calling 'lvm'. This speeds up initrd creation and avoids I/O errors on multipath devices. Signed-off-by: Hannes Reinecke <hare@suse.de> --- dracut-functions.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dracut-functions.sh b/dracut-functions.sh index 1e0779a..b6247f5 100755 --- a/dracut-functions.sh +++ b/dracut-functions.sh @@ -700,10 +700,12 @@ for_each_host_dev_and_slaves() # but you cannot create the logical volume without the volume group. # And the volume group might be bigger than the devices the LV needs. check_vol_slaves() { - local _lv _vg _pv + local _lv _vg _pv _dm for i in /dev/mapper/*; do [[ $i == /dev/mapper/control ]] && continue _lv=$(get_maj_min $i) + _dm=/sys/dev/block/$_lv/dm + [[ -f $_dm/uuid && $(<$_dm/uuid) =~ LVM-* ]] || continue if [[ $_lv = $2 ]]; then _vg=$(lvm lvs --noheadings -o vg_name $i 2>/dev/null) # strip space -- 1.8.4.5
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor