Sut i ymestyn y Ubuntu Linux n anawdd choeten cathrena rhaniad gwraidd yn VirtualBox?
Os ydych yn rhedeg allan o le mewn Ubuntu Linux yn VirtualBox, yna bydd angen i chi gynyddu maint disg caled ac yna ail-maint y rhaniad. The following will show you how to do this.
Mae gen i Ubuntu VM sydd â maint disg caled o 8GB. I want to increase the size to 16Gb.

- Sicrhewch fod eich VM ei ddiffodd.
- Ewch i'r archa 'n barod ac yn mynd i'r cyfeiriadur gosod VirtualBox. The default location usually is C:\Program Files\Oracle\VirtualBox
- Yn y archa 'n barod fynd i mewn:
VBoxManage modifyhd "Ac:\VirtualBox VMs\Ubuntu 14.04.3\Ubuntu 14.04.3.vdi” --resize 16000 - Edrychwch ar y maint yn y GUI VirtualBox. The size should have changed.

- Nawr bod y ddisg galed VirtualBox wedi newid y rhaniad angen ei newid i mewn Ubuntu fel y gellir ei ddefnyddio. In order to resize the partition use the gparted live CD which can be downloaded from yma
- Ar ôl ei lawrlwytho rhowch y ffeil GParted ISO i mewn i'r un CD gyriant VM a thiciwch y blwch CD byw. Start the VM booting into the CD drive.
- Unwaith GParted wedi sodlau, dylech fod yn gallu gweld eich rhaniadau yn ogystal â'r rhaniad a ddyrannwyd heb ei.

- Dde chlecia y rhaniad sy'n cael ei nythu o dan y rhaniad estynedig gyda'r pv system ffeiliau lvm2 a deactivate y rhaniad.
- Dewiswch y rhes estynedig a chliciwch ail-maint / symud. Drag the arrow right to the end.

- 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.
- Cliciwch ar y botymau yn berthnasol i achub y newidiadau.
- Shutdown the VM and remove the GParted CD
- Start the VM to boot up the Ubuntu install
- Disgiau rhedeg gan ddefnyddio'r chwiliad Ubuntu

Gallwch weld bod y maint disg caled wedi cynyddu ond nid yw'r gofod yn cael ei ddefnyddio gan y cysawd ffeiliau Ubuntu. The root partition is only using 6.1gb of space. Mae angen i ni redeg gorchymyn i ddweud wrth Ubuntu i ddefnyddio'r gofod hwn. Gwnewch nodyn o'r gyfrol rhesymegol ar gyfer y rhaniad gwraidd. In this tutorial it is /dev/ubuntu-vg/root. - Terfynell Agored a deipio 'r yn canlyn archa yn lle'r enw cyfrol rhesymegol gyda eich pen eich hun:
Mae'r uchod yn defnyddio'r -L paramedr sy'n dweud Ubuntu maint y rhaniad rhesymegol mewn gigabeit. 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.sudo lvextend -L13.385G / dev / ubuntu-VG / gwraidd
- Nawr rydym wedi gosod y maint mae angen i ni ddweud wrth Ubuntu i fynd yn ei flaen ac ail-maint ei. Type the following to do this:
sudo resize2fs / dev / ubuntu-VG / gwraidd
- Nawr edrychwch ar y cyfleustodau disgiau. 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.

