fdisk -l 磁盘 /dev/sda:32.2 GB, 32212254720 字节,62914560 个扇区 Units = 扇区 of 1 * 512 = 512 bytes 扇区大小(逻辑/物理):512 字节 / 4096 字节 I/O 大小(最小/最佳):4096 字节 / 4096 字节 磁盘标签类型:dos 磁盘标识符:0x000ecbd2 设备 Boot Start End Blocks Id System /dev/sda1 * 2048 1026047 512000 83 Linux /dev/sda2 1026048 62914559 30944256 83 Linux 磁盘 /dev/sdb:1099.5 GB, 1099511627776 字节,2147483648 个扇区 Units = 扇区 of 1 * 512 = 512 bytes 扇区大小(逻辑/物理):512 字节 / 4096 字节 I/O 大小(最小/最佳):4096 字节 / 4096 字节 磁盘标签类型:dos 磁盘标识符:0x05008ad2 设备 Boot Start End Blocks Id System /dev/sdb1 2048 2147483647 1073740800 83 Linux 磁盘 /dev/mapper/centos-data:2194.7 GB, 2194724093952 字节,4286570496 个扇区 Units = 扇区 of 1 * 512 = 512 bytes 扇区大小(逻辑/物理):512 字节 / 4096 字节 I/O 大小(最小/最佳):4096 字节 / 4096 字节 磁盘 /dev/sdc:1099.5 GB, 1099511627776 字节,2147483648 个扇区 Units = 扇区 of 1 * 512 = 512 bytes 扇区大小(逻辑/物理):512 字节 / 4096 字节 I/O 大小(最小/最佳):4096 字节 / 4096 字节 磁盘标签类型:dos 磁盘标识符:0x10a5ae44 设备 Boot Start End Blocks Id System /dev/sdc1 2048 2147483647 1073740800 83 Linux 磁盘 /dev/sdd:1099.5 GB, 1099511627776 字节,2147483648 个扇区 Units = 扇区 of 1 * 512 = 512 bytes 扇区大小(逻辑/物理):512 字节 / 4096 字节 I/O 大小(最小/最佳):4096 字节 / 4096 字节
对磁盘进行分区
1
fdisk /dev/sdd
使内核重新读取分区表
1
partprobe
创建物理卷
扫描系统PV:
1
pvscan
创建PV:
1
pvcreate /dev/sdd1
查看PV:
1
pvdisplay
查看现有的卷组
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
lvdisplay --- Logical volume --- LV Path /dev/centos/data LV Name data VG Name centos LV UUID 1annzJ-OeMD-GGAi-Ej1N-mkSV-jnNB-4IFj0d LV Write Access read/write LV Creation host, time ElasticSearch-node3, 2022-03-03 16:07:24 +0800 LV Status available # open 1 LV Size <3.00 TiB Current LE 786429 Segments 4 Allocation inherit Read ahead sectors auto - currently set to 8192 Block device 253:0