Yum 卡在“设置更新过程”

Yum 卡在“设置更新过程”

运行以下命令时,yum 会挂起设置更新过程,然后服务器关闭,应从面板重新启动。centos 6.5 /etc/yum.conf

[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=5
bugtracker_url=http://bugs.centos.org/set_project.php?project_id=16&ref=http://bugs.centos.org/bug_report_page.php?category=yum
distroverpkg=centos-release

#  This is the default, if you make this bigger yum won't see if the metadata
# is newer on the remote and so you'll "gain" the bandwidth of not having to
# download the new metadata and "pay" for it by yum not having correct
# information.
#  It is esp. important, to have correct metadata, for distributions like
# Fedora which don't keep old packages around. If you don't like this checking
# interupting your command line usage, it's much better to have something
# manually check the metadata once an hour (yum-updatesd will do this).
# metadata_expire=90m

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
exclude=apache* httpd* mod_* mysql* MySQL* da_* *ftp* exim* sendmail* php* bind-chroot*

使用 strace yum 更新

pread(10, "\0\0\0\0\1\0\0\0008\22\0\0007\22\0\0009\22\0\0\1\0\346\17\0\7code ("..., 4096, 19103744) = 4096
pread(10, "\0\0\0\0\1\0\0\0009\22\0\0008\22\0\0:\22\0\0\1\0\346\17\0\7ext (S"..., 4096, 19107840) = 4096
pread(10, "\0\0\0\0\1\0\0\0:\22\0\0009\22\0\0;\22\0\0\1\0\346\17\0\7ppropr"..., 4096, 19111936) = 4096
pread(10, "\0\0\0\0\1\0\0\0;\22\0\0:\22\0\0<\22\0\0\1\0\346\17\0\7of zer"..., 4096, 19116032) = 4096
pread(10, "\0\0\0\0\1\0\0\0<\22\0\0;\22\0\0=\22\0\0\1\0\346\17\0\7rlie) "..., 4096, 19120128) = 4096
pread(10, "\0\0\0\0\1\0\0\0=\22\0\0<\22\0\0>\22\0\0\1\0\346\17\0\7]\n- [n"..., 4096, 19124224) = 4096
pread(10, "\0\0\0\0\1\0\0\0>\22\0\0=\22\0\0?\22\0\0\1\0\346\17\0\7move g"..., 4096, 19128320) = 4096
pread(10, "\0\0\0\0\1\0\0\0?\22\0\0>\22\0\0@\22\0\0\1\0\346\17\0\7param "..., 4096, 19132416) = 4096
pread(10, "\0\0\0\0\1\0\0\0@\22\0\0?\22\0\0A\22\0\0\1\0\346\17\0\7dd FCo"..., 4096, 19136512) = 4096
pread(10, "\0\0\0\0\1\0\0\0A\22\0\0@\22\0\0B\22\0\0\1\0\346\17\0\7driver"..., 4096, 19140608) = 4096
pread(10, 0x7f857fd20c50, 4096, 19144704) = -1 EIO (Input/output error)
lseek(10, 19144704, SEEK_SET)           = 19144704
read(10, 0x7f857fd20c50, 4096)          = -1 EIO (Input/output error)
read(10, 0x7f857fd20c50, 4096)          = -1 EIO (Input/output error)
read(10, 0x7f857fd20c50, 4096)          = -1 EIO (Input/output error)
read(10, 0x7f857fd20c50, 4096)          = -1 EIO (Input/output error)
read(10, 0x7f857fd20c50, 4096)          = -1 EIO (Input/output error)
read(10, 0x7f857fd20c50, 4096)          = -1 EIO (Input/output error)
read(10, 0x7f857fd20c50, 4096)          = -1 EIO (Input/output error)
read(10, 0x7f857fd20c50, 4096)          = -1 EIO (Input/output error)
read(10, 0x7f857fd20c50, 4096)          = -1 EIO (Input/output error)
read(10, 0x7f857fd20c50, 4096)          = -1 EIO (Input/output error)
read(10, 0x7f857fd20c50, 4096)          = -1 EIO (Input/output error)
read(10, 0x7f857fd20c50, 4096)          = -1 EIO (Input/output error)
read(10, 0x7f857fd20c50, 4096)          = -1 EIO (Input/output error)
read(10, 0x7f857fd20c50, 4096)          = -1 EIO (Input/output error)
...

问题是什么 ?!

答案1

我相信您很可能有一个 NFS 挂载没有响应。当我的一个 NFS 挂载没有响应时,我也遇到了同样的问题。运行:

$ sudo mount

看看它是否挂起。如果是这种情况,您可能必须停止有问题的 nfs 客户端进程(终止该进程)。尝试查看哪个进程可能导致问题。

$ sudo lsof | grep nfs # or something that might yield nfs client file descriptors and their PIDs

然后从您的 中排除问题条目/etc/fstab。最坏的情况是,您可能需要尝试并使用 中的条目进行搜索/etc/fstab

我的看法。

相关内容