Issues with Redis Persistent to Disk over NFS Mount

1,378 views
Skip to first unread message

Brendan Murtagh

unread,
Jun 24, 2013, 2:27:24 PM6/24/13
to redi...@googlegroups.com
Hello,

It was suggested to post my situation to the Redis Mailing List in an attempt to get some help. First of all, this is my first experience with Redis and I'm simply setting up the Redis server to be used by our developers. Currently in our Production environment, the Redis database is written to the local filesystem via /var/lib/redis/dump.rdb. The Redis cache is kept and can be re-used on after a reboot.

In our Development environment, we have created /var/lib/redis as an NFS mount to a QTree on a NetApp volume. The same configuration file from Production is being used (same database name, working directory, Snapshotting, etc.) are the same. I'm ran a diff on both files to make sure. The problem we ran into was that we rebooted our Redis server in the Development environment and lost the cache that was built. I have no idea why this happened or where to begin looking since Redis is still very new to me. Is anyone doing a similar setup with the Redis DB being stored on via an NFS mount?

Redis has been installed via apt-get package for both environments.


There are a few differences between Production and Dev. To give a quick outline:

Prod
Ubuntu 10.04 x64
DB is stored on local filesystem


Dev:
Ubuntu 12.04 x64 (Virtual Machine on VMWare ESXi 5.1)
DB is stored on NFS mount, but mounted on the Redis server as /var/lib/redis (data is being written to dump.rdb)

My only thought was that Redis was being started prior to the mount being available and causing the data to not be available, but I'm not certain this is the issue or even happening. I'm not sure how to confirm that one way or another.

Any thoughts, direction, and suggestions is greatly appreciated.

Thanks,

Brendan

Josiah Carlson

unread,
Jun 25, 2013, 12:17:30 PM6/25/13
to redi...@googlegroups.com
You can confirm your suspicions by starting Redis after the NFS mount is known to be up, writing data, performing a 'SHUTDOWN' command in Redis, waiting for it to close down, then starting Redis back up.

If it still has data, then you can reasonably assume that your NFS mount wasn't up by the time Redis tried to loads its data.

Question: Why is development using an NFS mount instead of local storage? What do you believe that buys you, operationally?

 - Josiah



--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.
To post to this group, send email to redi...@googlegroups.com.
Visit this group at http://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Brendan Murtagh

unread,
Jun 26, 2013, 8:33:36 AM6/26/13
to redi...@googlegroups.com
Thank you for the suggestion Josiah. Our dev environments are considered production-level resources and are virtualized. This allows us to re-use the datastore(s) if a VM needs to be removed or another be provisioned. The VM's are essentially "thin clients".

Josiah Carlson

unread,
Jun 26, 2013, 11:38:20 AM6/26/13
to redi...@googlegroups.com
You could add a test + sleep loop to your Redis init.d script, verifying that the mount either exists, or that some non-Redis file that should always be in the mount exists.

 - Josiah
Reply all
Reply to author
Forward
0 new messages