can't map area of size 0 file

402 views
Skip to first unread message

ro...@reintent.com

unread,
Dec 6, 2014, 10:19:35 PM12/6/14
to mongod...@googlegroups.com
Hi.

I'm having some trouble starting up my database. I shut it down properly using the shutdown command from the shell but when I start it up it's giving me this: "DBException 10446: mmap: can't map area of size 0 file: /data/test.3". There are 20 something data files for the test database. I'm not sure how/why that data file is size 0 (verified with ls).

I tried repairing and got the same error.

Any suggestions as to what I can do? Is it just a matter of removing that data file or would what cause more problems?

Thanks.

Asya Kamsky

unread,
Dec 7, 2014, 3:32:03 AM12/7/14
to mongod...@googlegroups.com
Unfortunately removing the file is unlikely to make things better - frankly, given there is nothing in it, it probably won't make things worse.   I don't suppose this mongod was part of a replica set?
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/eef16f0e-3fa4-4572-99b4-abbc10c8a0d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ronak Patel

unread,
Dec 7, 2014, 10:07:03 AM12/7/14
to mongod...@googlegroups.com
Asya, it's not part of a replica set. Just a single node db (v2.6.4).

I moved test.3 out with no luck:
2014-12-07T08:39:20.790-0600 [initandlisten] test Assertion failure n >= 0 && n < static_cast<int>(_files.size()) src/mongo/db/storage/extent_manager.cpp 109


On Sunday, December 7, 2014 2:32:03 AM UTC-6, Asya Kamsky wrote:
Unfortunately removing the file is unlikely to make things better - frankly, given there is nothing in it, it probably won't make things worse.   I don't suppose this mongod was part of a replica set?

On Saturday, December 6, 2014, <ro...@reintent.com> wrote:
Hi.

I'm having some trouble starting up my database. I shut it down properly using the shutdown command from the shell but when I start it up it's giving me this: "DBException 10446: mmap: can't map area of size 0 file: /data/test.3". There are 20 something data files for the test database. I'm not sure how/why that data file is size 0 (verified with ls).

I tried repairing and got the same error.

Any suggestions as to what I can do? Is it just a matter of removing that data file or would what cause more problems?

Thanks.

--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe@googlegroups.com.

Asya Kamsky

unread,
Dec 7, 2014, 3:58:50 PM12/7/14
to mongod...@googlegroups.com
Do you happen to have a recent backup of the files?

If there is no backup and the data is really important, it might be possible to recover some of it via mongodump --dbpath /path/to/datafiles --repair.

You might be able to get the DBs and collections that way that are in other (unharmed) data files...   

Asya

To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.

To post to this group, send email to mongod...@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.

Ronak Patel

unread,
Dec 8, 2014, 11:58:19 AM12/8/14
to mongod...@googlegroups.com
Unfortunately no.

I'll give mongodump a try. Thanks.

Do you know how it would get into this state?

Asya Kamsky

unread,
Dec 8, 2014, 12:22:15 PM12/8/14
to mongodb-user
I imagine that it would have had to be some drastic file system error/failure - once a file is allocated, mongod never truncates it to 0 as far as I know (even if everything in it is deleted, the file just remains part of the free list to be available when new data is inserted).

Maybe check various dmesg/system logs/file system logs?

Asya


To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.

To post to this group, send email to mongod...@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
Reply all
Reply to author
Forward
0 new messages