search for: get_dm_device

Displaying 9 results from an estimated 9 matches for "get_dm_device".

2010 Mar 18
1
[PATCH node] cleanup a couple small issues
...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 + if [[ $drive =~ &qu...
2010 Mar 10
0
[PATCH node] Improve performance of multipath translations
...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 $mpath_device if [ -z "$mpath_device" ]; then mpath_device=$dev diff --git a/scripts/ovirt-functions b/scripts/ovirt-functions index 6839614..5661bee 100644 --- a/scripts/ovirt-functions +++ b/scripts/ovirt-functions @@ -765,6 +765,28 @@ test_ntp_configuration () {...
2010 Mar 17
1
[PATCH][node REPOST] Improve performance of multipath translations
...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 $mpath_device if [ -z "$mpath_device" ]; then mpath_device=$dev @@ -152,12 +164,12 @@ check_partition_sizes() printf "\n" if [ "$OVIRT_ISCSI_ENABLED" == "y" ]; then - get_drive_size $BOOTDRIVE BOOTDRIVESPACE + g...
2010 Mar 23
1
[PATCH node][RFC] Fix uninstall to detect and cleanup correct partitions
...itions $root_dev + wipe_partitions $root2_dev #restart multipath multipath -F multipath -v3 diff --git a/scripts/ovirt-functions b/scripts/ovirt-functions index c2ef94b..0c30890 100644 --- a/scripts/ovirt-functions +++ b/scripts/ovirt-functions @@ -851,6 +851,33 @@ get_dm_device () return $rc } +#Function to determine partition and device names +get_part_info() { + local drive_in=$1 + local dev_var=$2 + local part_var=$3 + local devname_1 devname2 part_number + local rc=0 + + eval $(readlink -f /dev/disk/by-label/$grub_dev_label|awk {' +...
2010 Mar 31
1
[PATCH node] Handle space in storage wwid
...v" return fi - local dm_dev=/dev/$(multipath -ll $dev | egrep dm-[0-9]+ | sed -r 's/^.& (dm-[0-9]+) .*$/\1/') + 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 + mpath_device="$dev" fi - eval $mpath_var=$mpath_device + eval $mpath_var="$mpath_device" } get_drive_size(...
2011 Aug 17
0
[PATCH node] cciss autoinstall fix
...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
2010 Mar 23
0
[PATCH node] Fix uninstall to detect and cleanup correct partitions
...itions $root_dev + wipe_partitions $root2_dev #restart multipath multipath -F multipath -v3 diff --git a/scripts/ovirt-functions b/scripts/ovirt-functions index c2ef94b..b98e31a 100644 --- a/scripts/ovirt-functions +++ b/scripts/ovirt-functions @@ -851,6 +851,39 @@ get_dm_device () return $rc } +#Function to determine partition and device names +get_part_info() { + local drive_in=$1 + local dev_var=$2 + local part_var=$3 + local devname_1 devname2 part_number + local rc=0 + + eval $(readlink -f $drive_in|awk {' + print "devname_1=&q...
2010 Mar 24
2
[PATCH node][REPOST 1/2] Fix uninstall to detect and cleanup correct partitions
...itions $root_dev + wipe_partitions $root2_dev #restart multipath multipath -F multipath -v3 diff --git a/scripts/ovirt-functions b/scripts/ovirt-functions index c2ef94b..b98e31a 100644 --- a/scripts/ovirt-functions +++ b/scripts/ovirt-functions @@ -851,6 +851,39 @@ get_dm_device () return $rc } +#Function to determine partition and device names +get_part_info() { + local drive_in=$1 + local dev_var=$2 + local part_var=$3 + local devname_1 devname2 part_number + local rc=0 + + eval $(readlink -f $drive_in|awk {' + print "devname_1=&q...
2010 Oct 22
0
[PATCH node] First draft of replacing some of the ovirt-config-* scripts with python equivalents.
..."ntpdate %s > /dev/null 2>&1") % server + if ret > 0: + print "\n Unable to verify NTP server: %s \n" % server + else: + log("\n Verified NTP server: %s \n") % server + os.system("service ntpd start") + +def get_dm_device(device): + dev_path = os.path.abspath(device) + major_cmd = "ls -al %s|awk {'print $5'}" % dev_path + major = subprocess.Popen("major_dev_cmd", shell=True, stdout=PIPE, stderr=STDOUT) + major = major.stdout.read() + minor_cmd = "ls -al %s|awk {'pr...