首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Ubuntu核恐慌后MongoDB数据消失

Ubuntu核恐慌后MongoDB数据消失
EN

Stack Overflow用户
提问于 2019-07-25 16:26:19
回答 1查看 89关注 0票数 0

DB在2019年-07-25T06:36:53.999+0900之后消失。下面是日志文件。我只是安装了一些ubuntu软件包,但是有一些问题,比如/boot文件夹磁盘空间问题,内核中断了,我试图用恢复模式启动,然后成功。但是在引导之后,我的mongodb数据看起来消失了--如果我访问我的网站,应该有一些文章,但我找不到这篇文章--也许它消失了。

我所做的是..。当访问ubuntu恢复模式时,在grup选择窗口中,我只选择了一次“清除”,它看起来就像excuting apt-get autoremove。当我意识到数据丢失后,我输入了一次mongod --repair。我只做了这两件事。啊,我三天前更新了ubutu版本。但那次数据库没有问题。

我的DB在哪?你能猜到吗?我没有备份,所以我很困惑。

代码语言:javascript
复制
2019-07-25T06:36:53.902+0900 I NETWORK  [listener] connection accepted from 127.0.0.1:35460 #1938 (9 connections now open)
2019-07-25T06:36:53.930+0900 I NETWORK  [listener] connection accepted from 127.0.0.1:35461 #1939 (10 connections now open)
2019-07-25T06:36:53.950+0900 I NETWORK  [listener] connection accepted from 127.0.0.1:35462 #1940 (11 connections now open)
2019-07-25T06:36:53.952+0900 I NETWORK  [listener] connection accepted from 127.0.0.1:35463 #1941 (12 connections now open)
2019-07-25T06:36:53.999+0900 I NETWORK  [conn1941] end connection 127.0.0.1:35463 (11 connections now open)
2019-07-25T06:36:53.999+0900 I NETWORK  [conn1940] end connection 127.0.0.1:35462 (10 connections now open)
2019-07-25T06:36:53.999+0900 I NETWORK  [conn1939] end connection 127.0.0.1:35461 (9 connections now open)
2019-07-25T06:36:53.999+0900 I NETWORK  [conn1938] end connection 127.0.0.1:35460 (8 connections now open)
2019-07-26T01:03:53.557+0900 I CONTROL  [main] ***** SERVER RESTARTED *****
2019-07-26T01:03:53.747+0900 I CONTROL  [initandlisten] MongoDB starting : pid=854 port=27017 dbpath=/var/lib/mongodb 64-bit host=ubuntu
2019-07-26T01:03:53.747+0900 I CONTROL  [initandlisten] db version v4.0.0
2019-07-26T01:03:53.747+0900 I CONTROL  [initandlisten] git version: 3b07af3d4f471ae89e8186d33bbb1d5259597d51
2019-07-26T01:03:53.747+0900 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.2g  1 Mar 2016
2019-07-26T01:03:53.747+0900 I CONTROL  [initandlisten] allocator: tcmalloc
2019-07-26T01:03:53.747+0900 I CONTROL  [initandlisten] modules: none
2019-07-26T01:03:53.747+0900 I CONTROL  [initandlisten] build environment:
2019-07-26T01:03:53.747+0900 I CONTROL  [initandlisten]     distmod: ubuntu1404
2019-07-26T01:03:53.747+0900 I CONTROL  [initandlisten]     distarch: x86_64
2019-07-26T01:03:53.747+0900 I CONTROL  [initandlisten]     target_arch: x86_64
2019-07-26T01:03:53.747+0900 I CONTROL  [initandlisten] options: { config: "/etc/mongod.conf", net: { bindIp: "127.0.0.1", port: 27017 }, processManagement: { timeZoneInfo: "/usr/share/zoneinfo" }, storage: { dbPath: "/var/lib/mongodb", journal: { enabled: true } }, systemLog: { destination: "file", logAppend: true, path: "/var/log/mongodb/mongod.log" } }
2019-07-26T01:03:53.748+0900 W STORAGE  [initandlisten] Detected unclean shutdown - /var/lib/mongodb/mongod.lock is not empty.
2019-07-26T01:03:53.750+0900 I STORAGE  [initandlisten] Detected data files in /var/lib/mongodb created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2019-07-26T01:03:53.750+0900 W STORAGE  [initandlisten] Recovering data from the last clean checkpoint.
2019-07-26T01:03:53.750+0900 I STORAGE  [initandlisten]
2019-07-26T01:03:53.750+0900 I STORAGE  [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
2019-07-26T01:03:53.750+0900 I STORAGE  [initandlisten] **          See http://dochub.mongodb.org/core/prodnotes-filesystem
2019-07-26T01:03:53.750+0900 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=256M,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),statistics_log=(wait=0),verbose=(recovery_progress),
2019-07-26T01:03:55.375+0900 I STORAGE  [initandlisten] WiredTiger message [1564070635:375844][854:0x7f9600196a00], txn-recover: Main recovery loop: starting at 4/38038144
2019-07-26T01:03:55.376+0900 I STORAGE  [initandlisten] WiredTiger message [1564070635:376299][854:0x7f9600196a00], txn-recover: Recovering log 4 through 5
2019-07-26T01:03:55.452+0900 I STORAGE  [initandlisten] WiredTiger message [1564070635:452166][854:0x7f9600196a00], txn-recover: Recovering log 5 through 5
2019-07-26T01:03:55.553+0900 I STORAGE  [initandlisten] WiredTiger message [1564070635:553501][854:0x7f9600196a00], txn-recover: Set global recovery timestamp: 0
2019-07-26T01:03:55.743+0900 I RECOVERY [initandlisten] WiredTiger recoveryTimestamp. Ts: Timestamp(0, 0)
2019-07-26T01:03:56.093+0900 I CONTROL  [initandlisten]
2019-07-26T01:03:56.093+0900 I CONTROL  [initandlisten] ** WARNING: Access control is not enabled for the database.
2019-07-26T01:03:56.093+0900 I CONTROL  [initandlisten] **          Read and write access to data and configuration is unrestricted.
2019-07-26T01:03:56.093+0900 I CONTROL  [initandlisten]
2019-07-26T01:03:56.093+0900 I CONTROL  [initandlisten]
2019-07-26T01:03:56.093+0900 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2019-07-26T01:03:56.093+0900 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2019-07-26T01:03:56.093+0900 I CONTROL  [initandlisten]
2019-07-26T01:03:56.093+0900 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2019-07-26T01:03:56.093+0900 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2019-07-26T01:03:56.093+0900 I CONTROL  [initandlisten]
2019-07-26T01:03:56.437+0900 I FTDC     [initandlisten] Initializing full-time diagnostic data capture with directory '/var/lib/mongodb/diagnostic.data'
2019-07-26T01:03:56.440+0900 I NETWORK  [initandlisten] waiting for connections on port 27017
2019-07-26T01:03:57.017+0900 I FTDC     [ftdc] Unclean full-time diagnostic data capture shutdown detected, found interim file, some metrics may have been lost. OK

root@ubuntu:/data/db# ls -al

代码语言:javascript
复制
합계 332
drwxr-xr-x 4 root root  4096  7월 26 00:57 .
drwxr-xr-x 3 root root  4096  7월 20  2018 ..
-rw------- 1 root root    46  7월 26 00:45 WiredTiger
-rw------- 1 root root    21  7월 26 00:45 WiredTiger.lock
-rw------- 1 root root  1044  7월 26 00:57 WiredTiger.turtle
-rw------- 1 root root 61440  7월 26 00:57 WiredTiger.wt
-rw------- 1 root root  4096  7월 26 00:55 WiredTigerLAS.wt
-rw------- 1 root root 32768  7월 26 00:55 _mdb_catalog.wt
-rw------- 1 root root 16384  7월 26 00:55 collection-0-6981595682191946835.wt
-rw------- 1 root root 36864  7월 26 00:56 collection-2-6981595682191946835.wt
-rw------- 1 root root  4096  7월 26 00:55 collection-4-6981595682191946835.wt
-rw------- 1 root root 32768  7월 26 00:55 collection-7-6981595682191946835.wt
drwx------ 2 root root  4096  7월 26 01:00 diagnostic.data
-rw------- 1 root root 16384  7월 26 00:55 index-0--23645261368052429.wt
-rw------- 1 root root  4096  7월 26 00:55 index-1--23645261368052429.wt
-rw------- 1 root root  4096  7월 26 00:56 index-2--23645261368052429.wt
-rw------- 1 root root 16384  7월 26 00:55 index-3--23645261368052429.wt
-rw------- 1 root root 32768  7월 26 00:56 index-4--23645261368052429.wt
drwx------ 2 root root  4096  7월 26 00:55 journal
-rw------- 1 root root     6  7월 26 00:55 mongod.lock
-rw------- 1 root root 36864  7월 26 00:57 sizeStorer.wt
-rw------- 1 root root   114  7월 26 00:45 storage.bson

root@ubuntu:/var/lib/mongodb# ls -al

代码语言:javascript
复制
합계 2468
drwxr-xr-x  4 mongodb mongodb   4096  7월 26 01:05 .
drwxr-xr-x 48 root    root      4096  7월 21 20:50 ..
-rw-------  1 mongodb mongodb     46  7월 18  2018 WiredTiger
-rw-------  1 mongodb mongodb     21  7월 18  2018 WiredTiger.lock
-rw-------  1 mongodb mongodb   1056  7월 26 01:05 WiredTiger.turtle
-rw-------  1 mongodb mongodb 192512  7월 26 01:05 WiredTiger.wt
-rw-------  1 mongodb mongodb   4096  7월 26 01:03 WiredTigerLAS.wt
-rw-------  1 mongodb mongodb  36864  7월 26 01:03 _mdb_catalog.wt
-rw-------  1 mongodb mongodb  16384  7월 26 01:03 collection-0--6413199990932768598.wt
-rw-------  1 mongodb mongodb  36864  7월 26 01:03 collection-10-6605498715908891783.wt
-rw-------  1 mongodb mongodb  36864  7월 26 01:03 collection-12-6605498715908891783.wt
-rw-------  1 mongodb mongodb  36864  7월 26 01:03 collection-14-6605498715908891783.wt
-rw-------  1 mongodb mongodb  36864  7월 26 01:03 collection-16-6605498715908891783.wt
-rw-------  1 mongodb mongodb  36864  7월 26 01:03 collection-18-6605498715908891783.wt
-rw-------  1 mongodb mongodb  36864  7월 26 01:04 collection-2--6413199990932768598.wt
-rw-------  1 mongodb mongodb  16384  7월 26 01:03 collection-20-6605498715908891783.wt
-rw-------  1 mongodb mongodb  45056  7월 26 01:03 collection-22-6605498715908891783.wt
-rw-------  1 mongodb mongodb  36864  7월 26 01:03 collection-24-6605498715908891783.wt
-rw-------  1 mongodb mongodb  36864  7월 26 01:03 collection-26-6605498715908891783.wt
-rw-------  1 mongodb mongodb 196608  7월 26 01:03 collection-28-6605498715908891783.wt
-rw-------  1 mongodb mongodb  36864  7월 26 01:03 collection-30-6605498715908891783.wt
-rw-------  1 mongodb mongodb  61440  7월 26 01:03 collection-32-6605498715908891783.wt
-rw-------  1 mongodb mongodb  24576  7월 26 01:03 collection-34-6605498715908891783.wt
-rw-------  1 mongodb mongodb  32768  7월 26 01:03 collection-36-6605498715908891783.wt
-rw-------  1 mongodb mongodb 151552  7월 26 01:03 collection-38-6605498715908891783.wt
-rw-------  1 mongodb mongodb  20480  7월 26 01:03 collection-4--6413199990932768598.wt
-rw-------  1 mongodb mongodb 114688  7월 26 01:03 collection-40-6605498715908891783.wt
-rw-------  1 mongodb mongodb  45056  7월 26 01:03 collection-42-6605498715908891783.wt
-rw-------  1 mongodb mongodb  36864  7월 26 01:03 collection-44-6605498715908891783.wt
-rw-------  1 mongodb mongodb  36864  7월 26 01:03 collection-46-6605498715908891783.wt
-rw-------  1 mongodb mongodb  36864  7월 26 01:03 collection-6-6605498715908891783.wt
-rw-------  1 mongodb mongodb 147456  7월 26 01:03 collection-8-6605498715908891783.wt
drwx------  2 mongodb mongodb   4096  7월 26 01:27 diagnostic.data
-rw-------  1 mongodb mongodb  16384  7월 26 01:03 index-1--6413199990932768598.wt
-rw-------  1 mongodb mongodb  36864  1월  8  2019 index-11-6605498715908891783.wt
-rw-------  1 mongodb mongodb  36864  1월 31 00:32 index-13-6605498715908891783.wt
-rw-------  1 mongodb mongodb  16384 12월 16  2018 index-15-6605498715908891783.wt
-rw-------  1 mongodb mongodb  36864 12월 16  2018 index-17-6605498715908891783.wt
-rw-------  1 mongodb mongodb  32768 12월 19  2018 index-19-6605498715908891783.wt
-rw-------  1 mongodb mongodb  16384 12월 19  2018 index-21-6605498715908891783.wt
-rw-------  1 mongodb mongodb  36864  7월 25 00:05 index-23-6605498715908891783.wt
-rw-------  1 mongodb mongodb  36864  7월 10 16:36 index-25-6605498715908891783.wt
-rw-------  1 mongodb mongodb  36864  2월 26 10:29 index-27-6605498715908891783.wt
-rw-------  1 mongodb mongodb  69632  7월 25 10:00 index-29-6605498715908891783.wt
-rw-------  1 mongodb mongodb  36864  7월 26 01:04 index-3--6413199990932768598.wt
-rw-------  1 mongodb mongodb  36864  2월 26 11:20 index-31-6605498715908891783.wt
-rw-------  1 mongodb mongodb  32768  2월 18 11:25 index-33-6605498715908891783.wt
-rw-------  1 mongodb mongodb  24576  4월  9 21:59 index-35-6605498715908891783.wt
-rw-------  1 mongodb mongodb  32768  2월 21 17:50 index-37-6605498715908891783.wt
-rw-------  1 mongodb mongodb  53248  7월 21 09:00 index-39-6605498715908891783.wt
-rw-------  1 mongodb mongodb  53248  6월 10 22:36 index-41-6605498715908891783.wt
-rw-------  1 mongodb mongodb  36864  7월 25 00:00 index-43-6605498715908891783.wt
-rw-------  1 mongodb mongodb  36864  5월 13 10:02 index-45-6605498715908891783.wt
-rw-------  1 mongodb mongodb  36864  4월  9 16:10 index-47-6605498715908891783.wt
-rw-------  1 mongodb mongodb  20480  8월  9  2018 index-5--6413199990932768598.wt
-rw-------  1 mongodb mongodb  20480  7월 26 01:04 index-6--6413199990932768598.wt
-rw-------  1 mongodb mongodb  36864  2월 26 13:46 index-7-6605498715908891783.wt
-rw-------  1 mongodb mongodb  36864 10월 25  2018 index-9-6605498715908891783.wt
drwx------  2 mongodb mongodb   4096  7월 26 01:04 journal
-rw-------  1 mongodb mongodb      4  7월 26 01:03 mongod.lock
-rw-------  1 mongodb mongodb  36864  7월 26 01:05 sizeStorer.wt
-rw-------  1 mongodb mongodb    114  7월 18  2018 storage.bson
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-07-25 16:35:07

启动mongodb时,我只输入了mongod,然后就找不到数据库了。

但是,当我像service mongod start一样启动mongodb时,我可以看到数据库。

我不知道两者之间有什么不同,但是第二条路我可以看到db。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57206470

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档