Home > OS >  Google Cloud Code VSCode extension fills out my root drive
Google Cloud Code VSCode extension fills out my root drive

Time:01-13

This is my first post in stack overflow. I am using Arch Linux updated to the latest updates available for all packages. My system is divided to 2 volumes: 30 GB for root folder and another volume for everything else.

I started using the google-cloud-code VSCode extension and I noticed that every time I create a version locally for cloud run my space on the root volume is getting smaller.

I don't know where are the files that cause that but now my root medium is 100% full and I can't create new deployments.

I suspect it is something in the python installation folder inside /lib and /lib64 since both are on 4GB right now. When checking the files sized with the du -a command I found out that the ./python3.9/site-packages/grpc is the biggest with 9984 as the number represents the size (not sure what that means, mb maybe?) the next file the the list is 996 in size. Please help me clear the space and please help me make it work without saving all of that data or at least not put it in the root volume

Thank you!

CodePudding user response:

Okay so I found out what was the problem. The cloud code created a volume for the deployment in /var/lib/docker/volumes/NAME_OF_THE_DEPLOYMENT This volume is the storage of the container and it weigh a lot, I removed that from there for some free space and it worked. Now for next deployment I need to change the default volume location or move the docker install location to be in the home dir.

Here is a guide I found: Relocating the Docker Root directory If the file space in the Docker Root directory is not adequate, you must relocate Docker Root.

Procedure To relocate the Docker Root directory, complete the following steps as root or a user with “sudo all” authority:

Stop the Docker services:

sudo systemctl stop docker
sudo systemctl stop docker.socket
sudo systemctl stop containerd

Create the necessary directory structure into which to move Docker Root by running the following command. This directory structure must reside on a file system with at least 50GB free disk space. Significantly more disk space may be required depending on your daily ingestion volumes and data retention policy:

sudo mkdir -p /new_dir_structure

Move Docker Root to the new directory structure:

sudo mv /var/lib/docker /new_dir_structure

Edit the file /etc/docker/daemon.json. If the file does not exist, create the file by running the following command:

sudo vim /etc/docker/daemon.json

Add the following information to this file:

{
  "data-root": "/new_dir_structure/docker”
}

After the /etc/docker/daemon.json file is saved and closed, restart the Docker services:

sudo systemctl start docker

Run the command:

docker volume inspect NAME_OF_YOUR_VOLUME

and make sure the mount point is the new path.

Name of your volume can be obtain using:

docker volume ls

Hope it will help other people here.

CodePudding user response:

You could turn off the Automatic installation of dependencies. Cloud Code VSCode installs minikube, gcloud, skaffold and a bunch of other stuff. If you don't need these you can turn them off

  •  Tags:  
  • Related