diff -uNrp zabbix-1.8.11/src/zabbix_agent/diskdevices.c zabbix-1.8.11-change-max-monitoring-disk-numbers-by-conf/src/zabbix_agent/diskdevices.c
--- zabbix-1.8.11/src/zabbix_agent/diskdevices.c	2012-03-20 18:15:16.000000000 +0900
+++ zabbix-1.8.11-change-max-monitoring-disk-numbers-by-conf/src/zabbix_agent/diskdevices.c	2012-03-27 15:51:57.000000000 +0900
@@ -21,6 +21,7 @@
 #include "diskdevices.h"
 #include "stats.h"
 #include "log.h"
+#include "zbxconf.h"
 
 static void	apply_diskstat(ZBX_SINGLE_DISKDEVICE_DATA *device, time_t now, zbx_uint64_t *dstat)
 {
@@ -145,7 +146,7 @@ ZBX_SINGLE_DISKDEVICE_DATA	*collector_di
 	zabbix_log(LOG_LEVEL_DEBUG, "In %s() devname:'%s'", __function_name, devname);
 
 	/* collector is full */
-	if (collector->diskdevices.count == MAX_DISKDEVICES)
+	if (collector->diskdevices.count == CONFIG_DISK_NUMBERS)
 	{
 		zabbix_log(LOG_LEVEL_DEBUG, "End of %s():NULL collector is full", __function_name);
 		return NULL;
diff -uNrp zabbix-1.8.11/src/zabbix_agent/diskdevices.h zabbix-1.8.11-change-max-monitoring-disk-numbers-by-conf/src/zabbix_agent/diskdevices.h
--- zabbix-1.8.11/src/zabbix_agent/diskdevices.h	2012-03-20 18:15:16.000000000 +0900
+++ zabbix-1.8.11-change-max-monitoring-disk-numbers-by-conf/src/zabbix_agent/diskdevices.h	2012-03-27 15:51:54.000000000 +0900
@@ -22,8 +22,6 @@
 
 #include "sysinfo.h"
 
-#define	MAX_DISKDEVICES	8
-
 typedef struct c_single_diskdevice_data
 {
 	char		name[32];
@@ -46,7 +44,7 @@ typedef struct c_single_diskdevice_data
 typedef struct c_diskdevices_data
 {
 	int				count;
-	ZBX_SINGLE_DISKDEVICE_DATA	device[MAX_DISKDEVICES];
+	ZBX_SINGLE_DISKDEVICE_DATA	*device;
 } ZBX_DISKDEVICES_DATA;
 
 #define DISKDEVICE_COLLECTOR_STARTED(collector) collector
diff -uNrp zabbix-1.8.11/src/zabbix_agent/stats.c zabbix-1.8.11-change-max-monitoring-disk-numbers-by-conf/src/zabbix_agent/stats.c
--- zabbix-1.8.11/src/zabbix_agent/stats.c	2012-03-20 18:15:16.000000000 +0900
+++ zabbix-1.8.11-change-max-monitoring-disk-numbers-by-conf/src/zabbix_agent/stats.c	2012-03-27 15:51:55.000000000 +0900
@@ -136,22 +136,24 @@ return_one:
 void	init_collector_data()
 {
 	int	cpu_count;
-	size_t	sz, sz_cpu;
+	size_t	sz, sz_cpu, sz_disk;
 #if !defined(_WINDOWS)
 	key_t	shm_key;
 #endif
 
 	cpu_count = zbx_get_cpu_num();
 	sz = sizeof(ZBX_COLLECTOR_DATA);
+	sz_disk = sizeof(ZBX_SINGLE_DISKDEVICE_DATA) * CONFIG_DISK_NUMBERS;
 
 #ifdef _WINDOWS
 	sz_cpu = sizeof(PERF_COUNTER_DATA *) * (cpu_count + 1);
 
-	collector = zbx_malloc(collector, sz + sz_cpu);
-	memset(collector, 0, sz + sz_cpu);
+	collector = zbx_malloc(collector, sz + sz_cpu + sz_disk);
+	memset(collector, 0, sz + sz_cpu + sz_disk);
 
 	collector->cpus.cpu_counter = (PERF_COUNTER_DATA **)(collector + 1);
 	collector->cpus.count = cpu_count;
+	collector->diskdevices.device = (ZBX_SINGLE_DISKDEVICE_DATA *)((void *)(collector) + sz + sz_cpu);
 
 	init_perf_collector(&collector->perfs);
 #else
@@ -163,7 +165,7 @@ void	init_collector_data()
 		exit(FAIL);
 	}
 
-	if (-1 == (shm_id = zbx_shmget(shm_key, sz + sz_cpu)))
+	if (-1 == (shm_id = zbx_shmget(shm_key, sz + sz_cpu + sz_disk)))
 	{
 		zabbix_log(LOG_LEVEL_CRIT, "cannot allocate shared memory for collector");
 		exit(FAIL);
@@ -177,6 +179,7 @@ void	init_collector_data()
 
 	collector->cpus.cpu = (ZBX_SINGLE_CPU_STAT_DATA *)(collector + 1);
 	collector->cpus.count = cpu_count;
+	collector->diskdevices.device = (ZBX_SINGLE_DISKDEVICE_DATA *)((void *)(collector) + sz + sz_cpu);
 #endif	/* _WINDOWS */
 
 #ifdef _AIX
diff -uNrp zabbix-1.8.11/src/zabbix_agent/zabbix_agentd.c zabbix-1.8.11-change-max-monitoring-disk-numbers-by-conf/src/zabbix_agent/zabbix_agentd.c
--- zabbix-1.8.11/src/zabbix_agent/zabbix_agentd.c	2012-03-20 18:15:16.000000000 +0900
+++ zabbix-1.8.11-change-max-monitoring-disk-numbers-by-conf/src/zabbix_agent/zabbix_agentd.c	2012-03-27 15:51:56.000000000 +0900
@@ -344,6 +344,8 @@ static void	zbx_load_config(int optional
 			PARM_OPT,	0,			0},
 		{"UserParameter",		&CONFIG_USER_PARAMETERS,		TYPE_MULTISTRING,
 			PARM_OPT,	0,			0},
+		{"DiskNumbers",			&CONFIG_DISK_NUMBERS,			TYPE_INT,
+			PARM_OPT,	8,			1000},
 #ifdef _WINDOWS
 		{"PerfCounter",			&CONFIG_PERF_COUNTERS,			TYPE_MULTISTRING,
 			PARM_OPT,	0,			0},
diff -uNrp zabbix-1.8.11/src/zabbix_agent/zbxconf.c zabbix-1.8.11-change-max-monitoring-disk-numbers-by-conf/src/zabbix_agent/zbxconf.c
--- zabbix-1.8.11/src/zabbix_agent/zbxconf.c	2012-03-20 18:15:16.000000000 +0900
+++ zabbix-1.8.11-change-max-monitoring-disk-numbers-by-conf/src/zabbix_agent/zbxconf.c	2012-03-27 15:51:58.000000000 +0900
@@ -53,6 +53,7 @@ int	CONFIG_MAX_LINES_PER_SECOND	= 100;
 
 char	**CONFIG_ALIASES                = NULL;
 char	**CONFIG_USER_PARAMETERS        = NULL;
+int	CONFIG_DISK_NUMBERS	= 8;
 #if defined(_WINDOWS)
 char	**CONFIG_PERF_COUNTERS          = NULL;
 #endif
diff -uNrp zabbix-1.8.11/src/zabbix_agent/zbxconf.h zabbix-1.8.11-change-max-monitoring-disk-numbers-by-conf/src/zabbix_agent/zbxconf.h
--- zabbix-1.8.11/src/zabbix_agent/zbxconf.h	2012-03-20 18:15:16.000000000 +0900
+++ zabbix-1.8.11-change-max-monitoring-disk-numbers-by-conf/src/zabbix_agent/zbxconf.h	2012-03-27 15:51:55.000000000 +0900
@@ -35,6 +35,7 @@ extern int	CONFIG_LOG_LEVEL;
 extern int	CONFIG_MAX_LINES_PER_SECOND;
 extern char	**CONFIG_ALIASES;
 extern char	**CONFIG_USER_PARAMETERS;
+extern int	CONFIG_DISK_NUMBERS;
 #ifdef _WINDOWS
 extern char	**CONFIG_PERF_COUNTERS;
 #endif
