cara resize disk kvm proxmox


Status
Not open for further replies.

GPLHosting

Hosting Guru
Lanjut ya ...
Kalau sudah extend Logical Volume-nya /home ... langkah selanjutnya ada me-resize File Systemnya, menggunakan command :

Code:
[root@core ~]# resize2fs /dev/centos_core/home

Lalu cek hasilnya menggunakan :

Code:
[root@core ~]# df -h

Selesai. Semoga bermanfaat.
 

zens

Hosting Guru
Verified Provider
langkah terakhirnya muncul message gini @GPLHosting :
#
Code:
[root@core ~]# resize2fs /dev/centos_core/home
resize2fs 1.42.9 (28-Dec-2013)
resize2fs: Bad magic number in super-block while trying to open /dev/centos_core/home
Couldn't find valid filesystem superblock.
# terus df -h tetep gak ada perubahan
Code:
[root@core ~]# df -h
Filesystem                    Size  Used Avail Use% Mounted on
/dev/mapper/centos_core-root   36G  9.6G   26G  27% /
devtmpfs                      485M     0  485M   0% /dev
tmpfs                         495M     0  495M   0% /dev/shm
tmpfs                         495M  6.9M  488M   2% /run
tmpfs                         495M     0  495M   0% /sys/fs/cgroup
/dev/mapper/centos_core-home   21G   97M   21G   1% /home
/dev/sda1                     497M  186M  312M  38% /boot
/dev/loop0                    1.4G  2.5M  1.4G   1% /tmp
tmpfs                          99M     0   99M   0% /run/user/0
 

zens

Hosting Guru
Verified Provider
Kalau dicek yang 100GB udah ada ya :
[root@core ~]# fdisk -l

Disk /dev/sda: 182.5 GB, 182536110080 bytes, 356515840 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: 0x00036b17

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 1026047 512000 83 Linux
/dev/sda2 1026048 134217727 66595840 8e Linux LVM
/dev/sda3 134217728 356515839 111149056 8e Linux LVM

Disk /dev/mapper/centos_core-root: 38.0 GB, 37958451200 bytes, 74137600 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 /dev/mapper/centos_core-swap: 8589 MB, 8589934592 bytes, 16777216 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 /dev/mapper/centos_core-home: 107.4 GB, 107369988096 bytes, 209707008 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
berarti untuk disatuin ke direktori ... /home nya yang belum berhasil ya @GPLHosting
sambil tetep ngoprek dan cari informasi sana sini :D
saya pakai cloudlinux + disk lvm, apakah perintah resize2fs gak support ya ?
 

zens

Hosting Guru
Verified Provider
Kalau pakai resize2fs muncul error spt itu, maka filesystemnya bukan ext3 atau ext4.

Itu CentOS 7 ya? Kl iya, mgkn pakai xfs, coba dicek dulu pakai command:

Code:
[root@core ~]# mount | grep centos_core-home
iya saya coba dulu ..
ini pakai centos 7 diinstalin CloudLinux, jadi nya ya cloudlinux .. hehehe
 

zens

Hosting Guru
Verified Provider
Kalau hasil pengecekan memang benar pakai XFS, maka untuk me-resize XFS nya gunakan command :

Code:
[root@core ~]# xfs_growfs /dev/mapper/centos_core-home

Lalu kalau sudah selesai, cek lagi pakai df -h

Semoga sukses :D
Suhanalloh berhasil @GPLHosting :113:, direktori home berubah menjadi 100GB
Code:
[root@core ~]# xfs_growfs /dev/mapper/centos_core-home
meta-data=/dev/mapper/centos_core-home isize=256    agcount=4, agsize=1320960 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=0        finobt=0 spinodes=0
data     =                       bsize=4096   blocks=5283840, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=0
log      =internal               bsize=4096   blocks=2580, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
data blocks changed from 5283840 to 26213376
[root@core ~]# df -h
Filesystem                    Size  Used Avail Use% Mounted on
/dev/mapper/centos_core-root   36G  9.6G   26G  27% /
devtmpfs                      485M     0  485M   0% /dev
tmpfs                         495M     0  495M   0% /dev/shm
tmpfs                         495M  6.8M  488M   2% /run
tmpfs                         495M     0  495M   0% /sys/fs/cgroup
/dev/mapper/centos_core-home  100G   97M  100G   1% /home
/dev/sda1                     497M  186M  312M  38% /boot
/dev/loop0                    1.4G  2.5M  1.4G   1% /tmp
tmpfs                          99M     0   99M   0% /run/user/0
Terimakasih atas panduannya dan sabar menuntun, hehehee
Tapi .. space yang sebelumya larinya kemana ya ? ko gak kesatuin sama yang 100GB seakan space yang lama dibanti sama space yang baru, apa emang gitu ya ?
 

GPLHosting

Hosting Guru
Suhanalloh berhasil @GPLHosting , direktori home berubah menjadi 100GB
Code:
[root@core ~]# xfs_growfs /dev/mapper/centos_core-home
meta-data=/dev/mapper/centos_core-home isize=256    agcount=4, agsize=1320960 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=0        finobt=0 spinodes=0
data     =                       bsize=4096   blocks=5283840, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=0
log      =internal               bsize=4096   blocks=2580, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
data blocks changed from 5283840 to 26213376
[root@core ~]# df -h
Filesystem                    Size  Used Avail Use% Mounted on
/dev/mapper/centos_core-root   36G  9.6G   26G  27% /
devtmpfs                      485M     0  485M   0% /dev
tmpfs                         495M     0  495M   0% /dev/shm
tmpfs                         495M  6.8M  488M   2% /run
tmpfs                         495M     0  495M   0% /sys/fs/cgroup
/dev/mapper/centos_core-home  100G   97M  100G   1% /home
/dev/sda1                     497M  186M  312M  38% /boot
/dev/loop0                    1.4G  2.5M  1.4G   1% /tmp
tmpfs                          99M     0   99M   0% /run/user/0

Walhamdulillaah, sujud syukur. Takbir! :113:
 
Status
Not open for further replies.

Top