fdisk  -l 查看是否  已加入磁盘

fdisk  /dev/sdb

fdisk   -cu  /dev/sdb    取消兼容模式

添加一个硬盘,只创建一个分区,然后把分区挂载到/data

第1个里程碑-进行分区
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First sector (2048-208895, default 2048): 
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-208895, default 208895): 
Using default value 208895

Command (m for help): p

Disk /dev/sdb: 106 MB, 106954752 bytes
64 heads, 32 sectors/track, 102 cylinders, total 208896 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x58f14c96

Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048      208895      103424   83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

第2个里程碑-通知系统/dev/sdb磁盘分区信息变化
partprobe  /dev/sdb

第3个里程碑-格式化创建文件系统    make filesystem    mkfs
[root@oldboyedu45-lnb ~]# mkfs.ext4   /dev/sdb1
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)                         
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 31 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

4.关闭分区的自动磁盘检查功能

tune2fs -c 0 - i 0 /dev/sdb1

-c   没挂载多少次检查一次

-I       每隔多久检查一次磁盘

mount
/dev/sdb1    /data

df
-h

开机自动挂载

etc/rc.local

方法2  
/etc/fstab

column -t  对其  /etc/fstab

最新文章

  1. React Native环境搭建以及几个基础控件的使用
  2. 【Android群英传】学习笔记(三·一)
  3. 总是多次出现 那个同样的 权限错误 _storage_write_error_, 所以一开始就把机器设好setenforce 0
  4. AX 2012 在Grid 中添加image标识状态
  5. iOS 9 升级过程汇中白苹果 iPhone或iPad 解决方案
  6. This application failed to start because it could not find or load the Qt platform plugin "xcb".
  7. click事件的参数化
  8. C# WinForm实现控件拖动实例介绍
  9. 170116、centos6.4下nginx和ftp搭建图片服务器
  10. 爬虫:把廖雪峰的教程转换成 PDF 电子书
  11. Vue学习之路---No.5(分享心得,欢迎批评指正)
  12. Java抽象类、接口整理
  13. 主引导扇区MBR的解析
  14. AngularJs的ng-include的使用与实现
  15. Redis入门——Java接口
  16. 关于Session的概念和测试点
  17. 2018.09.17 atcoder Digit Sum(数论)
  18. onclick传参
  19. Java程序设计 第16周 课堂实践 —— 数据库4
  20. jQuery的2把利器

热门文章

  1. ofbiz
  2. Capturing ASP.NET Application Startup Exceptions
  3. css总结12:CSS Float(浮动)
  4. Android Canvas的save(),saveLayer()和restore()浅谈
  5. html manifest 离线配置
  6. TSQL--SET ANSI_NULLS OFF
  7. Mono for Android for Visual Studio 2010安装及试用
  8. 321. Create Maximum Number (c++ ——> lexicographical_compare)
  9. php代码审计5审计命令执行漏洞
  10. Liunx常用的100条命令汇存