2015-10-14 12 views
7

Viene visualizzato un errore durante il tentativo di SSH nella mia istanza. Mi dice di controllare l'uscita seriale della console. Da quello che ho capito dice che il mio disco non ha più spazio. Cosa faccio? Ho bisogno di SSH per cancellare lo spazio ma non posso SSH perché non c'è spazio!Il disco è pieno, e non posso SSH all'istanza

Questo è quello che vedo:

Starting OpenBSD Secure Shell server: sshdopen: No space left on device 
Oct 14 13:18:13 instance-1 sshd[2771]: Server listening on 0.0.0.0 port 22. 
[?25l[?1c7[1GOct 14 13:18:13 instance-1 sshd[2771]: Server listening on :: port 22. 
[[32m ok [39;49m8[?25h[?0c. 
udhcpd: Disabled. Edit /etc/default/udhcpd to enable it. 
mktemp: failed to create file via template `/tmp/tmp.XXXXXXXXXX': No space left on device 
mktemp: failed to create file via template `/tmp/tmp.XXXXXXXXXX': No space left on device 
mktemp: failed to create file via template `/tmp/tmp.XXXXXXXXXX': No space left on device 
mktemp: failed to create file via template `/tmp/tmp.XXXXXXXXXX': No space left on device 
    % Total % Received % Xferd Average Speed Time Time  Time Current 
           Dload Upload Total Spent Left Speed 

    0  0 0  0 0  0  0  0 --:--:-- --:--:-- --:--:--  0 
100 2384 100 2384 0  0 1126k  0 --:--:-- --:--:-- --:--:-- 2328k 
Oct 14 13:18:13 instance-1 google: {"attributes":{"sshKeys":"ishener:ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAFbCZDZDvuIxUbH5AHYeUU/WUWaOBYI1S7Yl9k3oVFwrenn6XsMdDHKiSH2VtpenQ7mHu3YcLDFe0pO1AwJjnSO39JR/3tTVLeVbuHDTEhOhDHt0NE84S1rqHX6r591IDwLhoGnFdNibGs0Sc0uyR/kRxl5hjAWdskOm4wzald+uRctBd+hbdBmt6az7iF2UzHEV362LxUtIzaYWoo1hnhld07+eimi6t+bUHsgqDkVGaEUUDaRFWTaNlFI9UW/AMYOcu9C24molfpPKwe2R5C5HLI+8nNI7qvoGtrUZww7K5bxNQPe+bMvVitArjYItYNDU6OXvQVA/u6gnqnbt1MM= google-ssh {\"userName\":\"[email protected]\",\"expireOn\":\"2015-10-14T13:13:05+0000\"}\nishener:ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCKT2j4VbRM6DXSjLb5UlOdzfaB4K2TvZHWGV3JD7T++EbWX87JLOKg6AdbDPWTlgKRan02TIT/Xshy28r7fCCc= google-ssh {\"userName\":\"[email protected]\",\"expireOn\":\"2015-10-14T13:12:58+0000\"}\nrsa-key-20150806:ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAxtMUn200CaOuRa8bHFuqrjDiyUDrLECUf9V/ZpxT24lrqEbS1bDT7oWQwcuxQZEcrTnfeCEDeIwQpbNoOGp8NufrZUUG8jpVnVQqCHQZ3T+0Gs6et6JYxldhb0xT3KJVwQM+qnZOfwsk7co/+XOhE63u62NvUlqpGDQQUvuFY1wV3B7Rfjhg2JYEHCMswLRnSfnvyxp6+uQJ 
Oct 14 13:18:13 instance-1 google: 4THd/FlcGQJyJHUvpVQAqBIii8yc59+Rb32Xlyii6YU4+G60dfP6ON1iX2qkxJT5/mIkPfd3yPizbGsYhJbaqNQHPUE9hdqTlfk3gyA8S6SySNwViQtUqOH+sbo+suiJHHwr67V/qw== rsa-key-20150806\n"},"cpuPlatform":"Intel Ivy Bridge","description":"","disks":[{"deviceName":"instance-1","index":0,"mode":"READ_WRITE","type":"PERSISTENT"}],"hostname":"instance-1.c.united-wavelet-102819.internal","id":1871676137734806120,"image":"","machineType":"projects/273410245967/machineTypes/g1-small","maintenanceEvent":"NONE","networkInterfaces":[{"accessConfigs":[{"externalIp":"104.197.52.39","type":"ONE_TO_ONE_NAT"}],"forwardedIps":[],"ip":"10.240.238.207","network":"projects/273410245967/networks/default"}],"scheduling":{"automaticRestart":"TRUE","onHostMaintenance":"MIGRATE"},"serviceAccounts":{"[email protected]":{"aliases":["default"],"email":"[email protected]","scopes":["https://www.googleapis.com/auth/devstorage.read_only","https://www.googleapis.com/auth/logging.write"]},"default":{"al 
Oct 14 13:18:13 instance-1 google: iases":["default"],"email":"[email protected]","scopes":["https://www.googleapis.com/auth/devstorage.read_only","https://www.googleapis.com/auth/logging.write"]}},"tags":["http-server","https-server"],"virtualClock":{"driftToken":"12943060760861539723"},"zone":"projects/273410245967/zones/us-central1-f"} 
Oct 14 13:18:13 instance-1 google: No startup script found in metadata. 
[....] startpar: service(s) returned failure: tomcat7 ...[?25l[?1c7[1G[[31mFAIL[39;49m8[?25h[?0c [31mfailed![39;49m 
Oct 14 13:18:40 instance-1 accounts-from-metadata: WARNING Could not update /home/rsa-key-20150806/.ssh/authorized_keys due to [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/'] 
Oct 14 13:18:40 instance-1 accounts-from-metadata: WARNING Could not update /home/ishener/.ssh/authorized_keys due to [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/'] 
Oct 14 13:18:40 instance-1 accounts-from-metadata: WARNING Could not update /home/ishener_zaph/.ssh/authorized_keys due to [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/'] 
Oct 14 13:18:45 instance-1 sshd[2884]: Connection closed by 173.194.92.49 [preauth] 
Oct 14 13:18:46 instance-1 sshd[2886]: Connection closed by 173.194.92.49 [preauth] 
Oct 14 13:18:47 instance-1 accounts-from-metadata: WARNING Could not update /home/rsa-key-20150806/.ssh/authorized_keys due to [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/'] 
Oct 14 13:18:47 instance-1 accounts-from-metadata: WARNING Could not update /home/ishener/.ssh/authorized_keys due to [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/'] 
Oct 14 13:18:47 instance-1 accounts-from-metadata: WARNING Could not update /home/ishener_zaph/.ssh/authorized_keys due to [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/'] 
Oct 14 13:18:49 instance-1 sshd[2903]: Connection closed by 173.194.92.52 [preauth] 
Oct 14 13:18:51 instance-1 sshd[2905]: Connection closed by 173.194.92.52 [preauth] 
Oct 14 13:18:55 instance-1 sshd[2907]: Connection closed by 173.194.92.52 [preauth] 
Oct 14 13:19:02 instance-1 sshd[2909]: Connection closed by 173.194.92.48 [preauth] 
Oct 14 13:19:17 instance-1 sshd[2912]: Connection closed by 173.194.92.48 [preauth] 
Oct 14 13:19:58 instance-1 accounts-from-metadata: WARNING Could not update /home/ishener_zaph/.ssh/authorized_keys due to [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/'] 
Oct 14 13:19:58 instance-1 accounts-from-metadata: WARNING Could not update /home/rsa-key-20150806/.ssh/authorized_keys due to [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/'] 
Oct 14 13:19:58 instance-1 accounts-from-metadata: WARNING Could not update /home/ishener/.ssh/authorized_keys due to [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/'] 
Oct 14 13:20:01 instance-1 accounts-from-metadata: WARNING Could not update /home/ishener_zaph/.ssh/authorized_keys due to [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/'] 
Oct 14 13:20:01 instance-1 accounts-from-metadata: WARNING Could not update /home/rsa-key-20150806/.ssh/authorized_keys due to [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/'] 
Oct 14 13:20:01 instance-1 accounts-from-metadata: WARNING Could not update /home/ishener/.ssh/authorized_keys due to [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/'] 
Oct 14 13:20:02 instance-1 sshd[2929]: Connection closed by 173.194.92.51 [preauth] 
Oct 14 13:20:03 instance-1 sshd[2946]: Connection closed by 173.194.92.50 [preauth] 
Oct 14 13:20:06 instance-1 sshd[2948]: Connection closed by 173.194.92.49 [preauth] 
Oct 14 13:20:09 instance-1 sshd[2950]: Connection closed by 173.194.92.51 [preauth] 
Oct 14 13:20:13 instance-1 sshd[2952]: Connection closed by 173.194.92.50 [preauth] 
Oct 14 13:20:25 instance-1 sshd[2955]: Connection closed by 173.194.92.49 [preauth] 
Oct 14 13:20:36 instance-1 sshd[2957]: Connection closed by 173.194.92.52 [preauth] 
Oct 14 13:20:55 instance-1 sshd[2959]: Connection closed by 173.194.92.52 [preauth] 
Oct 14 13:21:01 instance-1 accounts-from-metadata: WARNING Could not update /home/ishener_zaph/.ssh/authorized_keys due to [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/'] 
Oct 14 13:21:01 instance-1 accounts-from-metadata: WARNING Could not update /home/rsa-key-20150806/.ssh/authorized_keys due to [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/'] 
Oct 14 13:21:01 instance-1 accounts-from-metadata: WARNING Could not update /home/ishener/.ssh/authorized_keys due to [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/'] 
Oct 14 13:21:34 instance-1 sshd[2977]: Connection closed by 173.194.92.51 [preauth] 
Oct 14 13:23:01 instance-1 accounts-from-metadata: WARNING Could not update /home/rsa-key-20150806/.ssh/authorized_keys due to [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/'] 
Oct 14 13:23:01 instance-1 accounts-from-metadata: WARNING Could not update /home/ishener_zaph/.ssh/authorized_keys due to [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/'] 
Oct 14 13:23:01 instance-1 accounts-from-metadata: WARNING Could not update /home/ishener/.ssh/authorized_keys due to [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/'] 
+0

tempo di collegare il monitor .. – ergonaut

+0

@ergonaut mi dispiace, ma cosa significa? –

+0

puoi fare approssimativamente quanto segue: fermare l'istanza, montare il disco su un altro server, pulirlo, smontarlo qui e rimontare qui, avviare il server? Nel caso in cui si tratti di un disco di rete e lo si può fare nel motore di calcolo – zapl

risposta

12

sono possibili diverse opzioni per risolvere questo problema:

  1. Check if your operating system supports automatic resizing: Se è così, utilizzando la console cloud è possibile modificare disco di root del VM e aumentare la sua dimensione. L'istanza della macchina virtuale può ridimensionare automaticamente la partizione per riconoscere lo spazio aggiuntivo dopo il riavvio dell'istanza.

  2. Utilizzare Interactive Serial Console feature per accedere alla macchina virtuale e pulire il disco della VM o copiarli in un'altra memoria, se necessario in seguito.

  3. Se si conoscono i dati che si desidera eliminare, è possibile configurare un startup script per rimuovere i file e riavviare la VM per eseguire lo script (ad esempio rm/tmp/*).

  4. È possibile scollegare il disco persistente e collegare questo disco a un'altra macchina come disco aggiuntivo. Sulla macchina temporanea, puoi montarla e pulire i tuoi dati o copiarli in un'altra memoria, se ne avessi bisogno in seguito. Infine ricrea l'istanza originale con lo stesso disco di avvio. È possibile seguire la stessa procedura descritta in questo video per aggiungere il disco a un'altra macchina virtuale Linux, ma aggiungere il disco di avvio esistente invece di creare un nuovo disco.

  5. Check if your operating system supports automatic resizing: Se sì, quindi creare un'istantanea del disco persistente, creare un nuovo disco persistente con dimensioni maggiori dallo snapshot. Infine ricrea l'istanza originale con questo disco di avvio più grande.

+1

ridimensionamento automatico non funziona, ho provato. Il 4 punto ha risolto il mio problema. –

+1

Provato 1,3 e saltato 2. Nessuno dei due ha funzionato per la mia stupida ubuntu 16.04 VM sovraccaricata. Numero 4 fino al successo. Ho creato un clone dell'immagine originale, l'ho collegato come unità secondaria a una seconda VM, l'ho usato per espandere il filesystem che era stato riempito. Fatto ciò, lo staccava e lo utilizzava come unità di avvio per una terza VM. – Finlay

Problemi correlati