无法创建新分区

无法创建新分区

我有一个CentOS系统,有508G的可用空间。我想从中创建一个新分区。它位于扩展分区中。 在此输入图像描述
我创建新分区并将其格式化为任何格式(ext4、fat32),应用后它无法完成该过程并给出以下错误:

An error occurred while applying the operations
See the details for more information.

IMPORTANT
If you want support, you need to provide the saved details!
See http://gparted.sourceforge.net/larry/tips/save_details.htm for more information.

当我保存它时,save_details.htm它包含以下信息:

GParted 0.6.0

Libparted 2.1

Create Logical Partition #1 (fat32, 508.23 GiB) on /dev/sda  00:00:01    ( ERROR )

calibrate New Partition #1  00:00:00    ( SUCCESS )

path: /dev/sda-1
start: 184424448
end: 1250263039
size: 1065838592 (508.23 GiB)
create empty partition  00:00:01    ( ERROR )
libparted messages    ( INFO )

WARNING: the kernel failed to re-read the partition table on /dev/sda (Device or resource busy). As a result, it may not reflect all of your changes until after reboot.
WARNING: the kernel failed to re-read the partition table on /dev/sda (Device or resource busy). As a result, it may not reflect all of your changes until after reboot.
========================================

我使用 fdisk 并创建了/dev/sda6,我看到这样的分区:

$ sudo fdisk -l 

Disk /dev/sda: 640.1 GB, 640135028736 bytes
255 heads, 63 sectors/track, 77825 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xa62a8bc3

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         262     2097152   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2             262        5361    40960000   83  Linux
/dev/sda3            5361       10460    40960000   83  Linux
/dev/sda4           10460       77826   541113344    5  Extended
/dev/sda5           10461       11480     8192000   82  Linux swap / Solaris
/dev/sda6           11480       77825   532917056+  83  Linux
Partition 6 does not start on physical sector boundary.

但是当我使用mkfs格式化它时,我看到这个错误:

$ sudo mkfs -t ext4 /dev/sda6
mke2fs 1.41.12 (17-May-2010)
Could not stat /dev/sda6 --- No such file or directory

The device apparently does not exist; did you specify it correctly?

问题是什么?

答案1

您应该通知内核对磁盘所做的更改。为此你需要运行partprobe.

# partprobe /dev/sda6

然后您应该运行mkfs.ext4将文件系统分配给新创建的分区。

# mkfs.ext4 /dev/sda6

这样你的分区就准备好了mount

# mount /dev/sda6 /mountpoint

答案2

partprobe -s执行任何操作之前必须先运行该命令/dev/sda6

如果您没有该命令,只需重新启动机器即可

答案3

您需要移动/重新创建 Linux 交换分区并确保它在柱面边界上开始/结束

答案4

我的建议:您应该尝试使用 fdisk /dev/sda 添加新分区。有时 gparted 会遇到此类问题。

相关内容