GithubHelp home page GithubHelp logo

gcp-disk-full's Introduction

Fix GCP Disk full issue -

Assumptions

VM master disk is full

VM slave is working file

Steps

  1. Log in to GCP console

  2. Shut down master node

  3. Click on master VM

  4. Click edit on top

  5. Scroll to the boot disk section

  6. Change "When deleting instance" to "Keep Disk"

  7. Click on x next to Keep Disk to detach disk

  8. On the Bottom click Save

  9. Go back to GCP compute engine console

  10. click on slave VM

  11. Click Edit

  12. Search for Additional Disks

  13. Click - Add existing Disks

  14. In the Disk dropdown select the master disk

  15. Click Done

  16. At bottom of the page click save

  17. Login to slave VM in terminal

  18. Log in as root - sudo -i

  19. Execute - lsblk

  20. You should now see a new disk - sdb

loop0     7:0    0 88.7M  1 loop /snap/core/7396
loop1     7:1    0 60.5M  1 loop /snap/google-cloud-sdk/94
sda       8:0    0   30G  0 disk 
├─sda1    8:1    0 29.9G  0 part /
├─sda14   8:14   0    4M  0 part 
└─sda15   8:15   0  106M  0 part /boot/efi
sdb       8:16   0   30G  0 disk 
├─sdb1    8:17   0 29.9G  0 part 
├─sdb14   8:30   0    4M  0 part 
└─sdb15   8:31   0  106M  0 part 

  1. mkdir /hdd

  2. vi /etc/fstab

  3. Add the below line at the end -

/dev/sdb1    /hdd    ext4    defaults    0    1
  1. Save the file

  2. mount /hdd

  3. cd /hdd

  4. cd var/log/jenkins/

  5. rm *.log

  6. cd

  7. umount /hdd

  8. Go back to GCP compute engine console

  9. Click on slave VM

  10. Click edit

  11. Search for Additional Disks button

  12. Hover on Existing Disk section

  13. You will get a delete icon

  14. Click on the delete icon

  15. Click Save at the bottom of the page

  16. Go back to compute engine dashboard

  17. Click on master VM

  18. Click edit on top

  19. Search for Boot Disk section

  20. Add item -> Name - master

  21. Change Device Name from Custom to Based on disk name(default) in the Device Name dropdown

  22. Click save

  23. Boot VM

gcp-disk-full's People

Contributors

hub-kubernetes avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.