|
| 1 | +(howto-providers-google)= |
| 2 | + |
| 3 | +# Perform common Google Cloud configuration tasks |
| 4 | + |
| 5 | +This page lists various common tasks you can perform on your |
| 6 | +Google Cloud virtual machine. |
| 7 | + |
| 8 | +(howto-providers-google-resize-disk)= |
| 9 | + |
| 10 | +## Increasing your boot disk size |
| 11 | + |
| 12 | +Boot disks contain the operating system and boot loader for your TLJH instance. If you followed |
| 13 | +the [Google Cloud TLJH installation instructions](#install-google) then you created a virtual machine |
| 14 | +with one disk: a boot disk that will _also_ be used to hold user data in your hub. For various reasons |
| 15 | +you may need to change your boot disk size. |
| 16 | + |
| 17 | +Google Cloud Compute Engine supports _increasing_ (but not _decreasing_) the size of existing disks. |
| 18 | +If you selected a boot disk with a supported version of **Ubuntu** or **Debian** as the operating |
| 19 | +system, then your boot disk can be resized easily from the console with these steps. |
| 20 | + |
| 21 | +:::{note} |
| 22 | +Google Cloud resizes the root partition and file system for _boot_ disks with _public_ images |
| 23 | +(such as the TLJH supported **Ubuntu** and **Debian** images) automatically after your increase |
| 24 | +the size of your disk. If you have any other _non-boot_ disks attached to your instance, you |
| 25 | +will need to perform extra steps yourself after resizing your disk. For more information on |
| 26 | +this and other aspects of resizing persistent disks, see |
| 27 | +[Google's documentation](https://cloud.google.com/compute/docs/disks/resize-persistent-disk). |
| 28 | +::: |
| 29 | + |
| 30 | +1. Go to [Google Cloud Console -> Compute Engine -> VM instances](https://console.cloud.google.com/compute/instances) and select your TLJH instance. |
| 31 | + |
| 32 | +1. Scroll down until you find your boot disk and select it. |
| 33 | + |
| 34 | + ```{image} ../../images/providers/google/boot-disk-resize.png |
| 35 | + :alt: Boot disk with Ubuntu jammy image |
| 36 | + ``` |
| 37 | + |
| 38 | +1. Select **Edit** in the top menu. This may require selecting the kebab menu (the 3 vertical dots). |
| 39 | + |
| 40 | + ```{image} ../../images/providers/google/boot-disk-edit-button.png |
| 41 | + :alt: Disk edit button |
| 42 | + ``` |
| 43 | + |
| 44 | +1. Update the **Size** property and save the changes at the bottom of the page. |
| 45 | + |
| 46 | + ```{image} ../../images/providers/google/boot-disk-resize-properties.png |
| 47 | + :alt: Boot disk size property |
| 48 | + ``` |
| 49 | + |
| 50 | +1. Reboot the VM instance by logging into your TLJH, opening the terminal, and running `sudo reboot`. |
| 51 | + You will lose your connection to the instance while it restarts. Once it comes back up, your disk |
| 52 | + will reflect your changes. You can verify that the automatic resize of your root partition and |
| 53 | + file system took place by running `df -h` in the terminal, which will show the size of the disk |
| 54 | + mounted on `/`: |
| 55 | + ```bash |
| 56 | + $ df -h |
| 57 | + Filesystem Size Used Avail Use% Mounted on |
| 58 | + /dev/root 25G 6.9G 18G 28% / |
| 59 | + tmpfs 2.0G 0 2.0G 0% /dev/shm |
| 60 | + tmpfs 785M 956K 784M 1% /run |
| 61 | + tmpfs 5.0M 0 5.0M 0% /run/lock |
| 62 | + /dev/sda15 105M 6.1M 99M 6% /boot/efi |
| 63 | + ``` |
0 commit comments