Hi,
On 1/29/25 12:48, Robert Sander wrote:
Hi,
Am 1/29/25 um 08:27 schrieb Eugen Block:
Do you still have access to the directories to check for snapshots
(.snap directories underneath the root filesystem mount)?
There are no snapshots any more. They have all been removed before
migrating the files out of this pool.
You can use the rados object names to locate the corresponding file.
Example:
# rados -p xxx.data ls | head -n 1
10000017bc5.00005a0b
The object name is composed of the inode id of the file, and the chunk
number. So this object is the 5a0bth object of the file with inode
0x10000017bc5.
To locate the file itself you can use two different methods:
1. lookup via mds
This only works with the inode is still in the mds cache. This is not
the case for the example:
# ceph tell mds.XXX dump inode 1099511724997
2025-01-29T14:17:47.029+0100 7fde26ff5700 0 client.378901896
ms_handle_reset on v2:XXX:6800/2849638220
2025-01-29T14:17:47.057+0100 7fde26ff5700 0 client.378901902
ms_handle_reset on v2:XXX:6800/2849638220
dump inode failed, wrong inode number or the inode is not cached
If the inode would still be in the cache, you should get a json dump
containing the mds cache information including the path.
2. lookup via xattr
xattr (metadata on rados layer) is used by cephfs to maintain
backtracking links. Each file has an associated xattr called 'parent'.
Since the file itself can be composed of multiple chunk, the xattr
metadata is always stored with the first chunk:
# rados -p XXX.data listxattr 10000017bc5.00000000
layout
parent
The first chunk is the rados object with "<inode id>.00000000" name. It
is always stored in the first replicated pool (EC pool cannot store
metadata). If this object is not present anymore, you can consider the
chunk an orphan.
If the object is present, you can retrieve the "parent" metadata:
rados -p XXX.data getxattr 10000017bc5.00000000 parent
....
This will dump the contain as binary data...either use tools like
"strings" to filter out the path information, or use 'ceph-dencoder' to
decode it (not sure about the exact parameters for this).
Best regards,
Burkhard Linke
_______________________________________________
ceph-users mailing list -- ceph-users@xxxxxxx
To unsubscribe send an email to ceph-users-leave@xxxxxxx