yum 업데이트 후 rpm 파일 지우기

yum 업데이트 후 rpm 파일 지우기

드문 경우지만 yum update를 실행한 후 크기가 0인 파일이 포함된 하나 이상의 패키지가 설치되고 영향을 받는 패키지를 다시 설치하면 문제가 해결됩니다.

외부 요인을 믿었겠지만 타임스탬프는 항상 설치된 패키지와 동일합니다.

오라클 리눅스 7.9를 사용하고 있습니다.

uname -r
5.4.17-2102.200.13.el7uek.x86_64

rpm -q rpm --last
rpm-4.11.3-48.el7_9.x86_64                    Sun 05 Jun 2022 05:07:48 AM UTC

rpm -q yum --last
yum-3.4.3-168.0.3.el7.noarch                  Fri 21 May 2021 02:23:50 PM UTC

예를 들어. :

# showing the last transaction
rpm -q gzip --last
gzip-1.5-11.el7_9.x86_64                      Sat 13 Aug 2022 05:30:27 AM UTC

# showing information for the file size and timestamp
stat /usr/bin/gzip
  File: ‘/usr/bin/gzip’
  Size: 0           Blocks: 0          IO Block: 4096   regular empty file
Device: fd01h/64769d    Inode: 50463530    Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2022-08-17 07:18:10.066983772 +0000
Modify: 2022-05-11 17:23:29.000000000 +0000
Change: 2022-08-13 05:30:27.680595054 +0000
 Birth: -

# validating package integrity shows that size and the MD5 sum differs from rpmdb.
rpm -V gzip
S.5......    /usr/bin/gunzip
S.5......    /usr/bin/gzexe
S.5......    /usr/bin/gzip
S.5......    /usr/bin/zcat
S.5......    /usr/bin/zcmp
S.5......    /usr/bin/zdiff
S.5......    /usr/bin/zegrep
S.5......    /usr/bin/zfgrep
S.5......    /usr/bin/zforce
S.5......    /usr/bin/zgrep
S.5......    /usr/bin/zless
S.5......    /usr/bin/zmore
S.5......    /usr/bin/znew
S.5......  d /usr/share/doc/gzip-1.5/AUTHORS
S.5......  d /usr/share/doc/gzip-1.5/ChangeLog
S.5......  d /usr/share/doc/gzip-1.5/NEWS
S.5......  d /usr/share/doc/gzip-1.5/README
S.5......  d /usr/share/doc/gzip-1.5/THANKS
S.5......  d /usr/share/doc/gzip-1.5/TODO
S.5......  d /usr/share/info/gzip.info.gz
S.5......  d /usr/share/man/man1/gunzip.1.gz
S.5......  d /usr/share/man/man1/gzexe.1.gz
S.5......  d /usr/share/man/man1/gzip.1.gz
S.5......  d /usr/share/man/man1/zcat.1.gz
S.5......  d /usr/share/man/man1/zcmp.1.gz
S.5......  d /usr/share/man/man1/zdiff.1.gz
S.5......  d /usr/share/man/man1/zforce.1.gz
S.5......  d /usr/share/man/man1/zgrep.1.gz
S.5......  d /usr/share/man/man1/zless.1.gz
S.5......  d /usr/share/man/man1/zmore.1.gz
S.5......  d /usr/share/man/man1/znew.1.gz

다음은 yum 변경 로그입니다. 다른 패키지를 편집했습니다.

    Loaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-
              : manager

Loading mirror speeds from cached hostfile

foreman-private-oracle-latest                              | 2.1 kB     00:00       

Resolving Dependencies
--> Running transaction check
---> Package gzip.x86_64 0:1.5-10.el7 will be updated
---> Package gzip.x86_64 0:1.5-11.el7_9 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package      Arch   Version            Repository                         Size
================================================================================
Updating:
gzip         x86_64 1.5-11.el7_9       foreman-private-oracle-latest 129 k

Transaction Summary
================================================================================
Upgrade  132 Packages

Total download size: 305 M
Downloading packages:
No Presto metadata available for foreman-private-oracle-latest

(37/132): gzip-1.5-11.el7_9.x86_64.rpm                     | 129 kB   00:00     

--------------------------------------------------------------------------------
Total                                               24 MB/s | 305 MB  00:12     

Running transaction check

Running transaction test

Transaction test succeeded
Running transaction
  Updating   : gzip-1.5-11.el7_9.x86_64                        36/264 
  Cleanup    : gzip-1.5-10.el7.x86_64                                   227/264 
  Verifying  : gzip-1.5-11.el7_9.x86_64                                  65/264 
  Verifying  : gzip-1.5-10.el7.x86_64                                   157/264 

Updated:                                    
  gzip.x86_64 0:1.5-11.el7_9  

답변1

문제를 발견하여 내 질문에 답변하고 있습니다.

다시 시작하기 전에 "동기화"를 실행하세요.

Oracle Linux 7.9는 AWS API 재시작 시 제대로 작동하지 않는 것으로 나타났습니다. 제가 사용하는 업데이트 도구는 yum 업데이트와 AWS API에서 재부팅이라는 두 단계를 수행합니다. 이렇게 하면 커널은 메모리에 버퍼링된 모든 데이터를 디스크에 동기화할 시간이 없기 때문에 새로 생성된 파일은 전혀 저장되지 않거나 내용이 없는 크기 0이 됩니다.

이 문제는 AWS API에서 다시 시작 프로세스를 수행할 때만 발생합니다. 운영 체제 다시 시작 명령을 사용해도 문제가 재현되지 않기 때문입니다.

관련 정보