以讹传讹? fdisk到底支不支持2T以上容量的硬盘分区?

in cn •  5 years ago 

买了个大硬盘,分区时才想起来这是我第一次使用容量超过2TB的硬盘呢,而据说MBR方式不支持超过2T的分区,那么又该分区呢?


(图源 :pixabay)

我百度查了一下,一般都是磁盘类型用gpt,分区工具用parted,不过fdisk真的不能胜任吗?可是毕竟fdisk我熟啊,撸起袖子直接试吧。

fdisk分区大硬盘

首先查看一下分区前的磁盘。

sudo fdisk -l

返回信息如下:

使用fdisk直接开干:

sudo fdisk /dev/sda

返回信息如下:

其中红色高亮部分:

The size of this disk is 3.7 TiB (4000787030016 bytes). DOS partition table format cannot be used on drives for volumes larger than 2199023255040 bytes for 512-byte sectors. Use GUID partition table format (GPT).

翻译过来就是:

这个磁盘的大小是3.7 TiB(4000787030016字节)。对于512字节扇区,DOS分区表格式不能用于大于2199023255040字节的驱动器。使用GUID分区表格式(GPT)。

直接输入p开始分区试试

可是提示中显示的还是dos类型

Disklabel type: dos
Disk identifier: 0x6b16bef3

输入m看看帮助,注意其中我圈上的部分:

输入g创建新的空白GPT分区表

返回如下:

注意这部分:

Disklabel type: gpt
Disk identifier: 5FC9A2DF-669E-7A4B-8302-157081750205

可见分区表已经修改为GPT方式啦,剩下的事情就简单啦,一路默认就可以了。之后再用sudo mkfs.ext4 /dev/sda1格式化,再编辑/etc/fstab来自动挂载就行啦,此处就不再赘述啦。

挂载后看看空间,一切正常:

以讹传讹

在网上查找了一下,无论是中文还是英文站点,很多页面中的内容还是说fdisk不支持2T以上分区,必须用parted这个工具。

造成这个问题我猜有几个因素

  • 旧版本fdisk确实不支持2T以上分区
  • 可能有些朋友用fdisk还是旧的版本
  • 直接拿前人的经验,而并没有去尝试

如果不是去尝试一下,我也和其它人一样坚信fdisk不支持2T以上分区呢。

相关链接


Vote For Me As Witness
https://steemit.com/~witnesses type in oflyhigh and click VOTE

Vote @oflyhigh via Steemconnect
Thank you!

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  
  ·  5 years ago 

!thumbup
恭喜你!您的这篇文章入选 @justyy 今日 (2019-11-06) 榜单 【优秀的文章】, 回复本条评论24小时内领赏,点赞本评论将支持 @dailychina 并增加将来您的奖赏。
@justyy 是CN区的见证人,请支持他,给他投票,或者设置justyy为见证人代理。感谢!@justyy的主要贡献:https://steemyy.com

Congratulations! This post has been selected by @justyy as today's (2019-11-06) 【Good Posts】, Steem On! Reply to this message in 24 hours to get rewards. Upvote this comment to support the @dailychina and increase your future rewards! ^_^

SteemIt 工具、API接口、机器人和教程
SteemIt Tools, Bots, APIs and Tutorial



If you believe what I am doing, please consider a spare vote voting me here, thank you very much indeed.

@justyy - the author of https://SteemYY.com and I have been a Steem Witness for more than a year now.

Thank you so much for participating in the Partiko Delegation Plan Round 1! We really appreciate your support! As part of the delegation benefits, we just gave you a 3.23% upvote! Together, let’s change the world!

強耶!破解留言。

哈哈,只是很少有人去亲自试一下
或者试了之后也很少有人去特意发个帖子说一下