How to activate extended RAM in RedHat vmware guest

When the RAM in extended in a Red Hat OS  the new extended memory may not me seen in the OS , the below steps explain how to make newly  extended RAM accessible by the OS without a reboot.


 

Note: convention used

commands are shown starting with “#”in bold  description/results of a command are shown as “##” in italics

something like this

#command    ##description/result  of a command


 

listing available memory blocks and their state

#grep line /sys/devices/system/memory/*/state

/sys/devices/system/memory/memory0/state:online
/sys/devices/system/memory/memory10/state:offline
/sys/devices/system/memory/memory11/state:offline
/sys/devices/system/memory/memory12/state:offline
/sys/devices/system/memory/memory13/state:offline
/sys/devices/system/memory/memory14/state:offline
/sys/devices/system/memory/memory15/state:offline
/sys/devices/system/memory/memory16/state:offline
/sys/devices/system/memory/memory17/state:offline
/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:offline
/sys/devices/system/memory/memory9/state:offline

____________________________

a few memory blocks which shows up as offline indicates newly extended RAM, we have to activate it for OS to recognize and use it.

echo “online” into the files which are shown as offline.
i.e
#echo online > /sys/devices/system/memory/memory9/state
it doesn’t hurt to do it on all the files also which can be done by a simple script

# ls -1 /sys/devices/system/memory/*/state > /tmp/file.txt ## will dump each file name per line in file.txt
# for i in /tmp/file.txt ; do echo online > $i; done
#free -m ##now newly added memory can be seen

Leave a Reply

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