Re: cephfs: [ERR] loaded dup inode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Something to that effect is at least my experience on mimic. The example below doesn't show the effect. I don't know how files/directories are moved to stray, but its not a 1:1 correspondence. Otherwise every file system would collapse all the time. Our user deleted significantly more files than the 200000 increase of stray count I showed in my e-mail. As far as I can tell, there is a tree hierarchy under stray. My stray objects contained a lot more files than just the stray count.

If you can tell me how deleted objects show up in stray while increasing the stray count I could make a test that reproduces the behaviour. Its not as simple as deleting a bunch of files in a flat dir as this example shows:

# mkdir a
# cd a
# for i in {1..10000}; do touch $i; done # I used 10000, took long enough
# ls
1      1344  1691  2037  2384  2730  3077  3423  3770  4116  4463  481 ...
# ls .snap/test
1      1344  1691  2037  2384  2730  3077  3423  3770  4116  4463  481 ...
# ssh ceph-08 'ceph daemon mds.$(hostname -s) perf dump | jq .mds_cache.num_strays'
238875
# rm -f *
# ssh ceph-08 'ceph daemon mds.$(hostname -s) perf dump | jq .mds_cache.num_strays'
238872
# Hmm, this is even smaller as before, so how does stray actually work?
# ls
# ls .snap/test
1      1344  1691  2037  2384  2730  3077  3423  3770  4116  4463  481 ...
# rmdir .snap/test
# ssh ceph-08 'ceph daemon mds.$(hostname -s) perf dump | jq .mds_cache.num_strays'
238885

So, if you can give me an example that produces a stray count increase under the *same* root, I'm pretty sure the test will reproduce what I observed.

Best regards,
=================
Frank Schilder
AIT Risø Campus
Bygning 109, rum S14

________________________________________
From: Dan van der Ster <dvanders@xxxxxxxxx>
Sent: 08 February 2022 16:28:44
To: Frank Schilder
Cc: Patrick Donnelly; ceph-users
Subject: Re:  Re: cephfs: [ERR] loaded dup inode

On Tue, Feb 8, 2022 at 1:04 PM Frank Schilder <frans@xxxxxx> wrote:
> The reason for this seemingly strange behaviour was an old static snapshot taken in an entirely different directory. Apparently, ceph fs snapshots are not local to an FS directory sub-tree but always global on the entire FS despite the fact that you can only access the sub-tree in the snapshot, which easily leads to the wrong conclusion that only data below the directory is in the snapshot. As a consequence, the static snapshot was accumulating the garbage from the rotating snapshots even though these sub-trees were completely disjoint.

So are you saying that if I do this I'll have 1M files in stray?

mkdir /a
cd /a
for i in {1..1000000}; do touch $i; done  # create 1M files in /a
cd ..
mkdir /b
mkdir /b/.snap/testsnap  # create a snap in the empty dir /b
rm -rf /a/


Cheers, Dan
_______________________________________________
ceph-users mailing list -- ceph-users@xxxxxxx
To unsubscribe send an email to ceph-users-leave@xxxxxxx




[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux