OS: CentOS7
Storage: EMC CX-300
아래와 같이 sdb, sdc, sdd를 사용.
# lsscsi
[1:0:0:0] disk HP LOGICAL VOLUME 3.52 /dev/sda
[1:3:0:0] storage HP P410i 3.52 -
[3:0:0:0] disk DGC RAID 5 0219 /dev/sdb
[3:0:0:1] disk DGC RAID 5 0219 /dev/sdc
[3:0:0:2] disk DGC RAID 5 0219 /dev/sdd
1. pvcreate : lvm이 사용하기 위해 디스크나 파티션을 초기화(physical volume으로 만든다).
pvscan으로 lvm이 사용중인 pv를 확인하면, 아래처럼 OS가 사용하는 pv를 확인 할 수 있다.
# pvscan
PV /dev/sda2 VG centos lvm2 [67.84 GiB / 0 free]
Total: 1 [67.84 GiB] / in use: 1 [67.84 GiB] / in no VG: 0 [0 ]
sdb, sdc, sdd를 lvm pv로 만든다.
# ls -al /dev/sd* | grep -v sda | cut -f 11 -d ' ' | xargs -n1 -t pvcreate
pvcreate /dev/sdb
Physical volume "/dev/sdb" successfully created
pvcreate /dev/sdc
Physical volume "/dev/sdc" successfully created
pvcreate /dev/sdd
Physical volume "/dev/sdd" successfully created
pv가 잘 만들어졌는지 확인한다.
# pvscan
PV /dev/sda2 VG centos lvm2 [67.84 GiB / 0 free]
PV /dev/sdd lvm2 [50.00 GiB]
PV /dev/sdc lvm2 [50.00 GiB]
PV /dev/sdb lvm2 [100.00 GiB]
Total: 4 [267.84 GiB] / in use: 1 [67.84 GiB] / in no VG: 3 [200.00 GiB]
Continue reading