2T以上磁盘格式化

时间:2023-03-10 03:22:44
2T以上磁盘格式化

1.安装软件

对于 Debian/Ubuntu 用户, 使用 APT-GET 命令或者 APT 命令来安装 parted
#apt-get install -y parted 对于 RHEL/CentOS 用户,用 YUM 命令来安装 parted
#yum install -y parted 对于 Fedora 用户,用 DNF 命令来安装 parted
#dnf install parted 对于 Arch Linux 用户,用 Pacman 命令来安装 parted
#pacman -S parted 对于 openSUSE 用户, 用 Zypper 命令来安装 parted
#zypper in parted

2.分区

#parted
GNU parted 3.2
Using /dev/sda
Welcome to GNU parted! Type 'help' to view a list of commands.
(parted)
(parted) select /dev/sdb
Using /dev/sdb
(parted) mklabel gpt
(parted) unit TB
(parted) mkpart
Partition type? [] primary
File system type? [ext2]? ext4
Start? .00TB
End? .00TB
警告: The resulting partition is not properly aligned for best performance.
忽略/Ignore/放弃/Cancel? Ignore (parted) print
Model: AVAGO MR9361-24i (scsi)
Disk /dev/sda: .0TB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: Number Start End Size File system Name Flags
.00TB .0TB .0TB ext4 primary (parted) quit
Information: You may need to update /etc/fstab.

3.格式化

mkfs.ext4 /dev/sdb1