事象・問題
AWS EC2のUbuntuでviコマンド実行したらコンソール上に
E325: ATTENTION Found a swap file by the name "/etc/gitlab/.gitlab.rb.swp" owned by: root dated: Fri Jun 16 08:10:15 2023 [cannot be read] While opening file "/etc/gitlab/gitlab.rb" dated: Thu Jun 15 16:07:59 2023 (1) Another program may be editing the same file. If this is the case, be careful not to end up with two different instances of the same file when making changes. Quit, or continue with caution. (2) An edit session for this file crashed. If this is the case, use ":recover" or "vim -r /etc/gitlab/gitlab.rb" to recover the changes (see ":help recovery"). If you did this already, delete the swap file "/etc/gitlab/.gitlab.rb.swp" to avoid this message. Swap file "/etc/gitlab/.gitlab.rb.swp" already exists! [O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort:
のエラー内容が表示されました。
ただ、このエラーは以前も対応したことがありスワップファイルの削除で解消できました。
再度viコマンドを実行しても上記のエラーは出なくなりましたが、
ファイルを編集して:wq
で変更を保存しようとしたところ、
コンソールの下部に
"/etc/gitlab/gitlab.rb" E514: write error (file system full?) Press ENTER or type command to continue
が表示されてうまく変更を保存できませんでした。(このときは:q!
で強制終了した)
いろいろネットで調べて、ファイルシステムがいっぱいになったことによるエラーであることはわかりましたが、
どのファイルを消せばいいかわからなかったので対応方法を知りたいです。
よろしくお願いします。
気になること
スワップファイル削除後に再度viコマンドを実行時に、E325: ATTENTION のエラーは出ないけど
コンソールの下部に一瞬だけE297: Write error in swap file
と表示されます。(そのあとすぐエディタが起動する)
補足
マシン内にはGitLabのオールインワンパッケージをインストールしており、
意図的にマシン内でファイルを増やすコマンドは実行していないし、その様なプログラムも作ってはいません。
私が気づかない間に何かしらの原因でどこかでディスクが圧迫されていた様です。
そのため、どのファイルが不要のファイルかが分かりません。
dfコマンド実行結果

回答2件
あなたの回答
tips
プレビュー