Loading... #### 概述 由于`fdisk`命令最多只支持2TB磁盘分区,并不支持更大的磁盘,需要使用GPT格式进行分区。 ```shell [root@localhost ~]# fdisk /dev/sdb -l Disk /dev/sdb: 10561.8 GB, 10561795743744 bytes, 20628507312 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 262144 bytes / 2883584 bytes [root@localhost ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 447.1G 0 disk ├─sda1 8:1 0 500M 0 part /boot └─sda2 8:2 0 446.6G 0 part ├─centos-root 253:0 0 202.6G 0 lvm / ├─centos-swap 253:1 0 64G 0 lvm [SWAP] ├─centos-home 253:2 0 100G 0 lvm /home └─centos-var 253:3 0 80G 0 lvm /var sdb 8:16 0 9.6T 0 disk sr0 11:0 1 1024M 0 rom ``` `开始操作` ```shell [root@localhost ~]# parted /dev/sdb GNU Parted 3.1 Using /dev/sdb Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) p Error: /dev/sdb: unrecognised disk label Model: ZTE LOGICAL VOLUME (scsi) Disk /dev/sdb: 10.6TB Sector size (logical/physical): 512B/4096B Partition Table: unknown Disk Flags: (parted) mklabel gpt (parted) p Model: ZTE LOGICAL VOLUME (scsi) Disk /dev/sdb: 10.6TB Sector size (logical/physical): 512B/4096B Partition Table: gpt Disk Flags: Number Start End Size File system Name Flags (parted) mkpart opt 2048s 100% Warning: The resulting partition is not properly aligned for best performance. Ignore/Cancel? Ignore (parted) p Model: ZTE LOGICAL VOLUME (scsi) Disk /dev/sdb: 10.6TB Sector size (logical/physical): 512B/4096B Partition Table: gpt Disk Flags: Number Start End Size File system Name Flags 1 1049kB 10.6TB 10.6TB opt (parted) q Information: You may need to update /etc/fstab. [root@localhost ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 447.1G 0 disk ├─sda1 8:1 0 500M 0 part /boot └─sda2 8:2 0 446.6G 0 part ├─centos-root 253:0 0 202.6G 0 lvm / ├─centos-swap 253:1 0 64G 0 lvm [SWAP] ├─centos-home 253:2 0 100G 0 lvm /home └─centos-var 253:3 0 80G 0 lvm /var sdb 8:16 0 9.6T 0 disk └─sdb1 8:17 0 9.6T 0 part sr0 11:0 1 1024M 0 rom [root@localhost ~]# mkfs.ext4 /dev/sdb1 ``` <div class="tip inlineBlock share"> 来源于:[闲云博客](https://www.ym68.cc/linux/202223406.html) </div> 最后修改:2022 年 02 月 25 日 © 转载自他站 打赏 赞赏作者 支付宝微信 赞 如果觉得我的文章对你有用,请随意赞赏