Hoe om die Ubuntu Linux hardeskyf wortelpartisie in VirtualBox brei?

As jy hardloop uit die ruimte in Ubuntu Linux in VirtualBox dan sal jy nodig het om die hardeskyf te vergroot en dan weer die grootte van die partisie. The following will show you how to do this.

Ek het 'n Ubuntu VM wat 'n harde skyf grootte van 8GB het. I want to increase the size to 16Gb.

Hoe om die Ubuntu Linux hardeskyf wortelpartisie brei

  1. Maak seker dat jou VM afgeskakel.
  2. Gaan na die command prompt en gaan die die VirtualBox installasie gids. The default location usually is C:\Program Files\Oracle\VirtualBox
  3. In die command prompt betree:
    VBoxManage modifyhd "En:\VirtualBox VMs\Ubuntu 14.04.3\Ubuntu 14.04.3.vdi” --resize 16000
  4. Gaan die grootte in die VirtualBox GUI. The size should have changed.
    Hoe om die Ubuntu Linux hardeskyf wortelpartisie brei 2
  5. Nou dat die VirtualBox hardeskyf verander die verdeling moet in Ubuntu te verander sodat dit gebruik kan word. In order to resize the partition use the gparted live CD which can be downloaded from hier
  6. Sodra afgelaai voeg die lêer GParted ISO in dieselfde VM CD-stasie en merk die live CD boks. Start the VM booting into the CD drive.
  7. Sodra GParted het geselflaai jy moet in staat wees om jou mure te sien sowel as die un toegeken partisie.
    Resize Hard Disk Drive partition of Ubuntu Linux in VirtualBox using GParted
  8. Regs kliek die partisie wat geneste onder die uitgebreide partisie met die lêerstelsel lvm2 pv en die verdeling deaktiveer.
  9. Kies die uitgebreide ry en kliek op die re-grootte / skuif. 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. Klik op die toepassing knoppies om die veranderinge te red.
  12. Shutdown the VM and remove the GParted CD
  13. Start the VM to boot up the Ubuntu install
  14. Begin skywe met behulp van die Ubuntu search
    Resize Hard Disk Drive partition of Ubuntu Linux in VirtualBox using GParted
    Jy kan sien dat die hardeskyf grootte toegeneem het, maar die ruimte is nie gebruik word deur die Ubuntu lêerstelsel. The root partition is only using 6.1gb of space. Ons moet 'n opdrag om te hardloop Ubuntu vertel hierdie ruimte gebruik. Maak 'n aantekening van die logiese volume vir die wortelpartisie. In this tutorial it is /dev/ubuntu-vg/root.
  15. Open terminale en tik die volgende opdrag die logiese volume naam vervang met jou eie:
    sudo lvextend -L13.385G / dev / ubuntu-vg / wortel
    Die bogenoemde gebruik die parameter -L wat Ubuntu die grootte van die logiese partisie in GB vertel. 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. Nou het ons die grootte moet ons Ubuntu vertel om voort te gaan en weer die grootte dit te stel. Type the following to do this:
    sudo resize2fs / dev / ubuntu-vg / wortel
  17. Kyk nou die nut skywe. 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