Displaying 9 results from an estimated 9 matches for "mpath_device".
2010 Mar 18
1
[PATCH node] cleanup a couple small issues
...ripts/ovirt-config-storage
index 34e84e5..4f3f174 100755
--- a/scripts/ovirt-config-storage
+++ b/scripts/ovirt-config-storage
@@ -96,7 +96,7 @@ translate_multipath_device() {
local dm_dev=/dev/$(multipath -ll $dev | egrep dm-[0-9]+ | sed -r 's/^.& (dm-[0-9]+) .*$/\1/')
local mpath_device=
- get_dm_device $dm_dev $mpath_device
+ get_dm_device $dm_dev mpath_device
if [ -z "$mpath_device" ]; then
mpath_device=$dev
@@ -580,7 +580,7 @@ wipe_lvm_on_disk()
reread_partitions()
{
local drive=$1
- if [[ $drive =~ "^/dev/mapper" ]]; then
+...
2010 Mar 31
1
[PATCH node] Handle space in storage wwid
...device_var=$(basename $(dirname $device_sys))
+ eval $device_var=$(basename $(dirname "$device_sys"))
return
fi
eval $device_var=1
@@ -49,23 +49,23 @@ get_sd_name() {
# gets the dependent block devices for multipath devices
get_multipath_devices() {
- local mpath_device=mpath-$(basename $1)
- local deplist_var=$2
+ local mpath_device=mpath-$(basename "$1")
+ local deplist_var="$2"
local deplist=""
#get dependencies for multipath device
- local deps=$(dmsetup deps -u $mpath_device \
+ local deps=$(dmsetup deps...
2010 Mar 10
0
[PATCH node] Improve performance of multipath translations
...return
+ fi
eval $device_var=1
}
@@ -83,10 +82,17 @@ translate_multipath_device() {
local dev=$1
local mpath_var=$2
+ if [[ $dev =~ "/dev/mapper" ]]; then
+ eval $mpath_var=$dev
+ return
+ fi
+
local basedev=$(basename $dev)
- local mpath_device=$(multipath -ll $dev |grep -n . | \
- grep "^1:" |awk '{print $1}' | sed 's/^1:/\/dev\/mapper\//g')
+ local dm_dev=/dev/$(multipath -ll $dev | egrep dm-[0-9]+ | sed -r 's/^.& (dm-[0-9]+) .*$/\1/')
+
+ local mpath_device=
+ get_dm_device $dm_dev...
2010 Mar 17
1
[PATCH][node REPOST] Improve performance of multipath translations
...dev" ]; then
+ if [ -n "$mpath_var" ]; then
+ eval $mpath_var=
+ fi
+ return
+ fi
+ if [[ "$dev" =~ "/dev/mapper" ]]; then
+ eval $mpath_var=$dev
+ return
+ fi
+
local basedev=$(basename $dev)
- local mpath_device=$(multipath -ll $dev |grep -n . | \
- grep "^1:" |awk '{print $1}' | sed 's/^1:/\/dev\/mapper\//g')
+ local dm_dev=/dev/$(multipath -ll $dev | egrep dm-[0-9]+ | sed -r 's/^.& (dm-[0-9]+) .*$/\1/')
+
+ local mpath_device=
+ get_dm_device $dm_dev...
2009 Oct 01
1
Repost of Patch 6/6 for ovirt-node
All other patches from the sequence remain unchanged. Repost of patch 6 based on comments from Joey to follow.
Mike
2010 Feb 24
5
New Storage related patches
This set of patches introduces support for multipath devices for
storage. Comments and suggestions are appreciated.
Mike
2011 Aug 17
0
[PATCH node] cciss autoinstall fix
...v"
+ return
+ fi
+ dm_dev=/dev/$(multipath -ll "$dev" | egrep dm-[0-9]+ | sed -r 's/^.* (dm-[0-9]+) .*$/\1/')
fi
- local dm_dev=/dev/$(multipath -ll "$dev" | egrep dm-[0-9]+ | sed -r 's/^.* (dm-[0-9]+) .*$/\1/')
-
local mpath_device=$(get_dm_device "$dm_dev")
if [ -z "$mpath_device" ]; then
--
1.7.4.4
2009 Sep 26
10
Adding handling for Multipath storage devices
The following patches introduce support for multipath and cciss devices to the ovirt-node and node-image. Comments are appreciated.
These patches assume that the 3 patches (2 node, 1 node-image) from Joey are all incorporated.
Mike
2010 Oct 22
0
[PATCH node] First draft of replacing some of the ovirt-config-* scripts with python equivalents.
...return dev
+ dm_dev_cmd = "multipath -ll \"%s\" | egrep dm-[0-9]+ | sed -r 's/^.& (dm-[0-9]+) .*$/\1/'" % dev
+ dm_dev = subprocess.Popen(dm_dev_cmd, shell=True, stdout=PIPE, stderr=STDOUT)
+ dm_dev_output = "/dev/" + dm_dev.stdout.read()
+ mpath_device = get_dm_device(dm_dev_output)
+
+ if mpath_device is None:
+ return dev
+ else:
+ return mpath_device
+
+def get_drive_size(drive):
+ size_cmd = "sfdisk -s %s 2>null" % drive
+ size = subprocess.Popen(size_cmd, shell=True, stdout=PIPE, stderr=STDOUT)
+ siz...