카이도스의 Tech Blog

PROXMOX - disk 확장(용량 늘리기) ← 온라인 상에서 무중단으로 가능! 본문

PROXMOX

PROXMOX - disk 확장(용량 늘리기) ← 온라인 상에서 무중단으로 가능!

카이도스 2023. 12. 9. 18:41
728x90
반응형
  • 해당 vm→Disk Action→Resize→용량 기입 후 확장 클릭→ 확인

  • 서버 접속하여 확인 및 진행
# 확인
lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
loop0    7:0    0 63.4M  1 loop /snap/core20/1974
loop1    7:1    0 63.5M  1 loop /snap/core20/2015
loop2    7:2    0 67.8M  1 loop /snap/lxd/22753
loop3    7:3    0 91.8M  1 loop /snap/lxd/24061
loop4    7:4    0 53.3M  1 loop /snap/snapd/19457
loop5    7:5    0 40.8M  1 loop /snap/snapd/20092
sda      8:0    0   80G  0 disk
├─sda1   8:1    0    1M  0 part
├─sda2   8:2    0    1G  0 part /boot
├─sda3   8:3    0    8G  0 part [SWAP]
├─sda4   8:4    0    8G  0 part /tmp
└─sda5   8:5    0   63G  0 part /
sdb      8:16   0  600G  0 disk
└─sdb1   8:17   0  500G  0 part /data

# 용량 늘리기
parted  /dev/sdb
(parted) resizepart 1 100%
Warning: Partition /dev/sdb1 is being used. Are you sure you want to continue?
Yes/No? y
(parted) print
Model: QEMU QEMU HARDDISK (scsi)
Disk /dev/sdb: 644GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start   End    Size   Type     File system  Flags
 1      1049kB  644GB  644GB  primary  xfs

# 용량 늘리기(xfs)
xfs_growfs -d /dev/sdb1
sdb      8:16   0  600G  0 disk
└─sdb1   8:17   0  600G  0 part /data

# 용량 늘리기(ext4)
lsblk
....
sda      8:0    0  200G  0 disk
├─sda1   8:1    0    1M  0 part
├─sda2   8:2    0    1G  0 part /boot
├─sda3   8:3    0    8G  0 part [SWAP]
├─sda4   8:4    0    8G  0 part /tmp
└─sda5   8:5    0   63G  0 part /
sudo growpart /dev/sda 5
sudo resize2fs /dev/sda5
lsblk
....
sda      8:0    0  200G  0 disk
├─sda1   8:1    0    1M  0 part
├─sda2   8:2    0    1G  0 part /boot
├─sda3   8:3    0    8G  0 part [SWAP]
├─sda4   8:4    0    8G  0 part /tmp
└─sda5   8:5    0  183G  0 part /
728x90
반응형
Comments