core: 更新刷新分区方法

This commit is contained in:
bin456789 2023-12-05 22:09:34 +08:00
parent 8d546f5a23
commit e8053c87fe
No known key found for this signature in database
GPG Key ID: EE301B386DE6C11B

View File

@ -2,12 +2,10 @@
PATH="/usr/sbin:/usr/bin" PATH="/usr/sbin:/usr/bin"
update_part() { update_part() {
hdparm -z $1 partx -u "$1"
partprobe $1 udevadm trigger
partx -u $1
udevadm settle udevadm settle
echo 1 >/sys/block/${1#/dev/}/device/rescan }
} 2>/dev/null
# el 自带 fdisk parted (el7的part不支持在线扩容) # el 自带 fdisk parted (el7的part不支持在线扩容)
# ubuntu 自带 fdisk growpart # ubuntu 自带 fdisk growpart