-->
  • Recent Articles

    LVM: mlock failed: Cannot allocate memory

     When attempting to activating an VG the following error occurs 

    ERROR

    [root@<hostname> ~]# vgchange -ay pavcri-vg

      7f58e8c70000-7f58e8c71000 r-xp 0025b000 08:03 1831764                    /lib64/libdevmapper.so.1.02: mlock failed: Cannot allocate memory

      7f58e8e78000-7f58e8e79000 r-xp 00207000 08:03 1831765                    /lib64/libdevmapper-event.so.1.02: mlock failed: Cannot allocate memory

      7f59e86df000-7f59e86e0000 r-xp 00285000 08:03 1831828                    /lib64/libm-2.12.so: mlock failed: Cannot allocate memory

      7f59e88fd000-7f59e88fe000 r-xp 0021d000 08:03 1831462                    /lib64/libpthread-2.12.so: mlock failed: Cannot allocate memory

      7f59e8b02000-7f59e8b03000 r-xp 00204000 08:03 1831456                    /lib64/libksplice_helper.so: mlock failed: Cannot allocate memory

      7f59e8e97000-7f59e8e98000 r-xp 00394000 08:03 1831438                    /lib64/libc-2.12.so: mlock failed: Cannot allocate memory

      7f59e90a0000-7f59e90a1000 r-xp 00208000 08:03 1831842                    /lib64/librt-2.12.so: mlock failed: Cannot allocate 

     

    When i checked and found the issue is caused by the following setup:

    /etc/lvm/lvm.conf has below entry:

    use_mlockall = 0

     

    Configuration option activation/use_mlockall. Prior to version 2.02.62, LVM used mlockall() to pin the whole process's memory while activating devices, however later versions of LVM, such as in the example above do not use this functionality. (LVM Documentation)

    Find Articles on troubleshooting Other OCI issues.

     SOLUTION:

    To implement the solution, please execute the following steps:

    1. Login to server.

    2. vi /etc/lvm/lvm.conf and change the below value:

    use_mlockall = 0 to 1

    No comments