From e9cd0979f7eb53b38b9ee588778353f831e98bdb Mon Sep 17 00:00:00 2001 From: bin456789 Date: Sun, 29 Oct 2023 22:16:29 +0800 Subject: [PATCH] =?UTF-8?q?core:=20=E4=BF=AE=E5=A4=8D=20scaleway=20block?= =?UTF-8?q?=20volume=20=E6=97=A0=E6=B3=95=E5=AE=89=E8=A3=85=20alpine?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- trans.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/trans.sh b/trans.sh index d6b53e7..b8c2217 100644 --- a/trans.sh +++ b/trans.sh @@ -434,6 +434,16 @@ EOF EOF fi + # scaleway block volume optimal_io_size 是 4M + # setup-disk 用 cfdisk 从 1M 开始分区 + # 但 cfdisk 只能按 optimal_io_size 对齐分区,因此报错 + # 将 start 置空,则自动对齐到 optimal_io_size + # https://oss.oracle.com/~mkp/docs/linux-advanced-storage.pdf + if [ -f /sys/block/$xda/queue/optimal_io_size ] && + [ "$(cat /sys/block/$xda/queue/optimal_io_size)" -gt $((1024 * 1024)) ]; then + sed -i 's/start=1M/start=/' /sbin/setup-disk + fi + # 网络 # 坑1 udhcpc下,ip -4 addr 无法知道是否是 dhcp # 坑2 udhcpc不支持dhcpv6