syncloud / platform

Run popular services on your device with one click
https://syncloud.org
GNU General Public License v3.0
401 stars 40 forks source link

VBox VDI image - Not enough disk space to install any app #235

Closed jpma89 closed 7 years ago

jpma89 commented 7 years ago

Hi,

when running the VBox VDI image, there is not enough space to install any app. Upon installation of any app, the app center page states: "Error Not enough space left: 889 MB, required space is 1024 MB"

Mounting an additional virtual disk did not help. Maybe the VDI disk needs to be inceased to e.g. 2 GB.

cyberb commented 7 years ago

You are right, we have few problems with free space on Virtual Box.

As a quick fix for better experience I will upload 3G image instead of 2G.

Meanwhile you should be able to extend vdi using this command to 10G (stop Virtual Box before resizing):

VBoxManage modifyhd syncloud-17.01.vdi --resize 10000

There is another issue to fix to use that space. Our boot disk resize button (/opt/app/platform/bin/resize-sd-partition.sh) does not work with /dev/sda at the moment, here is the fixed version of it, just replace the contents of the script with this:

#!/bin/bash

DEVICE="/dev/sda"

PARTED_LINES=$(parted -sm ${DEVICE} unit B print | wc -l)
PARTITION_NUM=$(expr ${PARTED_LINES} - 2)
PARTITION="${DEVICE}${PARTITION_NUM}"

DEVICE_SIZE_BYTES=$(parted -sm ${DEVICE} unit B print | grep -oP "${DEVICE}:\K[0-9]*(?=B)")
PART_START_BYTES=$(parted -sm ${DEVICE} unit B print | grep -oP "^${PARTITION_NUM}:\K[0-9]*(?=B)")
PART_START_SECTORS=$(expr ${PART_START_BYTES} / 512)
PART_END_SECTORS=$(expr ${DEVICE_SIZE_BYTES} / 512 - 1)

echo "
p
d
${PARTITION_NUM}
p
n
p
${PARTITION_NUM}
${PART_START_SECTORS}
${PART_END_SECTORS}
p
w
q
" | fdisk ${DEVICE}

partprobe

resize2fs ${PARTITION}

Now you can either run this script or use extend button in settings.

cyberb commented 7 years ago

I have updated 17.01 virtual box image to have 3G (1.5G free) by default. I will update when we fix resize button.