Disable automatic memory onlining

To prevent newly added memory devices from becoming immediately available to the operating system, disable automatic memory onlining in Red Hat Enterprise Linux by modifying the relevant udev rules.

Before you begin

  • You have root privileges on your system.

Procedure

  1. Copy the default rule to the local override directory:
    
                cp /usr/lib/udev/rules.d/40-redhat-hotplug.rules /etc/udev/rules.d/
              
  2. Edit the /etc/udev/rules.d/40-redhat-hotplug.rules file in a text editor and comment out the lines that handle memory hot-plug operations:
    # Memory hotadd request
    #SUBSYSTEM!="memory", GOTO="memory_hotplug_end"
    #ACTION!="add", GOTO="memory_hotplug_end"
    #CONST{arch}=="s390*", GOTO="memory_hotplug_end"
    #CONST{arch}=="ppc64*", GOTO="memory_hotplug_end"
    #ENV{.state}="online"
    #CONST{virt}=="none", ENV{.state}="online_movable"
    #ATTR{state}=="offline", ATTR{state}="$env{.state}"
    #LABEL="memory_hotplug_end"
  3. Reload udev rules to apply the changes:
    
                udevadm control --reload-rules
              
  4. Reboot the system, or remove the device and add it back to the system to ensure the new configuration takes effect.

Results

  • After disabling automatic onlining, newly added memory blocks will remain offline until you manually online them.