partisi root proxmox penuh (” Mounting /var/lib/vz ke /dev/pve/data “)

Bismillah ,..

secara default ketika kita install proxmox maka proxmox akan menformat seluruh hardisk kita dan akan otomatis men create tabel partisi , perlu di ketahui menurut diskusi di https://forum.proxmox.com/threads/resizing-root-partition-and-giving-proxmox-more-space.18048/   proxmox berjalan di dalam LVM , maka kita juga bisa melakukan resize ataupun extend partisi .  Di kasus saya ini jika jalankan perintah

[email protected]:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 10M 0 10M 0% /dev
tmpfs 4.0G 8.9M 4.0G 1% /run
/dev/dm-0 68G 1.5G 63G 3% /
tmpfs 9.9G 43M 9.8G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 9.9G 0 9.9G 0% /sys/fs/cgroup
tmpfs 100K 0 100K 0% /run/lxcfs/controllers
cgmfs 100K 0 100K 0% /run/cgmanager/fs
/dev/fuse 30M 16K 30M 1% /etc/pve
[email protected]:~#

bisa di lihat di atas partisi  / (“root”)  hanya  sebesar 63G , sedangkan folder  penyumbang terbesar penuh nya root yaitu ” /var/lib/vz/ ” tempat image dan kvm berada , ternyta masih ter mount di root

[email protected]:/# df -h /var/lib/vz
Filesystem Size Used Avail Use% Mounted on
/dev/dm-0 68G 1.5G 63G 3% /

dan ternyata setelah saya coba browsing  ternyata PVE meng create bebrapa lv , bisa di lihat dengan perintah

[email protected]:/# lvs
 LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
 data pve twi-a-tz-- 181.03g 0.00 0.42 
 root pve -wi-ao---- 68.25g 
 swap pve -wi-ao---- 8.00g
[email protected]:~# lvdisplay /dev/pve/data 
 --- Logical volume ---
 LV Name data
 VG Name pve
 LV UUID XYI97P-3LYk-F9Yj-a062-6Tzc-kypI-mdkNFB
 LV Write Access read/write
 LV Creation host, time proxmox, 2017-05-06 09:35:42 +0700
 LV Pool metadata data_tmeta
 LV Pool data data_tdata
 LV Status available
 # open 0
 LV Size 181.03 GiB
 Allocated pool data 0.00%
 Allocated metadata 0.42%
 Current LE 46344
 Segments 1
 Allocation inherit
 Read ahead sectors auto
 - currently set to 256
 Block device 251:4
 [email protected]:~# lvdisplay /dev/pve/root 
 --- Logical volume ---
 LV Path /dev/pve/root
 LV Name root
 VG Name pve
 LV UUID Ixaid3-0kbW-nFXX-zUYo-KbNZ-X6Yt-3lxxot
 LV Write Access read/write
 LV Creation host, time proxmox, 2017-05-06 09:35:41 +0700
 LV Status available
 # open 1
 LV Size 68.25 GiB
 Current LE 17472
 Segments 1
 Allocation inherit
 Read ahead sectors auto
 - currently set to 256
 Block device 251:0

Jadi kita akan mencoba untuk mount /dev/pve/data ke folder  /var/lib/vz/  , langkah pertama remove lvthin volume di dalam /etc/storage/storage.cfg

dir: local
        path /var/lib/vz
        content iso,vztmpl,backup

lvmthin: local-lvm
        thinpool data
        vgname pve
        content rootdir,images

rubah menjadi

dir: local
        path /var/lib/vz
        content iso,vztmpl,backup

remove pve/data

[email protected]:/# lvremove pve/data
Do you really want to remove active logical volume data? [y/n]: y
 Logical volume "data" successfully removed

kemudian create kembali

[email protected]:/# lvcreate --name data -l +100%FREE pve
 Logical volume "data" created.

kemudian format

[email protected]:/# mkfs.ext4 /dev/pve/data
mke2fs 1.42.12 (29-Aug-2014)
Creating filesystem with 51648512 4k blocks and 12918784 inodes
Filesystem UUID: 751be19c-346b-4c44-9f86-d90c7d2d6c8c
Superblock backups stored on blocks: 
 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
 4096000, 7962624, 11239424, 20480000, 23887872

Allocating group tables: done 
Writing inode tables: done 
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

[email protected]:/#

Buka /etc/fstab dan masukan

/dev/pve/data /var/lib/vz ext4 defaults 0 1

kemudian reboot , jika sukses maka ketika booting /dev/pve/data akan di mount ke folder /var/lib/vz  , seperti berikut  .

[email protected]:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 10M 0 10M 0% /dev
tmpfs 4.0G 8.9M 4.0G 1% /run
/dev/dm-0 68G 1.5G 63G 3% /
tmpfs 9.9G 34M 9.8G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 9.9G 0 9.9G 0% /sys/fs/cgroup
/dev/mapper/pve-data 194G 60M 184G 1% /var/lib/vz
cgmfs 100K 0 100K 0% /run/cgmanager/fs
tmpfs 100K 0 100K 0% /run/lxcfs/controllers
/dev/fuse 30M 16K 30M 1% /etc/pve

semoga bermanfaat , 🙂

sumber :

https://pve.proxmox.com/wiki/Installation:_Tips_and_Tricks#Optional:_Reverting_Thin-LVM_to_.22old.22_Behavior_of_.2Fvar.2Flib.2Fvz_.28Proxmox_4.2_and_later.29

https://forum.proxmox.com/threads/resizing-root-partition-and-giving-proxmox-more-space.18048/

No Comments, Be The First!

Your email address will not be published.

Time limit is exhausted. Please reload CAPTCHA.