在 Oracle RAC 生產環境中,遭遇 df -i 顯示 OCFS 掛載點 Inode 使用率 100%(IUsed=409231, IFree=349),但 df -h 顯示空間充裕(Use%=1%),且資料庫運作完全正常、歸檔日志寫入無阻礙。這看似矛盾的現象,實則是 OCFS 設計特性使然。
/u04(僅存放雙節點歸檔日志)[root@db1 /]# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/emcpowerd1 409580 409231 349 100% /u04
常規文件系統(ext3/ext4/xfs)Inode 耗盡將導致無法創建新文件,但此處業務零感知。
根據 Oracle Metalink 官方說明:
OCFS does not have the concept of inodes... the number returned by df -i is based on diskspace free. it's the number of cluster blocks in the filesystem. we dont' preallocate inodes like most filesystems do. nor do we HAVE to do that. not a bug, expected behaviour.
核心機制差異:
df -i 顯示的「Inode 數」實際等於當前可用集群塊數。隨空間釋放,該數值自動回升。df -h 磁盤容量使用率為唯一容量規劃依據。此特性體現了叢集文件系統為共享存儲優化的設計哲學——元數據隨數據動態伸縮,消除靜態 Inode 瓶頸。