manintheit.org

manintheit.org


VMware Hot-Add RAM on Rhel 5

Last week, I  confronted a problem. Even though virtual guest which is rhel5.11(Tikanga) enabled for hot-add RAM, It did not update the new memory size,  after adding 4 GBs of RAM without power off the machine. Solution: Finally, I have found the solution. We need to apply some couple of commands to hit the kernel force rescan memory blocks. First let’s see state of the memory blocks by applying command below. For my case I have no offline memory blocks. But, after adding a new memory most likely you will see some memory blocks as an offline.

root@gns3:~# grep line /sys/devices/system/memory/*/state
/sys/devices/system/memory/memory0/state:online
/sys/devices/system/memory/memory10/state:online
/sys/devices/system/memory/memory11/state:online
/sys/devices/system/memory/memory12/state:online
/sys/devices/system/memory/memory13/state:online
/sys/devices/system/memory/memory14/state:online
/sys/devices/system/memory/memory15/state:online
/sys/devices/system/memory/memory1/state:online
/sys/devices/system/memory/memory2/state:online
/sys/devices/system/memory/memory3/state:online
/sys/devices/system/memory/memory4/state:online
/sys/devices/system/memory/memory5/state:online
/sys/devices/system/memory/memory6/state:online
/sys/devices/system/memory/memory7/state:online
/sys/devices/system/memory/memory8/state:online
/sys/devices/system/memory/memory9/state:online

To make them online, we need to apply command below. After applying the command, you may get some weird errors. You can ignore them. You can check the state of the  memory by reissuing the first command.

for i in $(ls /sys/devices/system/memory/*/state); do echo online > $i; done
-su: echo: write error: Invalid argument
-su: echo: write error: Invalid argument
-su: echo: write error: Invalid argument
-su: echo: write error: Invalid argument
-su: echo: write error: Invalid argument
-su: echo: write error: Invalid argument
-su: echo: write error: Invalid argument
-su: echo: write error: Invalid argument
-su: echo: write error: Invalid argument
-su: echo: write error: Invalid argument
-su: echo: write error: Invalid argument
-su: echo: write error: Invalid argument
-su: echo: write error: Invalid argument
-su: echo: write error: Invalid argument
-su: echo: write error: Invalid argument
-su: echo: write error: Invalid argument

For more information please check the solution here .



Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.