当前位置:网站首页>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
边栏推荐
猜你喜欢

FROM_ GLC introduction and data download tutorial

LabView之MQTT协议使用

Volcano成Spark默認batch調度器

High dimension low code: component rendering sub component

西北工业大学遭黑客攻击?双因素认证改变局面!

特尔携手微软发挥边云协同势能,推动AI规模化部署

微服务系统设计——数据模型与系统架构设计

Graph traversal (BFS and DFS) C language pure handwriting

Why is nodejs so fast?

Introduction and download tutorial of administrative division vector data
随机推荐
《Go题库·11》channel的应用场景
一文理解OpenStack网络
Microservice system design - sub service project construction
mysql binlog 数据源配置文档麻烦分享一下
Tkde2022: Dialogue recommendation system based on knowledge enhanced sampling
为什么 Nodejs 这么快?
JS clothing photo album case
微服务系统设计——接口文档管理设计
Application scenarios of channel of go question bank · 11
How to perform power regression in R
In depth learning of movement methods
LabView之MQTT协议使用
Building MVC system based on three-tier structure
The verifiable certificate of geoscience remote sensing industry
How to protect biological privacy in the AI era? Overview of the latest "privacy enhancement technology in biometrics" of the Autonomous University of Madrid, comprehensively detailing the biometric p
Why are life science enterprises on the cloud in succession?
flink-sql的kafka的这个设置,group-offsets,如果指定的groupid没有提
starring V6平台开发接出点流程
cdc+mysql connector从维表中join的日期时间字段会被+8:00,请问阿里云托管的
为什么 useEvent 不够好