wind-cold 发表于 2019-2-15 12:00:50

centos7.5 创建逻辑卷

  查看分区信息:
  # fdisk -l
  Disk /dev/sda: 107.4 GB, 107374182400 bytes, 209715200 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: 0x00003b2a
  Device Boot      Start         End      Blocks   IdSystem
/dev/sda1   *      2048      411647      204800   83Linux
/dev/sda2          411648    63342591    31465472   8eLinux LVM
  创建分区/dev/sda2/并将分区类型设置为 8eLinux LVM
# fdisk /dev/sda
Command (m for help): t
Partition number (1-3, default 3): 3
Hex code (type L to list all codes): 8e
Changed type of partition 'Linux' to 'Linux LVM'
  Command (m for help): p
  Disk /dev/sda: 107.4 GB, 107374182400 bytes, 209715200 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: 0x00003b2a
  Device Boot      Start         End      Blocks   IdSystem
/dev/sda1   *      2048      411647      204800   83Linux
/dev/sda2          411648    63342591    31465472   8eLinux LVM
/dev/sda3      63342592   168200191    52428800   8eLinux LVM
  让内核重启读取分区信息
  # partprobe /dev/sda
  查看物理卷
# pvs
PV         VG   FmtAttr PSizePFree
/dev/sda2centos lvm2 a--30.00g 4.00m
创建物理卷
# pvcreate/dev/sda3
Physical volume "/dev/sda3" successfully created.
检查结果
# pvs
PV         VG   FmtAttr PSizePFree
/dev/sda2centos lvm2 a--30.00g4.00m
/dev/sda3         lvm2 ---50.00g 50.00g
  创建卷组
# vgcreate test /dev/sda3
Volume group "test" successfully created
# pvs
PV         VG   FmtAttr PSize   PFree
/dev/sda2centos lvm2 a--   30.00g   4.00m
/dev/sda3test   lvm2 a--
页: [1]
查看完整版本: centos7.5 创建逻辑卷