00.OS
Libvirt qcow2 용량 확장
왕영주
2021. 1. 18. 10:00
VM에 할당된 Volume 용량 확장이 필요한 경우가 있다.
qemu-img 툴을 이용해서 작업을 진행할 예정이다.
작업 대상 volume은 qcow2 type이다.
확인
현재 정보 확인. 24G로 설정돼있다.
[root@cloud-test-5 yjwang_pool]# qemu-img info deploy_kf01_1.qcow2
image: deploy_kf01_1.qcow2
file format: qcow2
virtual size: 24G (25474836480 bytes)
disk size: 606M
cluster_size: 65536
backing file: /data/yjwang_pool/base_volume.qcow2
backing file format: qcow2
Format specific information:
compat: 0.10
refcount bits: 16
확장 및 적용
[root@cloud-test-5 yjwang_pool]# qemu-img resize deploy_kf01_1.qcow2 50G
Image resized.
[root@cloud-test-5 yjwang_pool]# qemu-img info deploy_kf01_1.qcow2
image: deploy_kf01_1.qcow2
file format: qcow2
virtual size: 50G (53687091200 bytes)
disk size: 606M
cluster_size: 65536
backing file: /data/yjwang_pool/base_volume.qcow2
backing file format: qcow2
Format specific information:
compat: 0.10
refcount bits: 16
VM 내에서 확인
50G
로 확장됨 확인
[root@kf01_deploy_0 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
..
/dev/vda1 50G 2.0G 49G 4% /
반응형