如何防止未连接的iscsi磁盘减慢PC启动速度?


1

我的ubuntu 16.04引导时间总是很长(几分钟)。当我跑步

systemd-analyze blame

第一行是

 2min 687ms open-iscsi.service

该机顶盒确实安装有iscsi驱动器(一个单独的NAS盒),但是我将该驱动器关闭了99%,这可以解释启动时间长的原因。

我的问题是,如何设置我的系统,以便不成功地等待iscsi connexion不会减慢启动过程?

我尝试过的事情:

我试图在/etc/iscsi/iscsid.conf中将replace_timeout设置为-1

node.session.timeo.replacement_timeout = -1

但这并没有阻止2分钟的等待时间。

编辑:其他信息

1 / / etc / fstab中没有该磁盘的条目

2 /服务状态提供了一些信息

$ service open-iscsi status
● open-iscsi.service - Login to default iSCSI targets
   Loaded: loaded (/lib/systemd/system/open-iscsi.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since mer. 2017-12-20 13:35:25 CET; 5h 23min ago
     Docs: man:iscsiadm(8)
           man:iscsid(8)
  Process: 1511 ExecStart=/sbin/iscsiadm -m node --loginall=automatic (code=exited, status=8)
  Process: 1500 ExecStartPre=/bin/systemctl --quiet is-active iscsid.service (code=exited, status=0/SUCCESS)
 Main PID: 1511 (code=exited, status=8)

déc. 20 13:35:25 hippo-camp iscsiadm[1511]: iscsiadm: initiator reported error (8 - connection timed out)
déc. 20 13:35:25 hippo-camp iscsiadm[1511]: iscsiadm: Could not login to [iface: default, target: whitebox.target-2, portal: 192.168.0.99,3260].
déc. 20 13:35:25 hippo-camp iscsiadm[1511]: iscsiadm: initiator reported error (8 - connection timed out)
déc. 20 13:35:25 hippo-camp iscsiadm[1511]: iscsiadm: Could not log into all portals
déc. 20 13:35:25 hippo-camp iscsiadm[1511]: Logging in to [iface: default, target: whitebox.target--1, portal: 192.168.0.99,3260] (multiple)
déc. 20 13:35:25 hippo-camp iscsiadm[1511]: Logging in to [iface: default, target: whitebox.target-2, portal: 192.168.0.99,3260] (multiple)
déc. 20 13:35:25 hippo-camp systemd[1]: open-iscsi.service: Main process exited, code=exited, status=8/n/a
déc. 20 13:35:25 hippo-camp systemd[1]: Failed to start Login to default iSCSI targets.
déc. 20 13:35:25 hippo-camp systemd[1]: open-iscsi.service: Unit entered failed state.
déc. 20 13:35:25 hippo-camp systemd[1]: open-iscsi.service: Failed with result 'exit-code'.

Answers:


1

解决方法:一种解决方法是禁用iscsi服务,如下所示:

systemctl disable iscsi.service
systemctl disable iscsid.service
systemctl stop isci.service
systemctl stop iscsid.service

更加令人满意的解决方案是能够使iscsi connexion在启动过程中不阻塞。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.