[SERVER-9271] Failed to allocate new file on a database over mounted folder on Windows Created: 06/Apr/13 Updated: 16/Nov/21 Resolved: 03/Nov/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | 2.4.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | David Verdejo | Assignee: | Daniel Gottlieb (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | allocate, error, folder, mounted, space, windows | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Fri Apr 05 18:44:12.308 [initandlisten] db version v2.4.1 |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | Windows | ||||||||
| Steps To Reproduce: | 1) Create a database |
||||||||
| Sprint: | Storage 2016-11-21 | ||||||||
| Participants: | |||||||||
| Description |
|
We create a database over mounted folder. When the database needs to allocate more space, there is a error message on the log file:
After that, the replica set fails:
Yesterday, I opened a ticket ( |
| Comments |
| Comment by Daniel Gottlieb (Inactive) [ 03/Nov/16 ] |
|
MongoDB 3.2 upgraded to Boost 1.56. I've confirmed the upgrade fixes this problem. |
| Comment by Ramon Fernandez Marina [ 23/Jan/15 ] |
|
Thanks for the detailed information ogurets, we're adding this ticket to the 3.1 planning round. |
| Comment by Daniel Pasette (Inactive) [ 26/Dec/14 ] |
|
Thanks for the detailed repro and explanation. We'll take a look soon. |
| Comment by Ogurets Johnson [ 24/Dec/14 ] |
|
Hi! I was able to reproduce this:
Inside c:\databases\mongo I've created a junction named "junction" (this is a major point of this issue!) pointing to the original place where database files are stored. And then, when database fills up a little (this is a second important condition), bam!:
Short explanation: boost::filesystem::is_directory function doesn't recognize Windows junctions as directories and returns false (this issue even has a ticket - https://svn.boost.org/trac/boost/ticket/9016). The cure would be not to use is_directory at all - try to create a file, catch an error. Older Mongo versions seem to do exactly that, but this additional check was added for some reason, so I cannot just patch it out before consulting a person who placed it there. |
| Comment by Stennie Steneker (Inactive) [ 19/Mar/14 ] |
|
Hi David, Please be advised I'm now closing this issue as we have been unable to reproduce the reported problem. If you do have any further information that would help us reproduce this issue (as per the last questions from Luke), please let us know. Thanks, |
| Comment by Luke Lovett [ 06/Nov/13 ] |
|
Hi David, I tried to replicate your setup & steps on our end. I'm using Windows 2008 Server R2 with SP1. This is what I did: 1. Started a replica set with a dbpath located somewhere on the C drive and inserted some data In the end, everything worked fine for me with MongoDB 2.4.1. Are you still experiencing this problem? If so, can I ask how you created your disk image and how you mounted it? Are you using NTFS as your file system or something else? What flags are you using when you run mongod? Thanks, |
| Comment by David Verdejo [ 11/Apr/13 ] |
|
I tried to change from mounted folder to symbolic lync but this fails too. I downgraded to version 2.2.4 and everything works fine. |
| Comment by David Verdejo [ 08/Apr/13 ] |
|
Folder structure E:\mongodb_rscacheagg\data\db--> DBPATH Content Volume in drive E has no label. Directory of E:\mongodb_rscacheagg\data\db 07/04/2013 09:32 <DIR> . ] --> MOUNTED FOLDER Directory of E:\mongodb_rscacheagg\data\db\admin 06/04/2013 17:42 <DIR> . Directory of E:\mongodb_rscacheagg\data\db\cacheagg 06/04/2013 17:42 67.108.864 cacheagg.0 Directory of E:\mongodb_rscacheagg\data\db\cacheagg_tmp 07/04/2013 07:13 <DIR> . Directory of E:\mongodb_rscacheagg\data\db\journal 07/04/2013 22:26 <DIR> . Directory of E:\mongodb_rscacheagg\data\db\local 06/04/2013 17:29 <DIR> . Directory of E:\mongodb_rscacheagg\data\db\local_tmp 06/04/2013 17:29 <DIR> . Directory of E:\mongodb_rscacheagg\data\db_tmp 07/04/2013 09:59 <DIR> . PERMISSIONS
C:\Users\Administrator>ICACLS e:\mongodb_rscacheagg\data\db
C:\Users\Administrator>ICACLS e:\mongodb_rscacheagg\data\db\cacheagg |
| Comment by Eliot Horowitz (Inactive) [ 07/Apr/13 ] |
|
What kind of mount is this? |
| Comment by David Verdejo [ 07/Apr/13 ] |
|
No, the mounted folder has 100 GB of free space. The problema is with allocation of free space. I made a test: I downgraded to version 2.2.4 and everything works fine. |
| Comment by Eliot Horowitz (Inactive) [ 07/Apr/13 ] |
|
Note: { "_id" : 3, "name" : "log-mng21:27017", "health" : 1, "state" : 2, "stateStr" : "SECONDARY", "uptime" : 80796, "optime" : Timestamp(1365260435000, 113), "optimeDate" : ISODate("2013-04-06T15:00:35Z"), "lastHeartbeat" : ISODate("2013-04-06T15:13:31Z"), "pingMs" : 0, "errmsg" : "syncThread: 14031 Can't take a write lock while out of disk space" }Looks like you are out of disk space? |