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

Invalid cross-device link when repairDatabase() is called with --repairpath using a path on another file system

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • 1.5.5
    • Affects Version/s: 1.4.3
    • Component/s: Tools
    • Labels:
      None
    • Environment:
      Linux 2.6.21.7-2.fc8xen #1 SMP Fri Feb 15 12:34:28 EST 2008 x86_64 x86_64 x86_64 GNU/Linux
      /mongo/master on 8x70GB EBS volumes
      Database size ~400GB
    • Linux

      1. /opt/mongo/bin/mongod --dbpath=/mongo/master --repairpath=/mnt/mongo --repair
        Fri Jun 11 12:52:58 Mongo DB : starting : pid = 23801 port = 27017 dbpath = /mongo/master master = 0 slave = 0 64-bit
        Fri Jun 11 12:52:58 ****
        Fri Jun 11 12:52:58 ****
        Fri Jun 11 12:52:58 need to upgrade database local with pdfile version 4.5, new version: 4.5
        Fri Jun 11 12:52:58 starting upgrade
        Fri Jun 11 12:52:58 local repairDatabase local
        Fri Jun 11 12:52:58 allocating new datafile /mnt/mongo/$tmp_repairDatabase_0/local.ns, filling with zeroes...
        Fri Jun 11 12:52:58 done allocating datafile /mnt/mongo/$tmp_repairDatabase_0/local.ns, size: 16MB, took 0.011 secs
        Fri Jun 11 12:52:58 allocating new datafile /mnt/mongo/$tmp_repairDatabase_0/local.0, filling with zeroes...
        Fri Jun 11 12:52:58 done allocating datafile /mnt/mongo/$tmp_repairDatabase_0/local.0, size: 64MB, took 0.044 secs
        Fri Jun 11 12:52:58 allocating new datafile /mnt/mongo/$tmp_repairDatabase_0/local.1, filling with zeroes...
        Fri Jun 11 12:52:58 building new index on { _id: 1 }

        for local.sources
        Fri Jun 11 12:52:58 Buildindex local.sources idxNo:0

        Unknown macro: { name}

        Fri Jun 11 12:52:58 done for 0 records 0.028secs
        Fri Jun 11 12:52:58 building new index on

        { _id: 1 }

        for local.pair.sync
        Fri Jun 11 12:52:58 Buildindex local.pair.sync idxNo:0

        Unknown macro: { name}

        Fri Jun 11 12:52:58 done allocating datafile /mnt/mongo/$tmp_repairDatabase_0/local.1, size: 128MB, took 0.102 secs
        Fri Jun 11 12:52:58 done for 0 records 0.012secs
        Fri Jun 11 12:52:58 caught boost exception: boost::filesystem::rename: Invalid cross-device link: "/mnt/mongo/$tmp_repairDatabase_0/local.ns", "/mongo/master/local.ns"
        Fri Jun 11 12:52:58 Assertion failure false db/pdfile.cpp 1769
        0x4f6986 0x4ff094 0x602c94 0x602de8 0x603558 0x6acced 0x6ae401 0x6aeeed 0x6af715 0x6b51d2 0x35cd01e32a 0x4a17d9
        /opt/mongo/bin/mongod(_ZN5mongo12sayDbContextEPKc+0xe6) [0x4f6986]
        /opt/mongo/bin/mongod(_ZN5mongo8assertedEPKcS1_j+0x154) [0x4ff094]
        /opt/mongo/bin/mongod(_ZN5mongo19_applyOpToDataFilesEPKcRNS_6FileOpEbRKSs+0xaf4) [0x602c94]
        /opt/mongo/bin/mongod(ZN5mongo21_replaceWithRecoveredEPKcS1+0x98) [0x602de8]
        /opt/mongo/bin/mongod(_ZN5mongo14repairDatabaseEPKcRSsbb+0x648) [0x603558]
        /opt/mongo/bin/mongod(_ZN5mongo11doDBUpgradeERKSsSsPNS_9MDFHeaderE+0x4d) [0x6acced]
        /opt/mongo/bin/mongod(_ZN5mongo15repairDatabasesEv+0x2b1) [0x6ae401]
        /opt/mongo/bin/mongod(_ZN5mongo14_initAndListenEiPKc+0x44d) [0x6aeeed]
        /opt/mongo/bin/mongod(_ZN5mongo13initAndListenEiPKc+0x25) [0x6af715]
        /opt/mongo/bin/mongod(main+0x5172) [0x6b51d2]
        /lib64/libc.so.6(__libc_start_main+0xfa) [0x35cd01e32a]
        /opt/mongo/bin/mongod(_ZNSt15basic_streambufIcSt11char_traitsIcEE6xsputnEPKcl+0x69) [0x4a17d9]
        Fri Jun 11 12:52:58 exception in initAndListen std::exception: assertion db/pdfile.cpp:1769, terminating
        Fri Jun 11 12:52:58 dbexit:
        Fri Jun 11 12:52:58 shutdown: going to close listening sockets...
        Fri Jun 11 12:52:58 shutdown: going to flush oplog...
        Fri Jun 11 12:52:58 shutdown: going to close sockets...
        Fri Jun 11 12:52:58 shutdown: waiting for fs preallocator...
        Fri Jun 11 12:52:58 shutdown: closing all files...
        Fri Jun 11 12:52:58 closeAllFiles() finished
        Fri Jun 11 12:52:58 shutdown: removing fs lock...
        Fri Jun 11 12:52:58 dbexit: really exiting now

            Assignee:
            aaron Aaron Staple
            Reporter:
            erwan Erwan Arzur
            Votes:
            2 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: