linux 磁盘管理

一、linux 下磁盘的表示方式

 /dev/sda1

  /dev 设备文件目录

  sd : 表示sata,sas,usb,scsi 接口的硬盘

 a: linux 用字母表是第几磁盘,a代表第一块

 1:linux 用数字表示某块磁盘的第几分区

二、磁盘使用

 磁盘初始化-》磁盘分区:一个磁盘只能分4个区,主分区+扩展分区《=4-》格式化-》磁盘挂载

 1、fdisk 分区命令

  

      fdisk /dev/sdb

      m

     

a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
g create a new empty GPT partition table
G create an IRIX (SGI) partition table
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)

可启动标志的切换

b编辑bsd磁盘标签

切换dos兼容性标志

d删除分区

创建一个新的空GPT分区表

创建一个IRIX (SGI)分区表

列出已知的分区类型

i’打印这个菜单

添加一个新的分区

o创建一个新的空DOS分区表

p打印分区表

没有保存更改就退出

让我们创建一个新的空的太阳磁盘标签

不要更改分区的系统id

改变显示/输入单元

v验证分区表

将表写入磁盘并退出

x额外功能(仅限专家使用)

格式化  mkfs

   mkfs  -t ext4 格式的分区  ------ ext4 文件系统类型

 

挂载

 

 

 

    

 

  

posted @ 2019-07-08 15:25  leo0362  阅读(131)  评论(0)    收藏  举报