Re: Why does Ceph probe for end of MDS log?

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

 



On Thu, Aug 23, 2018 at 7:47 PM Bryan Henderson <bryanh@xxxxxxxxxxxxxxxx> wrote:
I've been reading MDS log code, and I have a question: why does it "probe for
the end of the log" after reading the log header when starting up?

As I understand it, the log header says the log had been written up to
Location X ("write_pos") the last time the log was committed, but the
end-probe code determines whether there is stuff physically in the log (based
on Rados object size) beyond X and if so, ignores the header and uses the
physical end of the log instead.

Wouldn't stuff after where the header says writing left off be unreliable?
Maybe incompletely or incorrectly written?

I'm looking at this because I have an MDS that will not start because there
is junk (zeroes) in that space after where the log header says the log ends,
so replay of the log fails there.

No, the log end in the header is a hint. This is because we can’t atomically wrote to two objects (the header and the last log object) at the same time, so we do atomic appends to the end of the log and flush out the journal header lazily.

I believe zeroes at the end of the log are deliberate, as we “pre-zero” to avoid some rare edge cases when MDSes restart and the log might have had writes to later objects complete successfully while earlier ones were blocked. If your MDS is not restarting it is probably because of the non-zero data.
-Greg 




--
Bryan Henderson                                   San Jose, California
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

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


  Powered by Linux