inode 和唯讀綁定掛載

inode 和唯讀綁定掛載

我正在使用xfs檔案系統,談論 inode 主題有一個問題:RO綁定掛載點會消耗 inode 嗎?

資訊嚴格來說是一樣的;因為綁定安裝指向同一檔案系統中的目錄。

可以df -i看到索引節點的消耗情況。

答案1

綁定目錄中的檔案具有與原始目錄完全相同的 inode。所以不,它不消耗任何東西。

但你可以自己進行測試:

root@storiq-nas10:/mnt/raid# df -i .
Sys. de fichiers         In?uds IUtil.     ILibre IUti% Monté sur
/dev/mapper/vg0-raid 7497565248    107 7497565141    1% /mnt/raid
root@storiq-nas10:/mnt/raid# mount -B test/ bind/
root@storiq-nas10:/mnt/raid# df -i .
Sys. de fichiers         In?uds IUtil.     ILibre IUti% Monté sur
/dev/mapper/vg0-raid 7497565248    107 7497565141    1% /mnt/raid
root@storiq-nas10:/mnt/raid# cd bind/dir/hello/
root@storiq-nas10:/mnt/raid/bind/dir/hello# ls -i 34.txt 
4294967458 34.txt
root@storiq-nas10:/mnt/raid/bind/dir/hello# cd /mnt/raid/test/dir/hello/
root@storiq-nas10:/mnt/raid/test/dir/hello# ls -i 34.txt 
4294967458 34.txt

相關內容