gulaftab / redis

Automatically exported from code.google.com/p/redis
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Redis does not fail on startup when swap size exceeds partition size in FreeBSD #569

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What version of Redis you are using, in what kind of Operating System?

Redis 2.2.8 on FreeBSD 8.2-RELEASE

What is the problem you are experiencing?

When putting the swap file in a partition that has a smaller size than the size 
requested in the config, redis happily preallocates it, but it won't actually 
be able to fill it entirely, so I assume it will fail when the partition is 
full. It would be much better to check this beforehand and fail on startup if 
this is the case, as it is likely a configuration error.

What steps will reproduce the problem?

Have a /tmp partition of 1.0G in size, put the redis swap at /tmp/redis.swap, 
with a size of 4.0G.
Doing "ls -l /tmp/redis.swap" will show a 4.0G file, but it won't be able to 
fill it of course.

Do you have an INFO output? Please past it here.

If it is a crash, can you please paste the stack trace that you can find in
the log file or on standard output? This is really useful for us!

Please provide any additional information below.

Original issue reported on code.google.com by barrie....@gmail.com on 30 May 2011 at 11:49