Displaying 20 results from an estimated 22 matches for "get_drive_size".
2010 Mar 17
1
[PATCH][node REPOST] Improve performance of multipath translations
...#39;)
+
+ 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
+ get_drive_size "$BOOTDRIVE" BOOTDRIVESPACE
drive_list="BOOT"
BOOT_NEED_SIZE=$BOOT_SIZE
else
- get_drive_size $ROOTDRIVE ROOTDRIVESPACE
- get_drive_size $HOSTVGDRIVE HOSTVGDRIVESPACE
+ get_drive_size &...
2009 May 21
1
[PATCH node] display descriptions for all disks
...ns(+), 12 deletions(-)
diff --git a/scripts/ovirt-config-storage b/scripts/ovirt-config-storage
index be5aec0..671ad7d 100755
--- a/scripts/ovirt-config-storage
+++ b/scripts/ovirt-config-storage
@@ -36,15 +36,17 @@ logging_min_size=5
data_min_size=5
swap_min_size=5
-get_selected_drive_size()
+get_drive_size()
{
- start_log
+ local drive=$1
+ local space_var=$2
+
local size=
- local udi=$(hal-find-by-property --key block.device --string $DRIVE)
+ local udi=$(hal-find-by-property --key block.device --string $drive)
if [ -z "$udi" ]; then
# If hal didn't f...
2009 Jul 10
0
[PATCH node] This is a follow-on patch for bz#507455.
...;[DEBUG] %s\n" "$*"; fi }
trap '__st=$?; stop_log; exit $__st' 0
trap 'exit $?' 1 2 13 15
@@ -36,8 +37,12 @@ logging_min_size=5
data_min_size=5
swap_min_size=5
+# Gets the drive's size and sets the supplied variable.
+# $1 - the drive
+# $2 - the variable
get_drive_size()
{
+ debug "get_drive_size: start"
local drive=$1
local space_var=$2
@@ -70,11 +75,36 @@ get_drive_size()
fi
size=$(echo "scale=0; $size / (1024 * 1024)" | bc -l)
- echo "$drive ($size MB)"
+ eval $space_var=$size
+
+ debug ":...
2009 Jul 01
1
Replacement patch for bz#507455
This patch includes a fix to no longer list devices with 0 bytes
of storage, such as removeable media devices with no media present.
2009 Nov 04
1
[PATCH node] add ability to select separate disks for Root and HostVG in o-c-storage
...nged, 94 insertions(+), 56 deletions(-)
diff --git a/scripts/ovirt-config-storage b/scripts/ovirt-config-storage
index 77e00d0..57aaebd 100755
--- a/scripts/ovirt-config-storage
+++ b/scripts/ovirt-config-storage
@@ -85,30 +85,43 @@ check_partition_sizes()
fi
printf "\n"
- get_drive_size $DRIVE SPACE
- disk_size=$SPACE
- need_size=$(echo "scale=0;" \
- "$SWAP_SIZE + $ROOT_SIZE * 2" \
- "+ $CONFIG_SIZE + $LOGGING_SIZE + $min_data_size" | bc -l)
-
- if [ $need_size -gt $disk_size ]; then
- local gap...
2009 Dec 10
0
[PATCH node] Enables stateless iscsi remote boot
...n/reboot
+ fi
fi
stop_log
exit $rc
diff --git a/scripts/ovirt-config-storage b/scripts/ovirt-config-storage
index f9a5b41..2ffcaa4 100755
--- a/scripts/ovirt-config-storage
+++ b/scripts/ovirt-config-storage
@@ -85,17 +85,23 @@ check_partition_sizes()
fi
printf "\n"
- get_drive_size $ROOTDRIVE ROOTDRIVESPACE
- get_drive_size $HOSTVGDRIVE HOSTVGDRIVESPACE
- ROOT_NEED_SIZE=$(echo "scale=0; $ROOT_SIZE * 2"| bc -l)
- HOSTVG_NEED_SIZE=$(echo "scale=0;" \
- "$SWAP_SIZE + $CONFIG_SIZE + $LOGGING_SIZE + $min_data_size" | bc -l...
2010 Mar 31
1
[PATCH node] Handle space in storage wwid
...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()
{
- local drive=$1
- local space_var=$2
+ local drive="$1"
+ local space_var="$2"
local size=
- local udi=$(hal-find-by-property --key block.device --string $drive)
+ local udi=$(hal-find-by-property --key block.device --string "$drive")...
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
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
2009 May 26
0
[PATCH node] Fixes when more than one UDI is returned while getting a drive's size.
...scripts/ovirt-config-storage | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/scripts/ovirt-config-storage b/scripts/ovirt-config-storage
index 716b8fb..296ec8c 100755
--- a/scripts/ovirt-config-storage
+++ b/scripts/ovirt-config-storage
@@ -43,6 +43,21 @@ get_drive_size()
local size=
local udi=$(hal-find-by-property --key block.device --string $drive)
+ # if more than one UDI was found then iterate over them to find the base device
+ if [[ "${udi}" =~ \$ ]]; then
+ printf "MORE THAN ONE UDI FOUND!\n"
+ udi=$(ech...
2010 Jul 21
0
[PATCH] RFC: Advanced Storage Configuration
...2_SIZE"
+ if [ "$DATA_SIZE2" = -1 ]; then
+ min_data_size=5
+ fi
printf "\n"
if [ "$OVIRT_ISCSI_ENABLED" = "y" ]; then
@@ -131,7 +137,27 @@ check_partition_sizes()
BOOT_NEED_SIZE="$BOOT_SIZE"
else
get_drive_size "$ROOTDRIVE" ROOTDRIVESPACE
- get_drive_size "$HOSTVGDRIVE" HOSTVGDRIVESPACE
+ for drv in $HOSTVGDRIVE; do
+ get_drive_size "$drv" DRIVESPACE
+ if [ -n "${HOSTVGDRIVESPACE}" ]; then
+ HOSTVGDRIVESPACE=$(echo...
2009 May 27
4
[PATCH node] REPOST Joey's and Darryl's ovirt-config-* patches
This is a repost of patches for ovirt-config-*
ACK to all. Pushed.
2010 Oct 22
0
[PATCH node] First draft of replacing some of the ovirt-config-* scripts with python equivalents.
...% 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)
+ size = size.stdout.read()
+# size = int(size.stdout.read().strip()) # / 1024)
+ return size
+
+if OVIRT_VARS.has_key("OVIRT_INIT"):...
2009 Dec 08
1
[PATCH node] iscsi remote root basework This lays most of the groundwork for iscsi installation and configuration. At this time configuring iscsi is disabled due to multiple issues with dependent pieces.
...ize=5
@@ -206,6 +206,11 @@ get_dev_name()
do_configure()
{
local name_and_size
+ if [ "$OVIRT_ISCSI_ENABLED" == "y" ]; then
+ printf "\n\nPlease select the disk to use for the Boot partition.\n\n"
+ BOOTDRIVE=$(get_dev_name) || return 0
+ get_drive_size $BOOTDRIVE BOOTDRIVESPACE
+ fi
printf "\n\nPlease select the disk to use for the Root.\n\n"
ROOTDRIVE=$(get_dev_name) || return 0
get_drive_size $ROOTDRIVE ROOTDRIVESPACE
@@ -230,7 +235,12 @@ do_configure()
fi
local space_left=$HOSTVGDRIVESPACE
- for part...
2009 Oct 22
0
[PATCH node] merge Root and /boot partitions
...-default_boot_size=50
default_root_size=256
default_config_size=5
default_logging_size=2048
# -1 indicates data partition should use remaining disk
default_data_size=-1
-boot_min_size=50
root_min_size=256
config_min_size=5
logging_min_size=5
@@ -90,7 +88,7 @@ check_partition_sizes()
get_drive_size $DRIVE SPACE
disk_size=$SPACE
need_size=$(echo "scale=0;" \
- "$BOOT_SIZE + $SWAP_SIZE + $ROOT_SIZE * 2" \
+ "$SWAP_SIZE + $ROOT_SIZE * 2" \
"+ $CONFIG_SIZE + $LOGGING_SIZE + $min_data_size&qu...
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
2009 Jun 25
1
[PATCH node] Fixes when a removable media is removed. bz#507455
...t.com>
---
scripts/ovirt-config-storage | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/scripts/ovirt-config-storage b/scripts/ovirt-config-storage
index 0fcc0bc..41177a4 100755
--- a/scripts/ovirt-config-storage
+++ b/scripts/ovirt-config-storage
@@ -62,7 +62,10 @@ get_drive_size()
size=$(hal-get-property --udi "$udi" --key storage.size)
if [[ "${size}" == "0" ]]; then
# disk is probably hot-swappable, use different HAL key
- size=$(hal-get-property --udi "$udi" --key storage.removable.media_s...
2010 Apr 05
1
RESEND: [PATCH node 1/3] enables ability for a common shared root
...k '{ print $1 }')"
rc=0
if [ -n "$devices" ]; then
printf "\n"
@@ -357,11 +357,27 @@ do_configure()
printf "\n\nPlease select the disk to use for the Root.\n\n"
ROOTDRIVE=$(get_dev_name) || return 0
get_drive_size "$ROOTDRIVE" ROOTDRIVESPACE
+ if ask_yes_or_no "Will Root be shared with other nodes ([Y]es/[N]o)?"; then
+ OVIRT_SHARED_ROOT="y"
+ if ask_yes_or_no "Partition and install Root?"; then
+ OVIRT_ROOT_INSTALL="y&q...
2010 Apr 01
2
[PATCH node 1/3] Enables ability to have a common shared root
...cripts/ovirt-config-storage
index 8d59a6b..aec3447 100755
--- a/scripts/ovirt-config-storage
+++ b/scripts/ovirt-config-storage
@@ -357,6 +357,22 @@ do_configure()
printf "\n\nPlease select the disk to use for the Root.\n\n"
ROOTDRIVE=$(get_dev_name) || return 0
get_drive_size "$ROOTDRIVE" ROOTDRIVESPACE
+ if ask_yes_or_no "Will Root be shared with other nodes ([Y]es/[N]o)?"; then
+ OVIRT_SHARED_ROOT="y"
+ if ask_yes_or_no "Partition and install Root?"; then
+ OVIRT_ROOT_INSTALL="y&q...
2010 May 13
1
Non-functional replacement...
This patch just includes the repo name in the subject.