大数据类型磁盘初始化脚本
近期在初始化大数据类的数据盘时,进行磁盘初始化的时候,发现官方提供的auto_fdisk_ssd.sh这个脚本,由于使用的fdisk进行磁盘分区,还只能格式化2T以内的磁盘,对这个脚本进行了修改,以便适配于大数据类型机器的磁盘自动挂载,对应的磁盘格式为xfs. 脚本见附件,供大家参考。 #/bin/bash ######################################### #Function: auto fdisk #Usage: bash auto_mkfs_xfs.sh #Author: Customer service department #Company: Alibaba Cloud Computing #Version: 4.0 ######################################### count=0 tmp1=/tmp/.tmp1 tmp2=/tmp/.tmp2 >$tmp1 >$tmp2 fstab_file=/etc/fstab #check lock file ,one time only let the sc...