个人名片:

对人间的热爱与歌颂,可抵岁月冗长

Github‍:念舒_C.ying

CSDN主页️:念舒_C.ying

个人博客 :念舒_C.ying

1. 添加硬盘

2. 执行fdisk -l 查看新添加的硬盘

3. 对新加硬盘进行分区

[root@zhaojie ~]# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.23.2). Changes will remain in memory only, until you decide to write them.
Be careful before using the write command. Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0xf48b9e25. Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-209715199, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-209715199, default 209715199): +10G
Partition 1 of type Linux and of size 10 GiB is set Command (m for help): n
Partition type:
p primary (1 primary, 0 extended, 3 free)
e extended
Select (default p): p
Partition number (2-4, default 2):
First sector (20973568-209715199, default 20973568):
Using default value 20973568
Last sector, +sectors or +size{K,M,G} (20973568-209715199, default 209715199): +15G
Partition 2 of type Linux and of size 15 GiB is set Command (m for help): n
Partition type:
p primary (2 primary, 0 extended, 2 free)
e extended
Select (default p): p
Partition number (3,4, default 3): 3
First sector (52430848-209715199, default 52430848):
Using default value 52430848
Last sector, +sectors or +size{K,M,G} (52430848-209715199, default 209715199): +10G
Partition 3 of type Linux and of size 10 GiB is set Command (m for help): n
Partition type:
p primary (3 primary, 0 extended, 1 free)
e extended
Select (default e): e
Selected partition 4
First sector (73402368-209715199, default 73402368):
Using default value 73402368
Last sector, +sectors or +size{K,M,G} (73402368-209715199, default 209715199):
Using default value 209715199
Partition 4 of type Extended and of size 65 GiB is set Command (m for help): n
All primary partitions are in use
Adding logical partition 5
First sector (73404416-209715199, default 73404416):
Using default value 73404416
Last sector, +sectors or +size{K,M,G} (73404416-209715199, default 209715199): +10G
Partition 5 of type Linux and of size 10 GiB is set Command (m for help): n
All primary partitions are in use
Adding logical partition 6
First sector (94377984-209715199, default 94377984):
Using default value 94377984
Last sector, +sectors or +size{K,M,G} (94377984-209715199, default 209715199): +15G
Partition 6 of type Linux and of size 15 GiB is set Command (m for help): w
The partition table has been altered! Calling ioctl() to re-read partition table.
Syncing disks.

4. 格式化分区

[root@zhaojie ~]# mkfs.xfs /dev/sdb1
meta-data=/dev/sdb1 isize=512 agcount=4, agsize=655360 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=0, sparse=0
data = bsize=4096 blocks=2621440, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal log bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0 mkfs.ext4 /dev/sdb2
mkfs.ext4 /dev/sdb3
mkfs.ext4 /dev/sdb5
mkfs.ext4 /dev/sdb6

5. 创建挂载点

cd /opt/
mkdir sdb1 sdb2 sdb3 sdb5 sdb6

6. 挂载磁盘

[root@zhaojie opt]# mount /dev/sdb1 /opt/sdb1
[root@zhaojie opt]# mount /dev/sdb2 /opt/sdb2
[root@zhaojie opt]# mount /dev/sdb3 /opt/sdb3
[root@zhaojie opt]# mount /dev/sdb5 /opt/sdb5
[root@zhaojie opt]# mount /dev/sdb6 /opt/sdb6
[root@zhaojie opt]# df -hT

7. 配置自动挂载

vi /etc/fstab

/dev/sdb1               /opt/sdb1               xfs     defaults        0 0
/dev/sdb2 /opt/sdb2 ext4 defaults 0 0
/dev/sdb3 /opt/sdb3 ext4 defaults 0 0
/dev/sdb5 /opt/sdb5 ext4 defaults 0 0
/dev/sdb6 /opt/sdb6 ext4 defaults 0 0

期待下次的分享,别忘了三连支持博主呀~

我是 念舒_C.ying ,期待你的关注~

最新文章

  1. SQL Azure (18) 使用External Table实现垮库查询
  2. html基础 链接
  3. C语言操作符优先级
  4. ANGULARJS 出错解决
  5. CAML query for Group by count and data
  6. iOS动画一点也不神秘————你是喜欢看幻灯片?还是看高清电影?
  7. javascript事件及事件传输
  8. Zabbix3.0 安装Graphtree
  9. JavaSE基础篇—流程控制语句
  10. MYSQL—— 完整性约束条件中primary key、auto_increment使用总结!
  11. 《SpringMVC从入门到放肆》九、SpringMVC注解式开发(简单参数接收)
  12. python 识别图片上的数字
  13. Vant-Weapp小程序+商城案例
  14. 网址导航19A
  15. SpringBoot - 资源文件配置读取
  16. 小程序---textarea踩坑
  17. 深度学习原理与框架-Alexnet(迁移学习代码) 1.sys.argv[1:](控制台输入的参数获取第二个参数开始) 2.tf.split(对数据进行切分操作) 3.tf.concat(对数据进行合并操作) 4.tf.variable_scope(指定w的使用范围) 5.tf.get_variable(构造和获得参数) 6.np.load(加载.npy文件)
  18. JS中集合对象(Array、Map、Set)及类数组对象的使用与对比
  19. 【Spark】SparkStreaming-提交到集群运行
  20. Java基础(十一):接口

热门文章

  1. ubuntu语言支持打不开,点了没反应
  2. KingbaseES R6 集群启动‘incorrect command permissions for the virtual ip’故障案例
  3. python脚本将json文件生成C语言结构体
  4. MySQL读写分离之——ProxySQL
  5. Nginx+lua+openresty精简系列
  6. 查看docker程序使用的内存脚本
  7. 跳转控制语句break
  8. H5调用微信支付
  9. 如何在linux下检测(自身)IP冲突
  10. 「国产系统」Tubian 0.3,兼容Windows和Android的GNU/Linux系统!