文档详情

linux硬盘分区格式化及挂载讲解.docx

发布:2017-04-15约字共10页下载文档
文本预览下载声明
linux硬盘分区格式化及挂载 1、硬盘的接口类型 硬盘的接口一般分为两种,一种是IDE并行接口,一种是SATA串行接口, 在linux上面IDE接口的硬盘被识别为/dev/hd[a-z]这样的设备,其中hdc表示光驱设备,这是因为主板上面一般有两个IDE插槽,一个IDE插槽可以接两个硬盘,而光驱是接着IDE的第二个插槽上面的第一个接口上面。其他诸如SCSI,SAS,SATA,USB等接口的设备在linux识别为/dev/sd[a-z]。 2、linux硬盘的分区 磁盘的分区分为: primary(主分区)、extended(扩展分区)、Logical (逻辑分区)且主分区加上扩展分区的个数小于等于4个。且扩展分区最多只有一个,扩展分区是不能直接在里面写入数据的,扩展分区里面新建逻辑分区才能读写数据。如果看见一个硬盘有很多分区,则其实是在扩展分区里面新建的逻辑分区。 主分区从 sdb1--sdb4 逻辑分区是从 sdb5--sdbN 如果所示linux硬盘分区之间的关系 INCLUDEPICTURE \d /uploadfile/Collfiles2014061608583584.png \* MERGEFORMATINET  第一种情况为:四个主分区 INCLUDEPICTURE \d /uploadfile/Collfiles2014061608583586.png \* MERGEFORMATINET  第二种情况为:三个主分区+一个扩展分区(扩展分区里面包括逻辑分区) 3、linux上如何实现分区 linux上面实现分区的命令: fdisk 1)fdisk -l [DEVICE] 查看linux某个硬盘的信息 fdisk -l /dev/[hs]d[a-z],不接设备名称,默认是查看所有硬盘的信息。 2)fdisk DEVICE 可以对硬盘进行分区操作 [root@Redhat5 ~ ~]# fdisk /dev/sda Command (m for help): m?(输入m查看可以操作的菜单) Command action a toggle a bootable flag b edit bsd disklabel c toggle the dos compatibility flag d delete a partition?//删除一个分区 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 partitions system id?//改变一个分区的系统标识 u change display/entry units?//改变显示/条目单位 v verify the partition table?//验证分区表 w write table to disk and exit?//保存退出 x extra functionality (experts only) INCLUDEPICTURE \d /uploadfile/Collfiles2014061608583688.png \* MERGEFORMATINET  INCLUDEPICTURE \d /uploadfile/Collfiles2014061608583689.png \* MERGEFORMATINET  INCLUDEPICTURE \d /uploadfile/Collfiles2014061608583690.png \* MERGEFORMATINET  常见linux支持的分区类型为82 swap交换分区、83 linux分区、8e LVM逻辑卷组。 INCLUDEPICTURE \d /uploadfile/Collfiles2014061608583691.png \* MERGEFORMATINET  INCLUDEPICTURE \d /uploadfile/Collfiles2014061608583692.png \* MERGEFORMATINET  INCLUDEPICTURE \d /
显示全部
相似文档