由于msdos分区表强制执行错误,分区故障创建 3TB ext4分区

分享于 

3分钟阅读

ubuntu

  繁體

问题

我刚买了一个3TB WD绿盘,但是,当我在gparted中尝试分区时,我得到一个错误,如下所示:


======================


libparted : 2.3


======================


partition length of 5860530176 sectors exceeds the msdos-partition-table-imposed maximum of 4294967295



当我尝试使用Ubuntu"磁盘工具"时,我得到类似这样的错误:


Error creating partition: helper exited with exit code 1: In part_add_partition: device_file=/dev/sdc, start=0, size=3000592982016, type=0x83


Entering MS-DOS parser (offset=0, size=3000592982016)


MSDOS_MAGIC found


looking at part 0 (offset 0, size 0, type 0x00)


new part entry


looking at part 1 (offset 0, size 0, type 0x00)


new part entry


looking at part 2 (offset 0, size 0, type 0x00)


new part entry


looking at part 3 (offset 0, size 0, type 0x00)


new part entry


Exiting MS-DOS parser


MSDOS partition table detected


containing partition table scheme = 0


got it


got disk


new partition


Error: partition length of 5860528002 sectors exceeds the msdos-partition-table-imposed maximum of 4294967295


ped_disk_add_partition() failed




答案1

PC上使用的传统分区表格式包括一个32位字段,用于记录特定分区覆盖的扇区数。

对于512字节的扇区,这会将最大分区大小设置为2TB(512 * 232)。

使用GParted,您可以通过以下方式执行此操作:进入"设备"->"创建分区表",然后从列表中选择"gpt"。


答案2

可以使用parted命令从命令行获得相同的结果。


sudo parted


(parted) select /dev/sdX


(parted) mklabel gpt


(parted) mkpart primary 0% 100%


(parted) quit


sudo mkfs.ext4 /dev/sdX1




答案3

也可以使用gdisk,在例子中,它能够将有现有分区和数据从MBR转换为GPT的磁盘,使所有内容保持不变,

流程如下所示:


$ sudo gdisk /dev/sda


GPT fdisk (gdisk) version 0.8.5



Partition table scan:


 MBR: MBR only


 BSD: not present


 APM: not present


 GPT: not present



***************************************************************


Found invalid GPT and valid MBR; converting MBR to GPT format.


THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by typing 'q' if


you don't want to convert your MBR partitions to GPT format!


***************************************************************





IMP  PAR  ext  tab    分区