summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2011-04-28 16:55:52 -0700
committerStephen Hemminger <shemminger@vyatta.com>2011-04-28 16:55:52 -0700
commit281164b2208ede1f99180ff5e192aede6db46858 (patch)
tree12d9a7a228f2c74ae3218d8a725ee0ccc8755087 /scripts
parentfea33633b585ae1ba71d93de082ed6ce3b3e4ef8 (diff)
downloadvyatta-cfg-system-281164b2208ede1f99180ff5e192aede6db46858.tar.gz
vyatta-cfg-system-281164b2208ede1f99180ff5e192aede6db46858.zip
Tell parted to align disk partition
Bug 7038 Align the created disk partition for both install-system and initial install-image. Note: can't fix existing systems where disk is already partitioned. They will just have to suffer with poor performance.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/install-system3
-rwxr-xr-xscripts/install/install-get-partition2
2 files changed, 3 insertions, 2 deletions
diff --git a/scripts/install-system b/scripts/install-system
index 9a860d63..99782fb1 100755
--- a/scripts/install-system
+++ b/scripts/install-system
@@ -867,7 +867,8 @@ create_partitions() {
echo "Creating root partition on /dev/$ldrive" >> $INSTALL_LOG
# make the root partition
- output=$(parted -s /dev/$ldrive mkpart primary $start_offset $root_part_size)
+ # align at optimal block boundary
+ output=$(parted -s -a optimal /dev/$ldrive mkpart primary $start_offset $root_part_size)
status=$?
if [ "$status" != 0 ]; then
echo -e "Error creating primary partition on $ldrive.\nPlease see $INSTALL_LOG for more details.\nExiting..."
diff --git a/scripts/install/install-get-partition b/scripts/install/install-get-partition
index 9b7aa259..f475b689 100755
--- a/scripts/install/install-get-partition
+++ b/scripts/install/install-get-partition
@@ -683,7 +683,7 @@ create_partitions() {
lecho "Creating root partition on /dev/$ldrive"
# make the root partition
- output=$(parted -s /dev/$ldrive mkpart primary $start_offset $root_part_size)
+ output=$(parted -s -a optimal /dev/$ldrive mkpart primary $start_offset $root_part_size)
status=$?
if [ "$status" != 0 ]; then
echo -e "Error creating primary partition on $ldrive.\nPlease see $INSTALL_LOG for more details.\nExiting..."