Avamar:inode 數量導致裝置上沒有剩餘空間錯誤

Summary: 本文針對 /var 檔案系統報告的問題提供解決方案,儘管 df 命令顯示可用的空間。

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Symptoms

執行 logrotate 錯誤會產生錯誤,指出沒有空格:

logrotate -f /etc/logrotate.conf
error: error creating output file /var/log/firewall: No space left on device 
error: error creating output file /var/log/mail.err: No space left on device 
error: error creating output file /var/log/wtmp-nnnnnnnn: No space left on device 
 

可使用 df 命令顯示可用空間:

df -h
Filesystem     Size  Used  Avail  Use%  Mounted on 
/dev/sda5      7.9G  4.2G   3.4G   56%  / 
devtmpfs       5.8G  248K   5.8G    1%  /dev 
tmpfs          5.8G     0   5.8G    0%  /dev/shm 
/dev/sda1      114M   53M    56M   49%  /boot 
/dev/sda3      256G  19G    237G    8%  /data01 
/dev/sda7      1.5G  524M   899M   37%  /var 
 

嘗試在 /var 檔案系統上建立檔案也會導致空格錯誤:

touch /var/log/test
touch: cannot touch '/var/log/test': No space left on device

Cause

檔案系統已用完 inodes

使用「-i」鍵重新執行 df 命令可確認此問題:

df -i 
Filesystem      Inodes   IUsed     IFree  IUse%  Mounted on 
/dev/sda5       524288  106337    417951    21%  / 
devtmpfs             0      0          0     -   /dev 
tmpfs          1513794      1    1513793     1%  /dev/shm 
/dev/sda1        30120     49      30071     1%  /boot 
/dev/sda3    267691072   5438  267685634     1%  /data01 
/dev/sda7        97536  97536          0   100%  /var


這通常是由碎片化的文件系統、大量非常小的檔、臨時檔或大型郵件佇列引起的。

Resolution

注意:這些命令必須以 root 使用者身分執行。
 

您可以執行 du 命令,查看是什麼佔用了空間:

du -x -h /var --max-depth=1 
 

範例輸出顯示 /var/spool 目錄會佔用 /var 中的大部分空間:

8.0K    /var/state 
4.0K    /var/X11R6 
4.0K    /var/crash 
45M     /var/lib 
4.0K    /var/named 
4.0K    /var/opt 
12K     /var/yp 
380M    /var/spool 
132K    /var/run 
4.0M    /var/cache 
25M     /var/adm 
16K     /var/lost+found 
8.0K    /var/tmp 
28K     /var/lock 
37M     /var/log 
56K     /var/games 
489M    /var
 

然後,可以在目錄樹的更下游再次運行 du 命令:

du -x -h /var/spool --max-depth=1
 

需要根據佔用空間的內容進行進一步調查。

如需協助,請向 Dell Technologies Avamar 支援小組 開立服務要求 (SR)。

 

在此範例中: 問題是許多非常小的檔。

        • 最大的目錄是 /var/spool/postfix/maildrop,包含數千個小檔:
ls -l /var/spool/postfix/maildrop| wc -l 
96559
 
        • 每個檔案都包含以下內容:
admin : /etc/sudoers is mode 0777, should be 0440
 
        • sudoers 檔案的權限和擁有權已更新:
chmod 0440 /etc sudoers
chown root:root /etc/sudoers
 
        • 已移除 /var/spool/postfix/maildrop 目錄中的檔案,且問題已解決。

Affected Products

Avamar

Products

Avamar
Article Properties
Article Number: 000165842
Article Type: Solution
Last Modified: 04 Sept 2025
Version:  6
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.