Bug 762500 (GLUSTER-768)

Summary: cache-size might be wrong in glusterfs.vol
Product: [Community] GlusterFS Reporter: olivier.lecam
Component: scriptsAssignee: Harshavardhana <fharshav>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: 3.0.3CC: cww, gluster-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description olivier.lecam 2010-03-26 09:12:02 UTC
Hi -

I used the following command in order to build the config files:
~# glusterfs-volgen --name store1 --raid 1 gl1:/export/nunki gl2:/export/nunki

Part of the generated glusterfs.vol (iocache translotor):
volume iocache
  type performance/io-cache
  option cache-size `grep 'MemTotal' /proc/meminfo  | awk '{print $2 * 0.2 / 1024}' | cut -f1 -d.`MB
  option cache-timeout 1
  subvolumes readahead
end-volume

On some localized systems where the decimal separator is a comma, the cache-size is not configurated. Here is the log:

[2010-03-26 09:46:04] E [xlator.c:309:_volume_option_value_validate] iocache: invalid size format "1600,32MB" in "option cache-size"
[2010-03-26 09:46:04] E [glusterfsd.c:568:_xlator_graph_init] iocache: validating translator failed
[2010-03-26 09:46:04] E [glusterfsd.c:1382:main] glusterfs: translator initialization failed.  exiting

Suggestion: replace by something like this:

option cache-size `grep 'MemTotal' /proc/meminfo  | awk '{printf "%dMB\n", $2 * 0.2 / 1024}'`

Best regards,
-- 
olecam

Comment 1 Anand Avati 2010-03-29 04:12:27 UTC
PATCH: http://patches.gluster.com/patch/3040 in master (Fix backtick evaluation bug in cache-size)

Comment 2 Anand Avati 2010-03-29 04:12:32 UTC
PATCH: http://patches.gluster.com/patch/3042 in release-2.0 (Fix backtick evaluation bug in cache-size)

Comment 3 Anand Avati 2010-03-29 04:12:36 UTC
PATCH: http://patches.gluster.com/patch/3041 in release-3.0 (Fix backtick evaluation bug in cache-size)