当前位置:网站首页>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
边栏推荐
- next_ Permutation full permutation function
- 为什么生命科学企业都在陆续上云?
- How to create a linear model prediction interval in R and visualize it
- AI时代生物隐私如何保护?马德里自治大学最新《生物特征识别中的隐私增强技术》综述,全面详述生物隐私增强技术
- 微服务系统设计——接口文档管理设计
- Introduction and tutorial of SAS planet software
- 为什么 useEvent 不够好
- Using alicloud RDS for SQL Server Performance insight to optimize database load - first understanding of performance insight
- How do programmers do we media?
- Introduction, download and use of global meteorological data CRU ts from 1901 to 2020
猜你喜欢

Microservice system design - sub service project construction

Remote sensing Forum

程序员如何做自媒体?

Using alicloud RDS for SQL Server Performance insight to optimize database load - first understanding of performance insight

Freeswitch使用originate转dialplan

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

Set up your own website (8)

JS deep understanding of scope

History object

FROM_ GLC introduction and data download tutorial
随机推荐
Necessary fault handling system for enterprise network administrator
Knowledge points in T-SQL
next_ Permutation full permutation function
1: Mosaic of 100W basic geographic information data
Window object
JS event details
建立自己的网站(8)
Introduction and download tutorial of administrative division vector data
R语言 4.1.0软件安装包和安装教程
Introduction, download and use of global meteorological data CRU ts from 1901 to 2020
UnityShader 世界坐标不随模型变化
How to use Fisher's least significant difference (LSD) in R
C self learning function
Game between apifox and other interface development tools
Microservice system design -- interface document management design
Tkde2022: Dialogue recommendation system based on knowledge enhanced sampling
Sentry series satellite introduction and download tutorial
模块五
「碎语杂记」这事儿不安全
MySQL basic commands