Check disk mount and type with df
# df -khT Filesystem Type Size Used Avail Use% Mounted on /dev/mapper/cl-root xfs 35G 1.2G 34G 4% / devtmpfs devtmpfs 1.9G 0 1.9G 0% /dev tmpfs tmpfs 1.9G 0 1.9G 0% /dev/shm tmpfs tmpfs 1.9G 8.3M 1.9G 1% /run tmpfs tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup /dev/sda1 xfs 1014M 182M 833M 18% /boot tmpfs tmpfs 380M 0 380M 0% /run/user/0 #
I created LVM partiation. Create LVM type partition in Linux CentOS 7 by fdisk - AKAI TSUKI
before
# fdisk -l Disk /dev/sda: 85.9 GB, 85899345920 bytes, 167772160 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x000b4090 Device Boot Start End Blocks Id System /dev/sda1 * 2048 2099199 1048576 83 Linux /dev/sda2 2099200 79691775 38796288 8e Linux LVM #
after
# fdisk -l /dev/sda Disk /dev/sda: 85.9 GB, 85899345920 bytes, 167772160 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x000b4090 Device Boot Start End Blocks Id System /dev/sda1 * 2048 2099199 1048576 83 Linux /dev/sda2 2099200 79691775 38796288 8e Linux LVM /dev/sda3 79691776 111149055 15728640 8e Linux LVM /dev/sda4 111149056 167772159 28311552 8e Linux LVM #
create PV
After create these partiation, I reboot server and create PV as follows:
# pvcreate /dev/sda3 Physical volume "/dev/sda3" successfully created. # pvcreate /dev/sda4 Physical volume "/dev/sda4" successfully created. # pvs PV VG Fmt Attr PSize PFree /dev/sda2 cl lvm2 a-- 37.00g 4.00m /dev/sda3 lvm2 --- 15.00g 15.00g /dev/sda4 lvm2 --- 27.00g 27.00g #