Products
GG网络技术分享 2025-08-11 23:51 23
GPT分区格式,即GUID分区表,是Linux系统中常用的结实盘分区格式之一。它具备支持更巨大结实盘容量和更许多分区数量的优势, 个个分区容量可超出2TB,且包含备份分区表,有效别让因分区表数据丢失弄得系统无法启动。以下为GPT分区格式的代码示例:
# fdisk -l /dev/sda Disk /dev/sda: 1 GiB, 1G bytes, 1 sectors Units: sectors of 1 * 512 = 512 bytes Sector size : 512 bytes / 512 bytes I/O size : 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x00000000
在Linux中格式化结实盘,基本上采用mkfs命令。以下为格式化结实盘的详细步骤:
# mkfs.ext4 /dev/sda1 mke2fs 1.44.1 Creating filesystem with 1048576 blocks and 262144 inodes Filesystem UUID: a05b0f23-ec37-4af4-ee81-ebd03d3d3d3d Superblock backups stored on blocks: 1, 3, 5, 7, 9, 11 Allocating group tables: done Writing inode tables: done Creating journal : done Writing superblocks and filesystem accounting information: done
EXT4文件系统在Linux系统中应用广泛, 具有支持巨大分区和文件、日志系统、数据恢复等功能,数据读写速度更迅速。
Btrfs是一种新鲜型的文件系统, 相较于EXT和XFS,它具有更优良的可靠性、数据校验、迅速照功能和在线扩容能力,数据备份和恢复更加轻巧松。
# mkfs.btrfs /dev/sda3 btrfs-progs v4.19.5 See http://btrfs.wiki.kernel.org for more information. Label: UUID: ecfa5c8c-1e64-4eb7-bccb-16cc46537fad Node size: Sector size: Filesystem size: 267.26MB Block group profiles: Data: single 0.00MiB Metadata: DUP 0.00MiB System: DUP 0.00MiB SSD detected: no Incompat features: extref, skinny-metadata Number of devices: Devices: ID SIZE PATH 267.26MB /dev/sda3
MBR分区格式在Linux系统中应用广泛,但仅支持2TB以下结实盘和最许多4个主分区或3个主分区加1个 分区。
# gdisk /dev/sda GPT fdisk version 1.0.0 Partition table scan: MBR: protective GPT: not found Command : p Disk /dev/sda: 1 GiB, 1G bytes, 1 sectors Units: sectors of 1 * 512 = 512 bytes Sector size : 512 bytes / 512 bytes I/O size : 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x00000000 Partition table holds up to 16 entries Main partition table begins at sector 2048 and ends at sector 4095 First usable sector is 4096, last usable sector is 1048575 Partitions will be aligned on 1-sector boundaries Total free space is 1048574 sectors Number Start End Size Code Name 8E00 4096 1048575 524.28MiB Linux LVM
GPT分区格式的不优良的地方在于, 在老电脑上无法用UEFI引导,且需注意bootloader程序,否则兴许弄得系统无法启动。
Demand feedback