ubuntu使用Parted GPT 创建大于2TB的的分区

问题

加购了一个4TB的ssd用于装载数据,使用fdisk挂载时候遇到一下warning:

复制代码
$ sudo fdisk /dev/sdb

Welcome to fdisk (util-linux 2.34).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table.
The size of this disk is 3.7 TiB (4096805658624 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).

解决办法

复制代码
$ sudo parted /dev/sdb
GNU Parted 3.3
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.

(parted) print                                                            
Error: /dev/sdb: unrecognised disk label
Model: ATA GLOWAY STK4TS3-S (scsi)                                        
Disk /dev/sdb: 4097GB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags: 

(parted) mklabel gpt 

(parted) print                                                            
Model: ATA GLOWAY STK4TS3-S (scsi)
Disk /dev/sdb: 4097GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start  End  Size  File system  Name  Flags

(parted) mkpart primary 0GB 4097GB 

(parted) print                                                            
Model: ATA GLOWAY STK4TS3-S (scsi)
Disk /dev/sdb: 4097GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name     Flags
 1      1049kB  4097GB  4097GB               primary

这时候再使用fdisk就可以看刚才的分区了

复制代码
Disk /dev/sdb: 3.74 TiB, 4096805658624 bytes, 8001573552 sectors
Disk model: GLOWAY STK4TS3-S
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 9B8B4FC7-7B68-4835-A611-DE53D8887EB8

Device     Start        End    Sectors  Size Type
/dev/sdb1   2048 8001572863 8001570816  3.7T Linux filesystem

然后正常挂载硬盘

格式化:

复制代码
$ sudo mkfs /dev/sdb
[sudo] password for cedric: 
mke2fs 1.45.5 (07-Jan-2020)
Found a gpt partition table in /dev/sdb
Proceed anyway? (y,N) y
Discarding device blocks: done                            
Creating filesystem with 1000196694 4k blocks and 250052608 inodes
Filesystem UUID: 65456d56-4637-4493-96ed-1445eba38583
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
	4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
	102400000, 214990848, 512000000, 550731776, 644972544

Allocating group tables: done                            
Writing inode tables: done                            
Writing superblocks and filesystem accounting information:            
done

挂载:

复制代码
$ mkdir /data
$ mount /dev/sdb /data

检查:

复制代码
$ df -h
Filesystem      Size  Used Avail Use% Mounted on

/dev/sdb        3.7T   24K  3.5T   1% /data

完工!

相关推荐
向量引擎4 小时前
告别多源向量API适配噩梦:一套通用中转层的设计与实践
人工智能·gpt·aigc·agi·api调用
向量引擎4 小时前
向量引擎API中转站深度测评:如何实现低成本、高并发的向量检索
人工智能·gpt·aigc·api·ai编程
向量引擎7 小时前
当搜索开始替人整理答案:我重新理解了向量检索和 API 中间层
人工智能·gpt·aigc·ai编程·ai写作·key·agi
小猿M12 小时前
在Ubuntu中安装CRIU
ubuntu·criu
小楼v12 小时前
本周AI圈炸了(4.13 - 4.19):AI纳入教师资格考核、GPT-6来了、Claude反杀、机器人跑赢了人类
人工智能·gpt·ai·机器人·热点资讯·教资·opus 4.7
向量引擎13 小时前
向量引擎技术文档给我的创作启发:AI搜索生态下的内容适配实践
人工智能·gpt·ai编程·ai写作·key
农民小飞侠14 小时前
SandboxFusion搭建教程
linux·ubuntu
Arenaschi14 小时前
关于GPT的版特点
java·网络·人工智能·windows·python·gpt
shandianchengzi14 小时前
【记录】Ubuntu26|通过网页和ydotool用手机远程输入文本到电脑上,方便接入手机上优越的语音输入法
ubuntu·手机·工具·输入·软件·输入法
shandianchengzi14 小时前
【记录】Claude Code|Ubuntu26给Claude Code新增任务消息提示音
运维·服务器·ubuntu·ai·大模型·音频·claude