Linux-Gast (in VirtualBox) verwendet nicht den gesamten Speicherplatz der dynamischen VDI-Festplatte
624
TedGrassman
Ich habe ein Problem mit meiner virtuellen Festplatte in VirtualBox, einem Linux-CentOS-Guest. Ich verwende keine Schnappschüsse.
Es war anfangs eine 8-GB-Platte, die ich mithilfe des VBoxManage modifyhdBefehls innerhalb des Host auf 16 GB erweitert habe . Ich habe dann ein GParted liveBild verwendet, um die Größe der Partition innerhalb des Gasts zu ändern. Der Datenträger und die VM haben den Host geändert (jedoch dieselbe Version von VirtualBox).
Jetzt habe ich meine Festplatte voll und habe keinen Platz mehr.
Betrachten GParted: /boot (/dev/sda1)hat eine Größe von 1 GB und / (/dev/sda2)hat eine Größe von 15 GB: GParted live
[tnodet@localhost ~]$ sudo pvdisplay --- Physical volume --- PV Name /dev/sda2 VG Name cl PV Size 15,00 GiB / not usable 2,00 MiB Allocatable yes PE Size 4,00 MiB Total PE 3839 Free PE 2048 Allocated PE 1791 PV UUID rrG0JE-i1MB-IeA0-Ce5c-dpj7-Fwm2-RMjyYb
Auf einem Windows 10-Host:
D:\Profiles\ted\VirtualBox VMs\CentOS-CKAN>VBoxManage showhdinfo CentOS-CKAN.vdi UUID: 76d3524e-803c-4d1e-816d-5bc705e26aac Parent UUID: base State: locked write Type: writethrough Location: d:\Profiles\ted\VirtualBox VMs\CentOS-CKAN\CentOS-CKAN.vdi Storage format: VDI Format variant: dynamic default Capacity: 16384 MBytes Size on disk: 6413 MBytes Encryption: disabled In use by VMs: CentOS-CKAN (UUID: 1e96120c-17a3-4892-8d98-dd88eed429db)
Ich bin verloren und ziemlich verwirrt, ich kann nicht einmal herausfinden, ob das Problem vom Windows-Host / der VirtualBox oder vom Linux-Gast stammt.
Ich habe es herausgefunden; Es hatte mit logischen Volumina zu tun, mit denen ich mich nicht sehr wohl fühle.
Wie Sie sich vorstellen können fdisk -l, wurde die physische Partition sda2in zwei logische Volumes unterteilt /dev/cl/rootund/dev/cl/swap in eine Volume-Gruppe gruppiert cl:
[root@localhost ted]# vgscan Reading volume groups from cache. Found volume group "cl" using metadata type lvm2 [root@localhost ted]# lvscan ACTIVE '/dev/cl/root' [6,00 GiB] inherit ACTIVE '/dev/cl/swap' [1020,00 MiB] inherit