Upgrade from 1.2.0 to 1.3.1

4 views
Skip to first unread message

Adam N

unread,
Feb 11, 2010, 1:07:01 PM2/11/10
to mongodb-user
I just tried to upgrade an experimental installation using sharding
from 1.2.0 to 1.3.1 and I appear to have lost all my data.

Is this expected?

I also tried --upgrade for each shard but that just gave me the
cryptic message which didn't appear to do anything:

ubuntu@domU-12-31-38-00-4C-A2:/var/log/mongodb$ sudo /usr/local/
mongodb/bin/mongod --upgrade --dbpath=/var/lib/mongodb2/ --shardsvr
Thu Feb 11 17:59:39 Mongo DB : starting : pid = 23323 port = 27018
dbpath = /var/lib/mongodb2/ master = 0 slave = 0 64-bit
Thu Feb 11 17:59:39 finished checking dbs
Thu Feb 11 17:59:39 dbexit:
Thu Feb 11 17:59:39 shutdown: going to close listening sockets...
Thu Feb 11 17:59:39 shutdown: going to flush oplog...
Thu Feb 11 17:59:39 shutdown: going to close sockets...
Thu Feb 11 17:59:39 shutdown: waiting for fs preallocator...
Thu Feb 11 17:59:39 shutdown: closing all files...
Thu Feb 11 17:59:39 closeAllFiles() finished
Thu Feb 11 17:59:39 shutdown: removing fs lock...
Thu Feb 11 17:59:39 dbexit: really exiting now

Eliot Horowitz

unread,
Feb 11, 2010, 1:43:26 PM2/11/10
to mongod...@googlegroups.com
Are there files in /var/lib/mongodb2/
from the looks of that output there aren't files at all?

> --
> You received this message because you are subscribed to the Google Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com.
> To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
>
>

Adam N

unread,
Feb 11, 2010, 2:23:47 PM2/11/10
to mongodb-user
Yes, there are files. 'pline' is the name of the only database.

ubuntu@domU-12-31-38-00-4C-A2:/var/log/mongodb$ ls -altr /var/lib/
mongodb
total 1607252
drwxr-xr-x 35 root root 4096 2009-12-16 17:22 ..
-rw------- 1 root root 16777216 2010-01-07 14:03 local.ns
-rw------- 1 root root 268435456 2010-01-07 14:03 local.2
-rw------- 1 root root 268435456 2010-01-07 14:03 local.1
-rw------- 1 root root 67108864 2010-01-07 14:03 local.0
-rw------- 1 root root 536870912 2010-01-16 19:17 pline.3
-rw------- 1 root root 134217728 2010-02-11 17:30 pline.1
-rw------- 1 root root 16777216 2010-02-11 17:30 pline.ns
-rw------- 1 root root 67108864 2010-02-11 17:30 pline.0
-rw------- 1 root root 268435456 2010-02-11 17:30 pline.2
drwxr-xr-x 3 root root 4096 2010-02-11 17:31 .
drwxr-xr-x 2 root root 4096 2010-02-11 17:31 config
-rwxr-xr-x 1 root root 6 2010-02-11 17:59 mongod.lock
ubuntu@domU-12-31-38-00-4C-A2:/var/log/mongodb$ ls -altr /var/lib/
mongodb2
total 1033252
drwxr-xr-x 35 root root 4096 2009-12-16 17:22 ..
-rw------- 1 root root 16777216 2009-12-16 19:45 tester4.ns
-rw------- 1 root root 67108864 2009-12-16 19:45 tester4.0
-rw------- 1 root root 134217728 2009-12-16 19:45 tester4.1
-rw------- 1 root root 16777216 2009-12-17 17:09 local.ns
-rw------- 1 root root 268435456 2009-12-17 17:09 local.2
-rw------- 1 root root 268435456 2009-12-17 17:09 local.1
-rw------- 1 root root 67108864 2009-12-17 17:09 local.0
-rw------- 1 root root 134217728 2010-01-25 22:39 pline.1
-rw------- 1 root root 16777216 2010-02-09 22:09 pline.ns
-rw------- 1 root root 67108864 2010-02-09 22:09 pline.0
drwxr-xr-x 2 root root 4096 2010-02-11 17:31 .
-rwxr-xr-x 1 root root 6 2010-02-11 17:59 mongod.lock
ubuntu@domU-12-31-38-00-4C-A2:/var/log/mongodb$

Eliot Horowitz

unread,
Feb 11, 2010, 2:26:22 PM2/11/10
to mongod...@googlegroups.com
So what happens when you start up everything?
All queries return nothing?
What if you query the mongod itself?

Adam N

unread,
Feb 11, 2010, 3:54:16 PM2/11/10
to mongodb-user
One shard has most of the records for the collection 82,619. The
other shard has 2 records.

Going from the config server has zero.

========
shard1
========
ubuntu@domU-12-31-38-00-4C-A2:~$ /usr/local/mongodb/bin/mongo --port
27018
MongoDB shell version: 1.3.1
url: test
connecting to: 127.0.0.1:27018/test
type "help" for help
> use pline
switched to db pline
> pline.count()
Thu Feb 11 20:50:44 JS Error: ReferenceError: pline is not defined
(shell):0
> show dbs
admin
local
pline
> db.page.count()
82619
> bye

===========
shard2
===========
ubuntu@domU-12-31-38-00-4C-A2:~$ /usr/local/mongodb/bin/mongo --port
27016
MongoDB shell version: 1.3.1
url: test
connecting to: 127.0.0.1:27016/test
type "help" for help
> use pline
switched to db pline
> db.page.count()
2
> bye

============
config
============
ubuntu@domU-12-31-38-00-4C-A2:~$ /usr/local/mongodb/bin/mongo --port
27019
MongoDB shell version: 1.3.1
url: test
connecting to: 127.0.0.1:27019/test
type "help" for help
> use pline
switched to db pline
> db.page.count()
0
> bye

Eliot Horowitz

unread,
Feb 11, 2010, 3:55:59 PM2/11/10
to mongod...@googlegroups.com
Do you mean going from mongos instead of config server?
You never connect to directly to config server.

Adam N

unread,
Feb 11, 2010, 4:01:33 PM2/11/10
to mongodb-user
Oops, just remembered that as you said it.

Still, it would be nice if the config server said something like
'Cannot switch to db 'pline' from config server' or even 'count() is
not supported on config server'.

Thanks though,
Adam

Reply all
Reply to author
Forward
0 new messages