hisosic

DISK 사이즈 확장 (LVM+XFS 파일 시스템) 본문

VirtualMachine/Ovirt

DISK 사이즈 확장 (LVM+XFS 파일 시스템)

hisosic 2021. 3. 29. 11:06
Ovirt 에서 디스크 크기를 150G -> 200G 변경 후 해당 서버에서 작업

아래 처럼 vda 가 200G 으로 확장 된 것이 확인 됨.

# lsblk
NAME                    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sr0                      11:0    1 1024M  0 rom
vda                     252:0    0  200G  0 disk
├─vda1                  252:1    0    1G  0 part /boot
└─vda2                  252:2    0  148G  0 part
  ├─centos_centos7-root 253:0    0  148G  0 lvm  /
  └─centos_centos7-swap 253:1    0    2G  0 lvm  [SWAP]
  
  
vda2 확장 적용
# pvresize /dev/vda2

확인
# pvs
  PV         VG             Fmt  Attr PSize    PFree
  /dev/vda2  centos_centos7 lvm2 a--  <199.00g    0

centos_centos7-root 확장 적용
# lvextend -l +100%Free /dev/mapper/centos_centos7-root

확인
# lvs
  LV   VG             Attr       LSize    Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  root centos_centos7 -wi-ao---- <197.00g
  swap centos_centos7 -wi-ao----    2.00g

root 볼륨에 적용 (xfs 파티션 경우)
# xfs_growfs /dev/mapper/centos_centos7-root

확인
# df -h
Comments