Kaip pratęsti Ubuntu Linux Hard Disk Drive šaknies VirtualBox?

Jei senka erdvėje Ubuntu Linux VirtualBox tada jums reikės padidinti standžiojo disko dydį, tada vėl dydžio pasiskirstymo. The following will show you how to do this.

Turiu Ubuntu VM, kuris turi standžiojo disko dydį 8GB. I want to increase the size to 16Gb.

Kaip pratęsti Ubuntu Linux Hard Disk Drive šaknies

  1. Įsitikinkite, kad jūsų VM yra išjungtas.
  2. Eiti į komandų eilutę ir eiti į VirtualBox įdiegimo katalogą. The default location usually is C:\Program Files "Oracle VirtualBox
  3. Į komandų eilutę įrašykite:
    VBoxManage modifyhd "Ir:\VirtualBox VMs\Ubuntu 14.04.3\Ubuntu 14.04.3.vdi” --resize 16000
  4. Patikrinkite dydį į VirtualBox GUI. The size should have changed.
    Kaip pratęsti Ubuntu Linux Hard Disk Drive šaknies 2
  5. Dabar, kad VirtualBox kietajame diske pakeitė disko turi būti pakeista į Ubuntu taip, kad jis gali būti naudojamas. In order to resize the partition use the gparted live CD which can be downloaded from čia
  6. Kai atsisiųsti įdėkite GParted ISO failą į tą pačią VM CD diską ir pažymėkite Live CD langelį. Start the VM booting into the CD drive.
  7. Kai GParted jau įkelta jums turėtų būti suteikta galimybė pamatyti savo pertvaros taip pat JT skyrė pertvara.
    Resize Hard Disk Drive partition of Ubuntu Linux in VirtualBox using GParted
  8. Dešiniuoju pelės mygtuku spustelėkite disko, kuris yra įdėtos pagal išplėstinio pertvara su failų sistema lvm2 pv ir išjungti disko.
  9. Pasirinkite pratęstas eilutę ir spustelėkite pakartotinai dydis / žingsnį. Drag the arrow right to the end.
    Resize Hard Disk Drive partition of Ubuntu Linux in VirtualBox using GParted-2
  10. Select the partition that is nested under the extended partition with the file system lvm2 pv and click the re-size/move button. Drag the arrow right to the end.
  11. Spauskite Apply mygtukus, kad išsaugotumėte pakeitimus.
  12. Shutdown the VM and remove the GParted CD
  13. Start the VM to boot up the Ubuntu install
  14. Pradėti diskai naudojant paieškos Ubuntu
    Resize Hard Disk Drive partition of Ubuntu Linux in VirtualBox using GParted
    Jūs galite pamatyti, kad kietasis diskas dydis išaugo, bet erdvę nebuvo naudojamas Ubuntu failų sistemos. The root partition is only using 6.1gb of space. Mes turime paleisti komandą pasakyti Ubuntu naudoti šią erdvę. Padaryti loginio tūrio pastabą šaknies. In this tutorial it is /dev/ubuntu-vg/root.
  15. Atidaryti terminalo ir įveskite šią komandą pakeisti Logical Volume vardą su savo:
    sudo lvextend -L13.385G / dev / ubuntu-VG / root
    Aukščiau naudoja parametrą -L kuris pasakoja Ubuntu loginio disko gigabaitų dydžio. Change the size to your needs. The above command can be run as many times as you need so don’t worry about making a mistake.
  16. Dabar mes turime nustatyti dydį, turime pasakyti Ubuntu eiti į priekį ir iš naujo dydžio jis. Type the following to do this:
    sudo resize2fs / dev / ubuntu-VG / root
  17. Dabar patikrinkite diskų naudingumas. The size of the root logical volume should now have increased. Ubuntu is now using the extra disk space that we had increased in VirtualBox.
    Resize Hard Disk Drive partition of Ubuntu Linux in VirtualBox using GParted