mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-07-28 07:26:28 +00:00
The hassos-expand script calls sfdisk to find free disk space. It seems that today it considers the space before the first partition as free: $ sudo sfdisk -Fq /dev/sdi Start End Sectors Size 2048 16383 14336 7M This causes the script to always resize. It seems not to cause harm to the partition table (it does not resize really). However, the call to partx seems to confuse systemd and kill the mnt-data.mount process (presumably because udev causes remove/add events for the by-label device units). Consider everything below 8MiB to not be worthy of a size change. This avoids missdetection and resize attempts where there is no need.
This commit is contained in:
parent
0ae67991d1
commit
b6cfe04422
@ -11,7 +11,7 @@ PART_NUM="${DEVICE_CHILD: -1}"
|
||||
|
||||
# Need resize
|
||||
UNUSED=$(sfdisk -Fq "${DEVICE_ROOT}" | cut -d " " -f 3 | tail -1)
|
||||
if [ -z "${UNUSED}" ] || [ "${UNUSED}" -le "2048" ]; then
|
||||
if [ -z "${UNUSED}" ] || [ "${UNUSED}" -le "16384" ]; then
|
||||
echo "[INFO] No resize of data partition needed"
|
||||
exit 0
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user