search for: translate_multipath_device

Displaying 8 results from an estimated 8 matches for "translate_multipath_device".

2010 Mar 17
1
[PATCH][node REPOST] Improve performance of multipath translations
...return - fi - done + local device_sys=$(grep -H "^$id$" /sys/block/*/dev | cut -d: -f1) + + if [ -n "$device_sys" ]; then + eval $device_var=$(basename $(dirname $device_sys)) + return + fi eval $device_var=1 } @@ -83,10 +82,23 @@ translate_multipath_device() { local dev=$1 local mpath_var=$2 + if [ -z "$dev" ]; then + if [ -n "$mpath_var" ]; then + eval $mpath_var= + fi + return + fi + if [[ "$dev" =~ "/dev/mapper" ]]; then + eval $mpath_var=$dev +...
2010 Mar 18
1
[PATCH node] cleanup a couple small issues
...hat.com> --- scripts/ovirt-config-storage | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/ovirt-config-storage b/scripts/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 @...
2011 Aug 17
0
[PATCH node] cciss autoinstall fix
...age | 21 +++++++++++++++------ 1 files changed, 15 insertions(+), 6 deletions(-) diff --git a/scripts/ovirt-config-storage b/scripts/ovirt-config-storage index c8fb049..46f7e19 100755 --- a/scripts/ovirt-config-storage +++ b/scripts/ovirt-config-storage @@ -83,6 +83,7 @@ get_multipath_deps() { translate_multipath_device() { #trim so that only sdX is stored, but support passing /dev/sdX local dev="$1" + local dm_dev if [ -z "$dev" ]; then return 1 @@ -90,15 +91,23 @@ translate_multipath_device() { if [[ "$dev" =~ "/dev/mapper" ]]; then...
2010 Mar 31
1
[PATCH node] Handle space in storage wwid
...; = 1 ]]; then + if [[ "$deplist" = "" ]]; then + deplist="$device" else deplist="$deplist $device" fi @@ -79,8 +79,8 @@ get_multipath_devices() { #return sdX device if no multipath device translate_multipath_device() { #trim so that only sdX is stored, but support passing /dev/sdX - local dev=$1 - local mpath_var=$2 + local dev="$1" + local mpath_var="$2" if [ -z "$dev" ]; then if [ -n "$mpath_var" ]; then @@ -89,36 +89,36 @@ translate_mu...
2010 Jul 21
0
[PATCH] RFC: Advanced Storage Configuration
...IZE:-$default_swap2_size} +DATA2_SIZE=${OVIRT_VOL_DATA2_SIZE:-$default_data2_size} if [ -n "$OVIRT_INIT" ]; then # if present, use the drive selected with 'ovirt_init' boot parameter # setting these the same until kernel cmdline argument implemented - DRIVE="$(translate_multipath_device "$OVIRT_INIT")" - ROOTDRIVE="$DRIVE" - HOSTVGDRIVE="$DRIVE" + eval $(printf $OVIRT_INIT |awk '{ print "DRIVE="$1; }') + ROOTDRIVE="$(translate_multipath_device "$DRIVE")" + for drv in $OVIRT_INIT; do + DR...
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
2010 Mar 10
0
[PATCH node] Improve performance of multipath translations
...return - fi - done + local device_sys=$(grep -H "^$id$" /sys/block/*/dev | cut -d: -f1) + + if [ -n "$device_sys" ]; then + eval $device_var=$(basename $(dirname $device_sys)) + 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...
2010 Oct 22
0
[PATCH node] First draft of replacing some of the ovirt-config-* scripts with python equivalents.
...IZE=8192 +else: + BASE_SWAP_SIZE=16384 + +CALC_SWAP_SIZE = int(BASE_SWAP_SIZE) + int(OVERCOMMIT_SWAP_SIZE) + +BOOT_SIZE=default_boot_size +SWAP_SIZE=CALC_SWAP_SIZE +ROOT_SIZE=default_root_size +CONFIG_SIZE=default_config_size +LOGGING_SIZE=default_logging_size +DATA_SIZE=default_data_size + +def translate_multipath_device(dev): + #trim so that only sdX is stored, but support passing /dev/sdX + if dev is None: + return False + if "/dev/mapper" in dev: + return dev + mpath_cmd = "multipath -ll %s" % dev + ret = os.system(mpath_cmd) + if ret > 0: + return d...