Centos7.9重新对新加硬盘分区
1.查看机器所挂硬盘及分区情况
fdisk -l
[root@E0-9D-31-A3-0B-10 ~]# fdisk -l
磁盘 /dev/sdb:1000.2 GB, 1000204886016 字节,1953525168 个扇区
Units = 扇区 of 1 * 512 = 512 bytes
扇区大小(逻辑/物理):512 字节 / 4096 字节
I/O 大小(最小/最佳):4096 字节 / 4096 字节
磁盘标签类型:dos
磁盘标识符:0x33f12d5c
设备 Boot Start End Blocks Id System
/dev/sdb1 63 1953520064 976760001 f W95 Ext'd (LBA)
Partition 1 does not start on physical sector boundary.
/dev/sdb5 126 1953520064 976759969+ 83 Linux
Partition 5 does not start on physical sector boundary.
也可以通过以下命令查看
lsblk
[root@E0-9D-31-A3-0B-10 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 119.2G 0 disk
├─sda1 8:1 0 200M 0 part /boot/efi
├─sda2 8:2 0 1G 0 part /boot
└─sda3 8:3 0 118G 0 part
├─centos-root 253:0 0 50G 0 lvm /
├─centos-swap 253:1 0 7.8G 0 lvm [SWAP]
└─centos-home 253:2 0 60.3G 0 lvm /home
sdb 8:16 0 931.5G 0 disk
├─sdb1 8:17 0 1K 0 part
└─sdb5 8:21 0 931.5G 0 part
我需要对sdb这个新加的硬盘进行分区
2.先对新硬盘进行分区
[root@E0-9D-31-A3-0B-10 ~]# fdisk /dev/sdb
欢迎使用 fdisk (util-linux 2.23.2)。
更改将停留在内存中,直到您决定将更改写入磁盘。
使用写入命令前请三思。
Device does not contain a recognized partition table
使用磁盘标识符 0x491f2ee6 创建新的 DOS 磁盘标签。
The device presents a logical sector size that is smaller than
the physical sector size. Aligning to a physical sector (or optimal
I/O) size boundary is recommended, or performance may be impacte