수요일, 5월 29, 2024
HomeESXiESXi ubuntu LVM 용량늘리기

ESXi ubuntu LVM 용량늘리기

ESXi ubuntu LVM 용량늘리기

fdisk 및 parted로 lvm 파티션 생성후 아래와 같이 실행

root@ubuntu:~# pvcreate /dev/sda3
  Physical volume "/dev/sda3" successfully created
root@ubuntu:~# 
root@ubuntu:~# pvscan
  PV /dev/sda5   VG ubuntu-vg   lvm2 [15.76 GiB / 24.00 MiB free]
  Total: 1 [15.76 GiB] / in use: 1 [15.76 GiB] / in no VG: 0 [0   ]
root@ubuntu:~# vgextend ubuntu-vg /dev/sda3
  Volume group "ubuntu-vg" successfully extended
root@ubuntu:~# pvscan
  PV /dev/sda5   VG ubuntu-vg   lvm2 [15.76 GiB / 24.00 MiB free]
  PV /dev/sda3   VG ubuntu-vg   lvm2 [16.00 GiB / 16.00 GiB free]
  Total: 2 [31.76 GiB] / in use: 2 [31.76 GiB] / in no VG: 0 [0   ]
root@ubuntu:~# vgdisplay ubuntu-vg
  --- Volume group ---
  VG Name               ubuntu-vg
  System ID             
  Format                lvm2
  Metadata Areas        2
  Metadata Sequence No  4
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                2
  Act PV                2
  VG Size               31.76 GiB
  PE Size               4.00 MiB
  Total PE              8130
  Alloc PE / Size       4028 / 15.73 GiB
  Free  PE / Size       4102 / 16.02 GiB
  VG UUID               SsSl4g-tFFm-826E-4a93-xS9T-cTxX-D5LqJ3
   
root@ubuntu:~# lvextend -L +16g /dev/ubuntu-vg/root 
  Extending logical volume root to 27.74 GiB
  Logical volume root successfully resized
root@ubuntu:~# resize2fs /dev/ubuntu-vg/root 
resize2fs 1.42.9 (4-Feb-2014)
Filesystem at /dev/ubuntu-vg/root is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 2
The filesystem on /dev/ubuntu-vg/root is now 7271424 blocks long.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Time limit exceeded. Please complete the captcha once again.

Most Popular