CephFS: 确定文件位置

shan

CephFS determine a file location

快速技巧,用于确定存储在 CephFS 上的文件的位置。

为此,我们只需要该文件的 inode 号码。为此,我们将使用 stat,就像这样

$ stat -c %i /mnt/blah
1099511627776

现在我们得到 inode 的十六进制格式

$ printf '%x\n' 1099511627776
10000000000

最终,我们在 OSD 目录中搜索

$ sudo find /var/lib/ceph/osd -name 10000000000*
/var/lib/ceph/osd/ceph-3/current/1.30_head/10000000000.00000000__head_F0B56F30__1

完成了!就这些!