[SERVER-13143] Ignore db names that begin with a dot, when directory-per-db is active Created: 11/Mar/14 Updated: 06/Dec/22 Resolved: 05/Oct/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | MMAPv1, Storage |
| Affects Version/s: | 2.4.9 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | nifan | Assignee: | Backlog - Storage Execution Team |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Assigned Teams: |
Storage Execution
|
||||
| Operating System: | ALL | ||||
| Steps To Reproduce: | Install mongodb on xfs filesystem and run xfs_fsr. |
||||
| Participants: | |||||
| Description |
|
When using mongodb directly on XFS filesystem it automatically shuts down when the XFS defragmentation tool 'xfs_fsr' runs. This creates a .fsr directory on the mounted filesystem, which causes MongoDB to exit. The essence of this problem is the same for all other dot directories inside the mongodb map. One can discuss in length about if it's "proper" to do it this or the other way. But in the end we all know that directories like "lost+found", ".fsr" and really any dot directory in the root of the filesystem can exist and have nothing to do with MongoDB. (Also consider .snapshots etc) So it makes much more sense it MongoDB would ignore it. A user tunable parameter that allows to exclude additional file paths would be helpful as well. This should be a easy-picking patch for people known with MongoDB and very safe to implement. Very little overhead and high usefulness factor. |
| Comments |
| Comment by Sara Williamson [ 05/Oct/18 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This went away because only MMAP is affected by this issue, and it has been removed. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by David Robillard [ 17/Apr/14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I agree, the lost+found directory should really be ignored by MongoD. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andy Schwerin [ 14/Mar/14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Database names cannot contain dot, anyways, so this should be a safe change. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by nifan [ 14/Mar/14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yes, sorry I forgot to mention that. I am using directory-per-db. Could a solution be to do that via a feature toggle ? Are database names starting with a dot not already invalid ?
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Eric Milkie [ 14/Mar/14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I believe this problem only affects you if you are using directory-per-db. Is that correct? Currently, mongod treats every subdirectory found in the dbpath as a database, when you start it with --directoryperdb. A solution for this ticket could be that mongod ignores database names that begin with a dot, but this would be backwards breaking for those users who already have such database names. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by nifan [ 13/Mar/14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Pasette (Inactive) [ 12/Mar/14 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
can you post the log file of the mongod which shutdown. the existence of the .fsr file in mongod root dir should not cause it to shut down on its own. |