初始化数据盘分区挂载
Posted 点滴
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了初始化数据盘分区挂载相关的知识,希望对你有一定的参考价值。
![](https://image.cha138.com/20210609/13656b181a5a46a686790b79b89fc6bb.jpg)
![](https://image.cha138.com/20210609/94c2ac21f50f47dfbdd72788f703f065.jpg)
fdisk -S 63 /dev/vdb
根据提示,依次输入“n”,“p”“1”,两次回车,“wq”,分区就开始了,很快就会完成。
fdisk -S sects
Specify the number of sectors per track of the disk. (Not the physical number, of course, but the number used for partition tables.) A reasonable value is 63. This option is DEPRECATED.
![](https://image.cha138.com/20210609/c330d60daf4c492586b8448b62c08f08.jpg)
![](https://image.cha138.com/20210609/a2695f95dc674c3b9bca1246c710a78b.jpg)
使用ext4 格式化分区
![](https://image.cha138.com/20210609/7ea2bc0418894754a2efd3090cd0896b.jpg)
![](https://image.cha138.com/20210609/edf7f8ec88524a9d95bc2e8faf32228a.jpg)
![](https://image.cha138.com/20210609/8e94bbf5f7f74c55a3892a60b73c229e.jpg)
![](https://image.cha138.com/20210609/7ea2bc0418894754a2efd3090cd0896b.jpg)
ext4 分区挂载到/data 目录下
![](https://image.cha138.com/20210609/edf7f8ec88524a9d95bc2e8faf32228a.jpg)
mount -a 挂载
![](https://image.cha138.com/20210609/8e94bbf5f7f74c55a3892a60b73c229e.jpg)
已经挂在到/data目录下了
fdisk -S 63 /dev/vdb
mkfs.ext4 /dev/vdb1
echo \'/dev/vdb1 /data ext4 defaults 0 0\' >> /etc/fstab
mount -a
以上是关于初始化数据盘分区挂载的主要内容,如果未能解决你的问题,请参考以下文章