[SERVER-6924] In RunTime model, when disk full or disk damaged MongoD crashes Created: 04/Sep/12 Updated: 15/Jan/15 Resolved: 04/Sep/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | 2.0.6 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Xuguang zhan | Assignee: | Eric Milkie |
| Resolution: | Done | Votes: | 0 |
| Labels: | crash | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Mac OS X Volume (Lion - 10.7.4) on a Mac OS Extended (Journaled). |
||
| Attachments: |
|
||||||||||||||||
| Issue Links: |
|
||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
Test1 the restart when can't Write data in Disk Step1. Write the hook.so for Write and Export to the system So the question is what's the exception code return when insert data into Disk failure and application call ,and in the runTime model,insert data failure ,what's result on MongoD Test2 After started mongod and inserting a document to allocate the space, I filled the volume with "cat /dev/zero > /Volume/test/bigfile". Here is the stack trace: Mon Sep 3 17:34:42 [journal] LogFile::synchronousAppend failed with 8192 bytes unwritten out of 8192 bytes; b=0x111000000 errno:28 No space left on device ***aborting after fassert() failure Mon Sep 3 17:34:42 Got signal: 6 (Abort trap: 6). Mon Sep 3 17:34:42 Backtrace: db.getLastError(WriteConcern.FSYNC_SAFE) |
| Comments |
| Comment by Xuguang zhan [ 05/Sep/12 ] |
|
Thanks Team, I get the info, and see you have update them to the wiki http://www.mongodb.org/display/DOCS/Excessive+Disk+Space#ExcessiveDiskSpace-Runningoutofdiskspace. but no matter what I think Crush it is not allowed, may be you should think you Design, make it more perfect |
| Comment by Gianfranco Palumbo [ 04/Sep/12 ] |
|
Perfect got it now. Thanks Eric |
| Comment by Eric Milkie [ 04/Sep/12 ] |
|
If you separate the data from the journal (see http://www.mongodb.org/display/DOCS/Journaling#Journaling-ThejournalSubdirectory ), then if you fill up the data disk, the server should stay up. You cannot fill up the journal disk, however, or the server will abort. |
| Comment by Eric Milkie [ 04/Sep/12 ] |
|
Yes, it's because you are using journaling (turned on by default). The journal gets written before the data files. I changed the documentation on the Wiki to be more helpful. |
| Comment by Gianfranco Palumbo [ 04/Sep/12 ] |
|
Actually I did the Test2 on my machine yesterday
|
| Comment by Eric Milkie [ 04/Sep/12 ] |
|
That is correct; the server will keep running if your data disk fills up. The examples you provided were if the disk was already full when you started the server (lock file can't be written), and when your journaling disk fills up. The server cannot stay up if you fill up the disk where your journal lives. I will add something to the Wiki explaining this. |
| Comment by Eric Milkie [ 04/Sep/12 ] |
|
The behavior you describe is by design. If the disk is too full to write the server lock file or the journal, the server must exit. |