패키지 업그레이드로 인해 데이터베이스 충돌 발생

패키지 업그레이드로 인해 데이터베이스 충돌 발생

정말 이상한 종속성 합류로 인해 이상한 데이터베이스 충돌이 발생했습니다. 문맥:

  • 센트OS 7.9
  • LVM2-2.02
  • Postgresql 12, LVM 볼륨에 데이터 볼륨 포함, XFS 형식
  • 체계화된
  • dbus

시스템이 안정적으로 작동하고 데이터베이스가 정상적으로 실행되는 동안 yum update.업데이트 중에 데이터베이스가 탑재된 볼륨을 포함하여 여러 볼륨이 탑재 해제되었습니다.이로 인해 다음과 같은 패닉 메시지가 발생했습니다.

2021-08-12 21:12:35.418 CEST  PANIC: could not open file ""/var/lib/pgsql/current/data/global/pg_control"": No such file or directory

저널링된 로그에는 이 충돌이 발생하기 몇 분 전에 꽤 많은 패키지가 업데이트되었음을 ​​보여줍니다. postgresql에는 범위를 좁힐 수 있는 중간 로그 메시지가 없습니다.

분명히 뭔가가 /etc/fstab잘못 구성되어 있지만 yum 업데이트가 실행되기 오래 전에 다음 메시지가 표시될 수 있습니다.

Aug 12 18:27:32 git.uibk.ac.at systemd-fstab-generator[19273]: Checking was requested for "none", but it is not a device.

그리고 업데이트 중에 자주 발생합니다. 그래서 저는 이것을 붉은 청어라고 생각합니다.

Systemd가 업데이트되고 다시 시작됩니다.

Aug 12 21:11:46 git.uibk.ac.at systemd[1]: Reexecuting.
Aug 12 21:11:46 git.uibk.ac.at systemd[1]: systemd 219 running in system mode. (+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 -SECCOMP +BLKID +ELFUTILS +KMOD +IDN)

충돌이 일어나기 45초 전입니다. 그 직후에 다음을 볼 수 있습니다.

Aug 12 21:11:46 git.uibk.ac.at systemd[1]: [/etc/systemd/system/rsyslog.service.d/partof-journald.conf:2] Assignment outside of section. Ignoring.
Aug 12 21:11:46 git.uibk.ac.at systemd[1]: Stopped target Remote File Systems.
Aug 12 21:11:46 git.uibk.ac.at systemd[1]: Stopping Remote File Systems.
Aug 12 21:11:46 git.uibk.ac.at systemd[1]: Unset automount mnt-git\x2drepodata.automount.
Aug 12 21:11:46 git.uibk.ac.at systemd[1]: Stopping mnt-git\x2drepodata.automount.
Aug 12 21:11:46 git.uibk.ac.at systemd[1]: Set up automount mnt-git\x2drepodata.automount.
Aug 12 21:11:46 git.uibk.ac.at systemd[1]: Reached target Remote File Systems.
Aug 12 21:11:46 git.uibk.ac.at systemd[1]: Unset automount Arbitrary Executable File Formats File System Automount Point.
Aug 12 21:11:46 git.uibk.ac.at systemd[1]: Stopping Arbitrary Executable File Formats File System Automount Point.
Aug 12 21:11:46 git.uibk.ac.at systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
Aug 12 21:11:46 git.uibk.ac.at systemd[1]: Stopped target Local File Systems.
Aug 12 21:11:46 git.uibk.ac.at systemd[1]: Stopping Local File Systems.
Aug 12 21:11:46 git.uibk.ac.at systemd[1]: Unset automount var-lib-pgsql.automount.
Aug 12 21:11:46 git.uibk.ac.at systemd[1]: Stopping var-lib-pgsql.automount.
Aug 12 21:11:46 git.uibk.ac.at systemd[1]: var-lib-pgsql.automount: Directory /var/lib/pgsql to mount over is not empty, mounting anyway.

왜 왜???? .... 왜이이이이이이이이!!!! 어쨌든 제대로 작동하지 않은 것 같습니다.

Aug 12 21:11:46 git.uibk.ac.at systemd[1]: Set up automount var-lib-pgsql.automount.
Aug 12 21:11:46 git.uibk.ac.at systemd[1]: Mounting /var/lib/pgsql/current/pg_stat_tmp...
Aug 12 21:11:46 git.uibk.ac.at systemd[1]: Mounted /var/lib/pgsql/current/pg_stat_tmp.
Aug 12 21:11:46 git.uibk.ac.at systemd[1]: Reached target Local File Systems.

이 볼륨도 곧 마운트되지 않았으며 복구 프로세스 중에 수동으로 다시 마운트해야 했습니다.

PANIC 이전에 몇 가지 다른 메시지가 나타납니다.

Aug 12 21:12:32 git.uibk.ac.at yum[12642]: Installed: kernel-3.10.0-1160.36.2.el7.x86_64
Aug 12 21:12:33 git.uibk.ac.at yum[12642]: Updated: 2:vim-enhanced-7.4.629-8.el7_9.x86_64
Aug 12 21:12:33 git.uibk.ac.at systemd[1]: Reloading.
Aug 12 21:12:34 git.uibk.ac.at yum[12642]: Updated: 7:lvm2-2.02.187-6.el7_9.5.x86_64
Aug 12 21:12:34 git.uibk.ac.at yum[12642]: Updated: 1:nfs-utils-1.3.0-0.68.el7.1.x86_64

그리고 이상하게도 이 두 가지는 올바른 순서가 아닙니다.

Aug 12 21:12:35 git.uibk.ac.at systemd[1]: postgresql-12.service: main process exited, code=exited, status=1/FAILURE
Aug 12 21:12:35 git.uibk.ac.at kernel: XFS (dm-6): Unmounting Filesystem

dm-6은현재(재부팅 후) 스왑 볼륨이 그래서...?

일반적인 용의자를 제외한 볼륨 목록은 다음과 같습니다.

/dev/mapper/vgdata-git--db on /var/lib/pgsql type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
/dev/mapper/vgroot-lvroot on / type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
/dev/mapper/vgroot-lvtmp on /tmp type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
/dev/mapper/vgroot-lvvar on /var type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
/dev/vda1 on /boot type ext4 (rw,relatime,seclabel,data=ordered)
nfsshare:/git/qt-gitlab on /mnt/git-repodata type nfs (rw,relatime,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountport=635,mountproto=udp,local_lock=none)
none on /var/lib/pgsql/12/pg_stat_tmp type tmpfs (rw,relatime,seclabel,size=16384k,mode=770,uid=102,gid=26)
systemd-1 on /mnt/git-repodata type autofs (rw,relatime,fd=37,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=13188)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=31,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=13146)
systemd-1 on /var/lib/pgsql type autofs (rw,relatime,fd=41,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=13753)

나는 최신 Linux 시스템에서 이런 일이 발생하는 것을 본 적이 없습니다. 업데이트되거나 다시 실행될 때 systemd의 "예상되는 동작"입니까?

관련 정보