What is the "dir "/tmp"" directive in sentinel.conf for?

1,360 views
Skip to first unread message

nfwlpw

unread,
Apr 28, 2014, 3:45:04 PM4/28/14
to redi...@googlegroups.com
It's not always /tmp, sometimes it's /, sometimes it's /root.  Is this some kind of working directory?  Can I set it to a specific one?

Thank you.

Josiah Carlson

unread,
Apr 28, 2014, 8:09:12 PM4/28/14
to redi...@googlegroups.com
The sample sentinel.conf shipped with Redis does not include the "dir" directive, which in Redis typically references the path where snapshots and/or AOFs are to be stored. Because Sentinel doesn't need to store snapshots/AOFs, I am unsure as to why your sentinel.conf files have 'dir' set, as usually Redis itself will complain if/when a configuration directive is included that is not relevant. Are you sure you aren't looking at regular Redis configuration files?

Incidentally, if you have regular Redis configuration files with 'dir' set as "/", "/root", or "/tmp", that's probably a mistake of some kind or another.

 - Josiah


On Mon, Apr 28, 2014 at 12:45 PM, nfwlpw <nfw...@gmail.com> wrote:
It's not always /tmp, sometimes it's /, sometimes it's /root.  Is this some kind of working directory?  Can I set it to a specific one?

Thank you.

--
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/d/optout.

nfwlpw

unread,
Apr 28, 2014, 8:20:09 PM4/28/14
to redi...@googlegroups.com
I believe it's created by the sentinel config rewrite.

nfwlpw

unread,
Apr 29, 2014, 10:09:18 AM4/29/14
to redi...@googlegroups.com
And sentinel seems to want to chdir into, or it won't start

[8627] 25 Apr 14:00:15.807 # Can't chdir to '/root': Permission denied

Salvatore Sanfilippo

unread,
Apr 29, 2014, 10:13:18 AM4/29/14
to Redis DB
On Tue, Apr 29, 2014 at 4:09 PM, nfwlpw <nfw...@gmail.com> wrote:
> And sentinel seems to want to chdir into, or it won't start

Hello,

yes: it is the working directory for the process. Every unix daemon must
have a well-defined working directory, otherwise you can't even
unmount partitions if there is a processes using it as working dir.
For Sentinel it makes sense to just use /tmp most of the times, I'll
update the default Sentinel config file with the entry "dir /tmp".
When it is not specified, it gets the directory from where the system
is executed.

Cheers,
Salvatore

--
Salvatore 'antirez' Sanfilippo
open source developer - GoPivotal
http://invece.org

To "attack a straw man" is to create the illusion of having refuted a
proposition by replacing it with a superficially similar yet
unequivalent proposition (the "straw man"), and to refute it
— Wikipedia (Straw man page)
Reply all
Reply to author
Forward
0 new messages