Linux inode滿導致建立檔案報磁碟空間不足

來源:互聯網
上載者:User

標籤:linux inode

客戶報不能掛載儲存,系統異常。登陸系統,嘗試手動mount分區,報失敗。進入掛載點,嘗試寫入一個檔案,報磁碟空間不足,首先懷疑是系統磁碟空間滿:

$ dfFilesystem           1K-blocks      Used Available Use% Mounted on/dev/xvda             33030016  10407780  22622236  32% /tmpfs                   368748         0    368748   0% /lib/init/rwvarrun                  368748        56    368692   1% /var/runvarlock                 368748         0    368748   0% /var/lockudev                    368748       108    368640   1% /devtmpfs                   368748         0    368748   0% /dev/shm

發現沒有分區滿的情況,查看inode情況:

$ df -iFilesystem            Inodes   IUsed   IFree IUse% Mounted on/dev/xvda            2080768 2080768       0  100% /tmpfs                  92187       3   92184    1% /lib/init/rwvarrun                 92187      38   92149    1% /var/runvarlock                92187       4   92183    1% /var/lockudev                   92187    4404   87783    5% /devtmpfs                  92187       1   92186    1% /dev/shm

發現根目錄下的inode已佔用100%。所以建立目錄或者檔案,報磁碟空間不足。


查看哪些目錄下的inode使用異常:


  $ for i in /*; do echo $i; find $i |wc -l; done


找到inode使用異常的目錄,並刪除該目錄下不需要再使用的檔案,問題解決。



聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.