Yum updates fail with disk space error

Problem:

When running the "yum update" command to update all packages on the system to the latest release, the Yum process exits with an error.


Symptoms:

[[email protected] ~]$ sudo yum --nogpgcheck update -y 
Loaded plugins: amazon-id, search-disabled-repos
rhel-7-server-rhui-rh-common-rpms                                        | 2.1 kB  00:00:00
rhel-7-server-rhui-rpms                                                  | 2.0 kB  00:00:00
rhui-client-config-server-7                                              | 2.1 kB  00:00:00
(1/9): rhel-7-server-rhui-rh-common-rpms/7Server/x86_64/updateinfo       |  34 kB  00:00:00
(2/9): rhel-7-server-rhui-rh-common-rpms/7Server/x86_64/group            |  124 B  00:00:00
(3/9): rhel-7-server-rhui-rh-common-rpms/7Server/x86_64/primary          |  65 kB  00:00:00
(4/9): rhel-7-server-rhui-rpms/7Server/x86_64/group                      | 772 kB  00:00:00
(5/9): rhel-7-server-rhui-rpms/7Server/x86_64/updateinfo                 | 3.6 MB  00:00:00
(6/9): rhui-client-config-server-7/x86_64/group                          |  124 B  00:00:00
(7/9): rhui-client-config-server-7/x86_64/updateinfo                     |   92 B  00:00:00
(8/9): rhui-client-config-server-7/x86_64/primary                        | 1.4 kB  00:00:00
(9/9): rhel-7-server-rhui-rpms/7Server/x86_64/primary                    |  42 MB  00:00:00
rhel-7-server-rhui-rh-common-rpms                                                      242/242
rhel-7-server-rhui-rpms                                                  27010/27010
...
Transaction check error:
  installing package python-perf-3.10.0-1062.12.1.el7.x86_64 needs 26MB on the /var filesystem
  installing package sqlite-3.7.17-8.el7_7.1.x86_64 needs 26MB on the /var filesystem
  installing package sudo-1.8.23-4.el7_7.2.x86_64 needs 26MB on the /var filesystem
  installing package NetworkManager-config-server-1:1.18.0-5.el7_7.2.noarch needs 27MB on the /var filesystem
  installing package kernel-3.10.0-1062.12.1.el7.x86_64 needs 64MB on the /var filesystem
  installing package binutils-2.27-41.base.el7_7.2.x86_64 needs 65MB on the /var filesystem
Error Summary
-------------
Disk Requirements:
  At least 65MB more space needed on the /var filesystem.

Cause:

The 1gb allocated to the /var filesystem in our images by default is not sufficient for processing large system updates.


Solution:

As part of our documentation, we recommend that you define your volume sizes during the build process to ensure they contain enough space to operate your application on a day-to-day basis.  Considering that 1 gigabyte may no longer be a sufficient storage size for /var in maintaining the RedHat Enterprise Linux system, we will be changing this volume to be 2 gigabytes in future releases.

For existing systems, please follow Amazon's instructions to resize the /dev/xvdl volume as appropriate - All volumes in our AMIs are formatted as XFS partitions, so the standard instructions should apply.

Hat das Ihr Problem gelöst?