Linux 500G分区:一步步指导您完成分区(linux500g分区)

随着随着存储空间的不断增大,现在常见的硬盘也越来越大,分区越来越普遍。Linux 500G分区在Linux中是很常见的操作,如果您最近也要这么做,您也可以遵循下面的操作指南,一步步体验如何完成分区。

首先,需要检测系统是否支持500G硬盘,可以使用dmesg命令查看:

\`\`\`

#dmesg

[ 10.336127] sd 1:0:0:0 [sda] Attached SCSI disk

\`\`\`

如果显示从设备连接到SCSI磁盘后,代表系统支持500G硬盘,就可以开始分区了。

接着,可以使用fdisk命令为500G硬盘指定分区,使用下面的命令:

\`\`\`

#fdisk /dev/sda

Device contains neither a valid DOS partition table, nor

Sun, SGI or OSF disklabel

Building a new DOS disklabel. Changes will remain in memory only,

until you decide to write them. After that, of course, the previous

content won’t be recoverable.

The bandwidth a partition:

1 primary partition, 0 extended partitions, 0 logical partitions

Command (m for help): n

Partition type:

p primary (0 primary, 0 extended, 0 logical

e extended

Select (default p): p

Partition number (1-4, default 1): 1

First sector (2048-1048575999, default 2048): 1048576

Last sector, +sectors or +size{k,m,g} (1048576-1048575999, default 1048575999):

Using default value 1048575999

Command (m for help): w

The partition table has been altered!

Syncing disks

\`\`\`

接下来,根据自己的需要,选择需要的分区文件系统,对分区进行格式化,可以使用下面的命令:

\`\`\`

# mkfs.ext4 /dev/sda1

mke2fs 1.44.5 (15-Dec-2018)

Discarding device blocks: done

Creating filesystem with 128122240 4k blocks and 32030336 inodes

Filesystem UUID: b9cf5ca5-1a72-4b4a-b4a4-e010091734c3

Superblock backups stored on blocks:

32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,

4096000, 7962624, 11239424, 20480000

Allocating group tables: done

Writing inode tables: done

Creating journal (131072 blocks): done

Writing superblocks and filesystem accounting information: done

\`\`\`

最后,使用下面的命令挂载分区:

\`\`\`

#mount /dev/sda1 /mnt

\`\`\`

显示挂载成功,就完成了Linux 500G分区的整个操作,按照上述步骤完成分区的话,500G的硬盘就可以正常使用了,开始正常的工作吧!


数据运维技术 » Linux 500G分区:一步步指导您完成分区(linux500g分区)