Bug 762500 (GLUSTER-768) - cache-size might be wrong in glusterfs.vol
Summary: cache-size might be wrong in glusterfs.vol
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: GLUSTER-768
Product: GlusterFS
Classification: Community
Component: scripts
Version: 3.0.3
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Harshavardhana
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-03-26 09:12 UTC by olivier.lecam
Modified: 2015-03-23 01:03 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

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)


Note You need to log in before you can comment on or make changes to this bug.