Hi, I have encountered several times that RGW bucket index got lost due to some reason while the actual Rados objects in RGW buckets.data pool exist. ie., the omap entry in RGW buckets.index got lost. This would create problems that those existing objects with bucket index lost would not show up when listing objects. I tried `radosgw-admin bucket check --bucket=<BUCKET>` but that did seems helpful. So, I was investigating and automating the procedure to reconstruct and refill the missing RGW bucket index entries. The Ceph version I am using is luminous 12.2.2.
The procedure I can think of to reconstruct the missing RGW bucket index JSON is from the Xattrs of a Rados object that carries most of the information that a RGW bucket index contains, and then inject using `radosgw-admin bi put --bucket=<BUCKET>`.
If not considering the case where bucket has ever enabled versioning, the `flags` and `versioned_epoch` should be always set to 0. Now I have some fields in the RGW bucket index JSON that I have no idea how to determine:
* ver.epoch
* instance - looks like always an empty string
* locator - looks like always an empty string
* pending_map - looks like always an empty list
eg:
{
"type": "plain",
"idx": "obj070",
"entry": {
"name": "obj070",
"instance": "",
"ver": {
"pool": 14,
"epoch": 3
},
"locator": "",
"exists": "true",
"meta": {
"category": 1,
"size": 256,
"mtime": "2019-01-22 18:58:29.760157Z",
"etag": "8f9deacb545b512ac268597d2940f656",
"owner": "sanity",
"owner_display_name": "Sanity",
"content_type": "text/plain",
"accounted_size": 256,
"user_data": ""
},
"tag": "3e7cd9f3-bfcb-49b4-9e8c-e152cb2f4ad1.44604.21912",
"flags": 0,
"pending_map": [],
"versioned_epoch": 0
}
},
Any help and guidance would be much appreciated!
- Yue
_______________________________________________ ceph-users mailing list ceph-users@xxxxxxxxxxxxxx http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com