This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
#!/bin/bash
PATH="/usr/sbin:/usr/bin"
update_part(){
hdparm -z $1
partprobe $1
partx -u $1
udevadm settle
echo1 >/sys/block/${1#/dev/}/device/rescan
} 2>/dev/null
# el 自带 fdisk parted (el7的part不支持在线扩容)
# ubuntu 自带 fdisk growpart
# 删除分区用
# el/ubuntu fdisk
# 扩容分区用
# el7 grownparted 额外安装
# el8/9/fedora parted
# ubuntu grownpart
# 找出主硬盘
# xda=$(lsblk -dn -o NAME | grep -E 'nvme0n1|.da')