首页 > 其他 > 详细

parted分区脚本

时间:2019-01-10 11:56:50      阅读:521      评论:0      收藏:0      [点我收藏+]
#!/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

 

parted分区脚本

原文:https://www.cnblogs.com/kaishirenshi/p/10249052.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!