Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-37814

db.fsyncLock() do not prevent writes to database on a separate filesystem

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major - P3 Major - P3
    • None
    • 3.6.8
    • Storage
    • None
    • ALL

    Description

      I' trying to develop Mongodb filesystem snapshots.

      I have 2 filesystems (XFS)

      • /mongodb (main dir)
      • /database (one database on a separate filesystem - for performace, symlinked at /mongodb/database)

       

      I tried scenario decribed at https://docs.mongodb.com/manual/tutorial/backup-with-filesystem-snapshots/:

      1) db.fsyncLock()

      2) tar /mongodb

      3) tar /database

      4) db.fsyncUnlock()

       

      All is done on a 4th node of reaplica set, that is :

       

      "arbiterOnly" : false,
      "buildIndexes" : true,
      "hidden" : true,
      "priority" : 0,
      "tags" : {},
      "slaveDelay" : NumberLong(0),
      "votes" : 1

       

      I discovered, that even after running db.fsyncLock() (and 100% ensured it is active by running db.CurrentOp() ), tar command complains about files in /database being changed at doing backup. Modification times of a complained files are a log after db.fsyncLock() was executed, so tar is right about those files changed. I also see some writes to this /database filesystem at the time tar was running (by watching dstat output)

       

      I'm I missing something here?

       

      Best regards

      Piotr Rybicki

      Attachments

        Activity

          People

            daniel.hatcher@mongodb.com Danny Hatcher (Inactive)
            merituspl Piotr Rybicki
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: