Linux_CentOS8_磁盘管理_磁盘大小调整(1)

本文介绍了Linux CentOS8系统中关于磁盘管理的知识,包括磁盘适配性检查、硬件设备在系统中的表示、磁盘分区及不同分区格式的理解,以及一系列用于磁盘操作的命令,如查看分区表、文件系统信息和逻辑卷管理等。
摘要由CSDN通过智能技术生成
磁盘管理:
1. 磁盘或者笔记本设备与Linux系统的适配性 :
  1. 不同厂商硬件设备对Linux系统的支持与否,可以查看以下链接:

    RedHat 硬件支持 :

    • Red Hat certified hardware. here

    • Red Hat certified software. here

    • Red Hat certified cloud and service providers. here

    • Certified workstations. here

  2. 不同品牌型号笔记本对Linux系统的支持与否,可查看here

2. Linux系统中的硬件设备

​ 在Linux系统中,硬件设备均被视为“文件”,而大部分硬件设备文件存放于目录/dev之下。以SATA接口的硬盘为例,硬盘的名称形式为/dev/sd[a-d] . 另外,the linux kernel archives 的详细信息可以查看 here

另外,可以借助虚拟机创建虚拟化环境用于linux系统的运行,虚拟化技术可以参考 Fedora Document

3. 磁盘分区

实体机器使用的磁盘名,形如/dev/sd[a-d], 而虚拟机环境下,可能会使用形如/dev/vd[a-p]磁盘名,虚拟机以virtlO接口接入磁盘时,使用virtlO界面时,磁盘文件名形如/dev/vd[a-p], 而SATA/USB/SAS等磁盘接口都是使用SCSI模块来驱动的,因此这些接口的磁盘设备名称都为/dev/sd[a-p]的格式。根据Linux检测到的磁盘顺序对磁盘设备加以命名。

磁盘第一个扇区存储整个磁盘重要信息,这种分区格式称为MBR(Master Boot Record)。随着磁盘容量的增加,部分操作系统已经不能读取大于2G的磁盘文件,因此出现了新的磁盘分区格式GPT(GUID partition table)

磁盘结构图示: 包括: platter/ actuator arm/disk sector/ track/ track sector/ cluster

来源:AaronTTEJ3M

分区表的两种格式:

MSDOS(MBR) 分区表格式:

GUID partition table, GPT 磁盘分区表

4. 磁盘操作命令
  • 1.fdisk : Display or manipulate a disk partition table.
 # fdisk --help

Usage:
 fdisk [options] <disk>      change partition table
 fdisk [options] -l [<disk>] list partition table(s)

Display or manipulate a disk partition table.

Options:
 -b, --sector-size <size>      physical and logical sector size
 -B, --protect-boot            don't erase bootbits when creating a new label
 -c, --compatibility[=<mode>]  mode is 'dos' or 'nondos' (default)
 -L, --color[=<when>]          colorize output (auto, always or never)
                                 colors are enabled by default
 -l, --list                    display partitions and exit
 -o, --output <list>           output columns
 -t, --type <type>             recognize specified partition table type only
 -u, --units[=<unit>]          display units: 'cylinders' or 'sectors' (default)
 -s, --getsz                   display device size in 512-byte sectors [DEPRECATED]
     --bytes                   print SIZE in bytes rather than in human readable format
 -w, --wipe <mode>             wipe signatures (auto, always or never)
 -W, --wipe-partitions <mode>  wipe signatures from new partitions (auto, always or never)

 -C, --cylinders <number>      specify the number of cylinders
 -H, --heads <number>          specify the number of heads
 -S, --sectors <number>        specify the number of sectors per track

 -h, --help                    display this help
 -V, --version                 display version


 # fdisk -l
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值