#!/bin/bash  
#Used to fomat 6 disks
PATH=/bin:/sbin:/usr/bin:/usr/sbin
export PATH  
disk_to_parted="$1"
if [ $# == 0 ];then
    echo "no disk to parted,example /dev/sdb"
    exit
else
    echo "/n/n****** ${disk_to_parted} __was Fdisked! Waiting For 3 Second*****/n/n"
fi
/sbin/parted ${disk_to_parted} <<ESXU
     mklabel gpt
     mkpart primary 0 -1
     ignore
     quit
ESXU
sleep 3s
/sbin/mkfs.ext4 ${disk_to_parted}1
if [ "$?" = "0" ];then
   echo "/n/n*****${disk_to_parted}1 _________________was Formated, Waiting For 1 Second****/n/n"
fi
/sbin/blkid ${disk_to_parted}1
sleep 1s

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-02
  • 2021-06-12
  • 2021-10-29
猜你喜欢
  • 2021-08-18
  • 2021-06-14
  • 2021-10-03
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案