当前位置:网站首页>The script implements the automated deployment of raid0
The script implements the automated deployment of raid0
2022-06-24 19:00:00 【51CTO】
#!/bin/bash
# Use EOF Realize automatic configuration raid0
#reid( Strip ) >=2 Improve reading and writing speed , disk IO performance No fault tolerance Disk utilization %100
read -p " Please enter the path of the disk you want to make " path
if [ -b $path ]
then
echo " The device is a block device , Already exists "
echo " Start automated partitioning "
fdisk $path <<EOF
n
p
+1G
n
p
+1G
p
t
1
fd
t
2
fd
p
w
EOF
sleep 3
mdadm -C -a yes /dev/md0 -l 0 -n 2 ${path}[12]
echo " see raid0 situation "
mdadm -D /dev/md0
echo " format partition "
mkfs.ext4 /dev/md0
read -p " Please enter the created mount point " bb
if [ -e $bb ]
then
echo " Mount point already exists "
else
echo " Create mount point "
mkdir $bb
fi
echo " Mount device "
mount /dev/md0 $bb
echo " see "
df -h
else
echo " Device does not exist , Please check and re-enter "
fi
边栏推荐
- Self taught C special data type
- Learn routing and data delivery
- 小白请教下各位大佬,cdc抽取mysql binlog是严格顺序的吗
- Introduction to smart contract security audit delegatecall (2)
- SDL: cannot play audio after upgrading openaudio to openaudiodevice
- Necessary fault handling system for enterprise network administrator
- 模块五
- Interprétation de la thèse (SR - gnn) Shift Robust GNNS: Overcoming the Limits of Localized Graph Training Data
- Solve the problem that the MapReduce program console does not have log information warn please initialize the log4j system properly
- Game between apifox and other interface development tools
猜你喜欢
Necessary fault handling system for enterprise network administrator
Road vector data download tutorial
JS deep understanding of scope
干货 | 新手经常忽略的嵌入式基础知识点,你都掌握了吗?
Window object
模块五
Eight digit
Introduction and tutorial of SAS planet software
Air pollution gas satellite data download tutorial
Spatial simulation model acquisition future land cover tutorial
随机推荐
Volcano becomes spark default batch scheduler
Self taught C special data type
DOM (document object model)
Why useevent is not good enough
Intel and Microsoft give full play to the potential energy of edge cloud collaboration to promote the large-scale deployment of AI
佛祖保佑 永无BUG
JS string method
JS picture display and hiding cases
Volcano成Spark默认batch调度器
程序员如何做自媒体?
微服务系统设计——接口文档管理设计
制造业项目MDM主数据项目实施心得
Application scenarios of channel of go question bank · 11
JS pre parsing
Eight digit
finkcdc支持sqlserver2008么?
Flex box flex attribute
【Leetcode】旋转系列(数组、矩阵、链表、函数、字符串)
网络安全审查办公室对知网启动网络安全审查
okcc呼叫中心数据操作的效率问题