当前位置:网站首页>###脚本实现raid0自动化部署
###脚本实现raid0自动化部署
2022-06-24 18:41:00 【51CTO】
#!/bin/bash
#使用EOF实现自动化配置raid0
#reid(条带) >=2 提升读写速度,磁盘IO性能 无容错功能 磁盘利用率%100
read -p "请输入您要制作的磁盘路径" path
if [ -b $path ]
then
echo "设备为一个块设备,已存在"
echo "开始进行自动化分区"
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 "查看raid0情况"
mdadm -D /dev/md0
echo "格式化分区"
mkfs.ext4 /dev/md0
read -p "请输入创建的挂载点" bb
if [ -e $bb ]
then
echo "挂载点已存在"
else
echo "创建挂载点"
mkdir $bb
fi
echo "挂载设备"
mount /dev/md0 $bb
echo "查看"
df -h
else
echo "设备不存在,请您核对后重新输入"
fi
边栏推荐
- Road vector data download tutorial
- Redis learning -- list of redis operations
- How to create a linear model prediction interval in R and visualize it
- subject may not be empty [subject-empty]
- The verifiable certificate of geoscience remote sensing industry
- Flex box flex attribute
- 1: Mosaic of 100W basic geographic information data
- PLC功能块系列之多段曲线控温FB(SCL程序)
- TKDE2022:基于知识增强采样的对话推荐系统
- Interview algorithm - string question summary
猜你喜欢

SAP license: ERP for supply chain management and Implementation

2022 network security C module of the secondary vocational group scans the script of the surviving target aircraft (municipal, provincial and national)

Introduction and download tutorial of two types of soil data

Sentry series satellite introduction and download tutorial

「碎语杂记」这事儿不安全

1: Mosaic of 100W basic geographic information data

Architecture decryption from distributed to microservice: several common microservice architecture schemes

Introduction and download tutorial of administrative division vector data

网络安全审查办公室对知网启动网络安全审查

FROM_ GLC introduction and data download tutorial
随机推荐
How to perform power regression in R
JS string method
Monotone stack template
Get max value of a bit column - get max value of a bit column
BOM(Browser Object Model)
In depth learning of movement methods
JS picture display and hiding cases
Why is nodejs so fast?
Freeswitch uses origin to dialplan
C self learning function
Air pollution gas satellite data download tutorial
Sudoku (easy to understand)
"2022" plans to change jobs and raise salary. It is necessary to ask interview questions and answers - browser
What makes data analysts good- Cassie Kozyrkov
This is not safe
The sharp sword of API management -- eolink
Microsoft planetary computer (MPC) platform introduction, registration and comparison
How to create a linear model prediction interval in R and visualize it
2022 network security C module of the secondary vocational group scans the script of the surviving target aircraft (municipal, provincial and national)
Learn routing and data delivery