cara resize disk kvm proxmox


Status
Not open for further replies.

zens

Hosting Guru
Verified Provider
Assalamualaikum,

Dibilang nyerah mungkin tidak, karena gak ada istilah menyerah dalam kamus ini, heheh.. :D masih usaha nyari tutor di inet, dan ngoprek-ngoprek, akhirnya minta masukan tuan-tuan suhu-suhu master-master DWH sini.

Seperti judul diatas 'cara resize disk kvm proxmox versi Virtual Environment 4.4-5/c43015a5, judulnya sih mungkin simple yah, anggap saja saya baru tau linux .. hehehe

Sebelumnya sudah dilakukan resize melalui gui proxmox seperti pada penampakan berikut :
http://prnt.sc/ds8ht7
sebelumnya sidk partisi 70GB terus increase 100GB total jadi 170GB, sebelumnya vm dalam keadan mati alias stop dulu, kemudian start up lagi vm nya.
tapi pas diliat di terminal menggunakan df -h seperti penampakan berikut :
http://prnt.sc/ds8lec
gak muncul ya hasil resizenya, masukan dari tuan-tuan sekalian sangat diharapkan, terimakasih

Wassalam
 

GPLHosting

Hosting Guru
Assalamualaikum,

Dibilang nyerah mungkin tidak, karena gak ada istilah menyerah dalam kamus ini, heheh.. :D masih usaha nyari tutor di inet, dan ngoprek-ngoprek, akhirnya minta masukan tuan-tuan suhu-suhu master-master DWH sini.

Seperti judul diatas 'cara resize disk kvm proxmox versi Virtual Environment 4.4-5/c43015a5, judulnya sih mungkin simple yah, anggap saja saya baru tau linux .. hehehe

Sebelumnya sudah dilakukan resize melalui gui proxmox seperti pada penampakan berikut :
http://prnt.sc/ds8ht7
sebelumnya sidk partisi 70GB terus increase 100GB total jadi 170GB, sebelumnya vm dalam keadan mati alias stop dulu, kemudian start up lagi vm nya.
tapi pas diliat di terminal menggunakan df -h seperti penampakan berikut :
http://prnt.sc/ds8lec
gak muncul ya hasil resizenya, masukan dari tuan-tuan sekalian sangat diharapkan, terimakasih

Wassalam

Wa'alaikumsalam.
Extend storage di sisi Host Proxmox nya udah. Sekarang extend di sisi Guest CentOS-nya. Itu saya lihat pakai LVM, nah silakan di extend di LVM nya.

Coba berikan output dari perintah2 berikut ini :
Code:
[root@core ~]# pvdisplay

[root@core ~]# vgdisplay

[root@core ~]# lvdisplay

Nanti kita bantu sampai selesai.
 

zens

Hosting Guru
Verified Provider
terimakasih atas masukannya, berikut output dari lvm :
#
[root@core ~]# pvdisplay
--- Physical volume ---
PV Name /dev/sda2
VG Name centos_core
PV Size 63.51 GiB / not usable 2.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 16258
Free PE 0
Allocated PE 16258
PV UUID OndcBJ-OmdL-uGlb-SZwp-CT3U-YubJ-eueZ62

"/dev/sda3" is a new physical volume of "100.00 GiB"
--- NEW Physical volume ---
PV Name /dev/sda3
VG Name
PV Size 100.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID BWUHsk-Z5tq-IiLP-E6cQ-Wosx-wDu1-fWZ5LO

[root@core ~]# vgdisplay
--- Volume group ---
VG Name centos_core
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 7
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 3
Max PV 0
Cur PV 1
Act PV 1
VG Size 63.51 GiB
PE Size 4.00 MiB
Total PE 16258
Alloc PE / Size 16258 / 63.51 GiB
Free PE / Size 0 / 0
VG UUID owyMdo-GhSE-rg2n-jnn5-fAAd-qEUn-Bb9jSA

[root@core ~]# lvdisplay
--- Logical volume ---
LV Path /dev/centos_core/root
LV Name root
VG Name centos_core
LV UUID 3QwDJ4-HVww-Cgb5-T3xh-ryMg-wf9X-TnfQFi
LV Write Access read/write
LV Creation host, time core.xsxxx.biz.id, 2017-01-05 19:04:31 +0700
LV Status available
# open 1
LV Size 35.35 GiB
Current LE 9050
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 8192
Block device 253:0

--- Logical volume ---
LV Path /dev/centos_core/home
LV Name home
VG Name centos_core
LV UUID lU9p1I-ZkcS-B5c0-mqHE-62aS-fw9V-HOVizc
LV Write Access read/write
LV Creation host, time core.xsxxx.biz.id, 2017-01-05 19:04:35 +0700
LV Status available
# open 1
LV Size 20.16 GiB
Current LE 5160
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 8192
Block device 253:2

--- Logical volume ---
LV Path /dev/centos_core/swap
LV Name swap
VG Name centos_core
LV UUID jvstxU-OLpd-0gJO-w6tf-Ri9o-hCbj-a3cJUg
LV Write Access read/write
LV Creation host, time core.xsxxx.biz.id, 2017-01-05 19:04:38 +0700
LV Status available
 

GPLHosting

Hosting Guru
Ok great job.

Sekarang yang harus di lakukan adalah :
1. Backup Guest CentOS-nya dahulu. (PENTING, kalau sudah ada datanya, kalau tidak ada data, silakan dilanjut ke no. 2)
2. Cek tipe partisi baru /dev/sda3 (hasil "resize" di Host Proxmox-nya) dengan command :

Code:
[root@core ~]# fdisk /dev/sda3

Bila sudah masuk command prompt dari fdisk, maka cek tipe partisi dengan menekan tombol "p" (tanpa tanda kutip), berikan outputnya kesini :

Code:
Command (m for help): p
 

zens

Hosting Guru
Verified Provider
hasil dari fdisk :

[root@core ~]# fdisk /dev/sda3
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0xb4b3bb07.

Command (m for help): p

Disk /dev/sda3: 113.8 GB, 113816633344 bytes, 222298112 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0xb4b3bb07

Device Boot Start End Blocks Id System

Command (m for help):



## penambahan space ini nantinya bisa dimasukan ke folder /home ya @GPLHosting ?
 

galuh82

Hosting Guru
Verified Provider
pengalaman di virtualizor, moga aja sama .. lakukan resize2fs
 

GPLHosting

Hosting Guru
Maaf baru respon lagi.

Tipe partisinya dari /dev/sda adalah dos, sesuai dengan informasi ini :
Code:
Disk label type: dos

Maka harus di ubah type-nya menjadi Linux LVM. Caranya adalah sbb :
1. Masuk fdisk :
Code:
[root@core ~]# fdisk /dev/sda3

2. tekan tombol "t" (tanpa tanda kutip) :
Code:
Command (m for help): t

3. masukkan kode type partisi LVM, yaitu "8e" (tanpa tanda kutip) :
Code:
Hex code (type L to list codes): 8e

4. cek lagi hasil perubahan partisinya, dengan menekan tombol "p" (tanpa tanda kutip) :
Code:
Command (m for help): p

5. Bila sudah benar, type partisinya menjadi Linux LVM, lalu simpan perubahannya dengan menekan tombol "w" (tanpa tanda kutip) :
Code:
Command (m for help): w
 

GPLHosting

Hosting Guru
Kalau sudah berhasil ubah type partisi di fdisk, mari kita lanjut ya.
Next, kita tambahkan partisi /dev/sda3 ke Volume Group centos_core, caranya adalah :

Code:
[root@core ~]# vgextend centos_core /dev/sda3

Lalu cek hasilnya menggunakan vgdisplay (berikan hasil outputnya kesini) :

Code:
[root@core ~]# vgdisplay
 

GPLHosting

Hosting Guru
Ok. Kalau sudah menambahkan /dev/sda3 ke volume group centos_core, maka langkah selanjutnya adalah meng-extend logical volume dari /home, caranya sbb :

Code:
[root@core ~]# lvextend -l 100%FREE /dev/centos_core/home
 
Status
Not open for further replies.

Top