Commit beeb8f9f authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Disable fsyncs in helper's VM resize operation

You can disable this behaviour by defining the DO_SYNC image property.
parent bd0a7bd3
......@@ -36,6 +36,7 @@ BLOCKDEV=blockdev
REGLOOKUP=reglookup
CHNTPW=chntpw
DATE="date -u" # Time in UTC
EATMYDATA=eatmydata
CLEANUP=( )
ERRORS=( )
......
......@@ -41,6 +41,10 @@ if [ -z "$SNF_IMAGE_RESIZE_PART" ]; then
exit 0
fi
if [ -n "$SNF_IMAGE_PROPERTY_DO_SYNC" ]; then
unset EATMYDATA
fi
table=$(get_partition_table "$SNF_IMAGE_DEV")
partition=$(get_partition_by_num "$table" "$SNF_IMAGE_RESIZE_PART")
id=$(cut -d: -f1 <<< "$partition")
......@@ -57,7 +61,7 @@ if [[ "$ptype" == ext[234] ]]; then
# system that has been mounted after the last fs check, but since we are
# sure the file system is clean it's safe enough to bypass this.
if [ "$state" = "clean" ]; then
$RESIZE2FS -f "$device"
$EATMYDATA $RESIZE2FS -f "$device"
else
log_error "The file system state of partition: \`$device' " \
" is not clean (state = $state)"
......
......@@ -17,11 +17,15 @@ unpack=true
# the order of sections is not important.
# the debootstrap option determines which repository
# is used to calculate the list of Priority: required packages.
debootstrap=Debian
aptsources=Debian
debootstrap=Debian Backport
aptsources=Debian Backport
[Debian]
packages=linux-image-amd64 ntfs-3g ntfsprogs xmlstarlet python reglookup chntpw parted
source=http://ftp.gr.debian.org/debian
suite=stable
[Backport]
packages=eatmydata
source=http://backports.debian.org/debian-backports
suite=stable-backports
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment