How to enable Hot-add Memory in Linux RHEL 5 ?
What if you have Hot-added memory in your RHEL 5 server but it's still displaying Last memory configuration ?
Step :
1. Check if two modules are loaded properly by,
#lsmod | grep acpi
acpiphp 43673 0
acpi_memhotplug 42199 0
If not loaded, follow below steps;
#modprobe acpiphp
#modprobe acpi_memhotplug
2. Now increase your server memory with Hot-add memory module. This will be done by Hardware engineer directly on the server, i am not talking about on OS level.
3. Make a shell script like "memory_online.sh" with below contents,
"for a in /sys/devices/system/memory/memory*/state;
do
echo 'online' > "$a"
done" and then
"cat /sys/devices/system/memory/memory*/state"
Save it & exit
For Ubuntu you have to try with another script as below,
#!/bin/sh
i=0
while [ $i -lt 4500 ]
do
if [ -f /sys/devices/system/memory/memory$i/state ]
then
if grep "offline" /sys/devices/system/memory/memory$i/state
then
echo 'online' > /sys/devices/system/memory/memory$i/state
fi
fi
i=`expr $i + 1`
done
4. Give this script execution permission by,
#chmod 777 memory_online.sh
5. Next execute it & check memory in either "/proc/meminfo" file or by below command
#free
Done.
Step :
1. Check if two modules are loaded properly by,
#lsmod | grep acpi
acpiphp 43673 0
acpi_memhotplug 42199 0
If not loaded, follow below steps;
#modprobe acpiphp
#modprobe acpi_memhotplug
2. Now increase your server memory with Hot-add memory module. This will be done by Hardware engineer directly on the server, i am not talking about on OS level.
3. Make a shell script like "memory_online.sh" with below contents,
"for a in /sys/devices/system/memory/memory*/state;
do
echo 'online' > "$a"
done" and then
"cat /sys/devices/system/memory/memory*/state"
Save it & exit
For Ubuntu you have to try with another script as below,
#!/bin/sh
i=0
while [ $i -lt 4500 ]
do
if [ -f /sys/devices/system/memory/memory$i/state ]
then
if grep "offline" /sys/devices/system/memory/memory$i/state
then
echo 'online' > /sys/devices/system/memory/memory$i/state
fi
fi
i=`expr $i + 1`
done
4. Give this script execution permission by,
#chmod 777 memory_online.sh
5. Next execute it & check memory in either "/proc/meminfo" file or by below command
#free
Done.
Hii which hardware supports memory Hot-Add
ReplyDeleteYou can check it on VMware's Hardware Compatibility guide " www.vmware.com/go/hcl ".
ReplyDeleteNot working for me:
ReplyDelete-bash: echo: write error: Operation not permitted
me to having same error??
ReplyDeleteecho: write error: Operation not permitted
any pointers??
just reload acpi_memhotplug module
ReplyDelete