最近想将服务器的本地硬盘通过LVM来灵活管理,具体问题如下: [[email protected] ~]# pvcreate /dev/sdb
Device/dev/sdb not found (or ignored by filtering).
[Email protected] ~]# lsblk
NAME maj:min RM SIZE RO TYPE mountpoint
Nvme0n1 259:0 0 2.9T 0 disk
SDA 8:0 0 744.1G 0 disk
├─SDA1 8:1 0 5G 0 part/boot
└─sda2 8:2 0 739.1G 0 part
├─VOLGROUP-LOGVOL01 (dm-0) 253:0 0 390.6G 0 LVM/
└─volgroup-logvol00 (dm-1) 253:1 0 260G 0 LVM [SWAP]
SDB 8:16 0 21.8T 0 disk
[Email protected] soft]# fdisk-l/dev/sdb
Warning:gpt (GUID Partition Table) detected on '/DEV/SDB '! The util Fdisk doesn ' t support GPT. Use GNU Parted.
disk/dev/sdb:24000.0 GB, 23999996231680 bytes
255 heads, Sectors/track, 2917833 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x00000000
Device Boot Start End Blocks Id System
/DEV/SDB1 1 267350 2147483647+ ee GPT
By the above you can see that/dev/sdb adds a SDB1 disk partition by default and is partitioned for GPT;
Toss GPT because management is inconvenient, through some information can do the following to solve the problem:
[Email protected] soft]# Fdisk/dev/sdb
Warning:gpt (GUID Partition Table) detected on '/DEV/SDB '! The util Fdisk doesn ' t support GPT. Use GNU Parted.
Warning:the size of this disk is 24.0 TB (23999996231680 bytes).
DOS partition table format can is used on drives for volumes
Larger than (2199023255040 bytes) for 512-byte sectors. Use parted (1) and GUID
Partition table Format (GPT).
Warning:dos-compatible mode is deprecated. It ' s strongly recommended to
Switch off the mode (command ' C ') and change display units to
Sectors (Command ' u ').
Command (M for help): P
disk/dev/sdb:24000.0 GB, 23999996231680 bytes
255 heads, Sectors/track, 2917833 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x00000000
Device Boot Start End Blocks Id System
/DEV/SDB1 1 267350 2147483647+ ee GPT
Command (M for help): D
Selected partition 1
Command (M for help): P
disk/dev/sdb:24000.0 GB, 23999996231680 bytes
255 heads, Sectors/track, 2917833 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x00000000
Device Boot Start End Blocks Id System
Command (M for help): W
The partition table has been altered!
Calling IOCTL () to re-read partition table.
Syncing disks.
By the above you can see the deletion of the partition corresponding to its disk, if there is no data (remember)
[Email protected] soft]# Pvcreate/dev/sdb
Physical volume "/dev/sdb" successfully created
[Email protected] soft]# Pvdisplay
"/dev/sdb" is a new physical volume of "21.83 TiB"
---NEW physical volume---
PV Name/dev/sdb
VG Name
PV Size 21.83 TiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
The creation of PV is successful, and the subsequent management can be flexibly expanded with LVM.
Device/dev/sdb not found (or ignored by filtering