Actually, it might have worked better if the PG had stayed down while running 
cephfs-data-scan, as it could only then get file structure from metadata pool 
and not touch each file/link in data pool?
This would at least properly have given the list of files in (only) the 
affected PG?

//Jesper

________________________________
Fra: Jesper Lykkegaard Karlsen <je...@mbg.au.dk>
Sendt: 19. august 2022 22:49
Til: Patrick Donnelly <pdonn...@redhat.com>
Cc: ceph-users@ceph.io <ceph-users@ceph.io>
Emne: [ceph-users] Re: Potential bug in cephfs-data-scan?


________________________________
Fra: Patrick Donnelly <pdonn...@redhat.com>
Sendt: 19. august 2022 16:16
Til: Jesper Lykkegaard Karlsen <je...@mbg.au.dk>
Cc: ceph-users@ceph.io <ceph-users@ceph.io>
Emne: Re: [ceph-users] Potential bug in cephfs-data-scan?

On Fri, Aug 19, 2022 at 5:02 AM Jesper Lykkegaard Karlsen
<je...@mbg.au.dk> wrote:
>>
> >Hi,
>>
>> I have recently been scanning the files in a PG with "cephfs-data-scan 
>> pg_files ...".

>Why?

I had an incident where a PG that went down+incomplete after some OSD crashed + 
heavy load + ongoing snap trimming.
Got it back up again with object store tool by marking complete.
Then I wanted to show possible affected files with cephfs-data-scan in the 
unfortunate PG, so I could recover potential loss from backup.


>> Although, after a long time the scan was still running and the list of files 
>> consumed 44 GB, I stopped it, as something obviously was very wrong.
>>
>> It turns out some users had symlinks that looped and even a user had a 
>> symlink to "/".

>Symlinks are not stored in the data pool. This should be irrelevant.

Okay, it may be a case of me "holding it wrong", but I do see "cephfs-data-scan 
pg_files" trying to follow any global or local symlink in the file structure, 
which leads to many more files registrered than possibly could be in that PG 
and even endless loops in some cases.

If the symlinks are not stored in data pool, how can cephfs-data-scan then 
follow the link?
And how do I get "cephfs-data-scan" to just show the symlinks as links and not 
follow them up or down in directory structure?

Best,
Jesper


_______________________________________________
ceph-users mailing list -- ceph-users@ceph.io
To unsubscribe send an email to ceph-users-le...@ceph.io
_______________________________________________
ceph-users mailing list -- ceph-users@ceph.io
To unsubscribe send an email to ceph-users-le...@ceph.io

Reply via email to