2

I'm on debian 8, I have no a lot of knowledge on linux and the last time I used it it was a while again. (when systemd didn't exist).

When I do manually start the open-iscsi service the iSCSI drive is attached to the machine without issue (on /dev/sdb)

Now I'm trying to add it to the boot cycle.

So I make sure the service for open-iscsi is enabled with systemctl enable open-iscsi.service. When I did boot I don't see any log about the service. service open-iscsi status return me Active: inactive (dead), after a little search this probably mean nobody required it so it just didn't start it.

So now I'm trying to edit /etc/fstab to add the mounting and let systemd-fstab-generator generate the units.

I tried a couple of combinaison, best case scenario I got in the log is

mar 17 13:57:45 vm-sdbox5 systemd[1]: Reached target Network is Online.
.... (removed) ....
mar 17 13:59:03 vm-sdbox5 systemd[1]: Job dev-sdb1.device/start timed out.
mar 17 13:59:03 vm-sdbox5 systemd[1]: Timed out waiting for device dev-sdb1.device.
mar 17 13:59:03 vm-sdbox5 systemd[1]: Dependency failed for /mnt/iscsi/zvol.
mar 17 13:59:03 vm-sdbox5 systemd[1]: Dependency failed for Remote File Systems.
mar 17 13:59:03 vm-sdbox5 systemd[1]: Dependency failed for File System Check on /dev/sdb1.

Still no trace of open-iscsi.

Exemple of fstab I tried that I do remember :

/dev/sdb1       /mnt/iscsi/zvol        ext4    defaults,x-systemd.requires=open-iscsi.service,x-systemd.wants=open-iscsi.service,_netdev 0 3
/dev/sdb1       /mnt/iscsi/zvol        ext4    defaults,x-systemd.requires=open-iscsi.service,_netdev 0 3
/dev/sdb1       /mnt/iscsi/zvol        ext4    defaults,x-systemd.requires=open-iscsi.service,x-systemd.after=network-online.target 0 3
/dev/sdb1       /mnt/iscsi/zvol        ext4    defaults,noauto,x-systemd.requires=open-iscsi.service,x-systemd.wants=open-iscsi.service,_netdev 0 3

and a couple of different other combinaison by removing some parameters

I have issue to find where the unit are generated (to double check systemd-fstab-generator) to make sure my parameters are really used and to find them in systemctl list-dependencies

Thanks

EDIT:

Returned by systemctl show open-iscsi:

Restart=no
NotifyAccess=none
RestartUSec=100ms
TimeoutStartUSec=0
TimeoutStopUSec=0
WatchdogUSec=0
WatchdogTimestampMonotonic=0
StartLimitInterval=10000000
StartLimitBurst=5
StartLimitAction=none
FailureAction=none
PermissionsStartOnly=no
RootDirectoryStartOnly=no
RemainAfterExit=yes
GuessMainPID=no
MainPID=0
ControlPID=0
Result=success
ExecMainStartTimestampMonotonic=0
ExecMainExitTimestampMonotonic=0
ExecMainPID=0
ExecMainCode=0
ExecMainStatus=0
ExecStart={ path=/etc/init.d/open-iscsi ; argv[]=/etc/init.d/open-iscsi start ;$
ExecStop={ path=/etc/init.d/umountiscsi.sh ; argv[]=/etc/init.d/umountiscsi.sh $
ExecStop={ path=/etc/init.d/open-iscsi ; argv[]=/etc/init.d/open-iscsi stop ; i$
Slice=system.slice
CPUAccounting=no
CPUShares=18446744073709551615
StartupCPUShares=18446744073709551615
CPUQuotaPerSecUSec=(null)
BlockIOAccounting=no
BlockIOWeight=18446744073709551615
StartupBlockIOWeight=18446744073709551615
MemoryAccounting=no
MemoryLimit=18446744073709551615
DevicePolicy=auto
UMask=0022
LimitCPU=18446744073709551615
LimitFSIZE=18446744073709551615
LimitDATA=18446744073709551615
LimitSTACK=18446744073709551615
LimitCORE=18446744073709551615
LimitRSS=18446744073709551615
LimitNOFILE=4096
LimitAS=18446744073709551615
LimitNPROC=5792
LimitMEMLOCK=65536
LimitLOCKS=18446744073709551615
LimitSIGPENDING=5792
LimitMSGQUEUE=819200
LimitNICE=0
LimitRTPRIO=0
LimitRTTIME=18446744073709551615
OOMScoreAdjust=0
Nice=0
IOScheduling=0
CPUSchedulingPolicy=0
CPUSchedulingPriority=0
TimerSlackNSec=50000
CPUSchedulingResetOnFork=no
NonBlocking=no
StandardInput=null
StandardOutput=journal
StandardError=inherit
TTYReset=no
TTYVHangup=no
TTYVTDisallocate=no
SyslogPriority=30
SyslogLevelPrefix=yes
SecureBits=0
CapabilityBoundingSet=18446744073709551615
MountFlags=0
PrivateTmp=no
PrivateNetwork=no
PrivateDevices=no
ProtectHome=no
ProtectSystem=no
SameProcessGroup=no
IgnoreSIGPIPE=no
NoNewPrivileges=no
SystemCallErrorNumber=0
RuntimeDirectoryMode=0755
KillMode=process
KillSignal=15
SendSIGKILL=yes
SendSIGHUP=no
Id=open-iscsi.service
Names=open-iscsi.service
Wants=network-online.target remote-fs-pre.target system.slice
WantedBy=sysinit.target
Conflicts=shutdown.target
Before=sysinit.target shutdown.target remote-fs-pre.target
After=network-online.target local-fs.target mountnfs-bootclean.service systemd-journald.sock$
Description=LSB: Starts and stops the iSCSI initiator services and logs in to default targets
LoadState=loaded
ActiveState=inactive
SubState=dead
FragmentPath=/run/systemd/generator.late/open-iscsi.service
SourcePath=/etc/init.d/open-iscsi
DropInPaths=/lib/systemd/system/open-iscsi.service.d/fix-systemd-deps.conf
InactiveExitTimestampMonotonic=0
ActiveEnterTimestampMonotonic=0
ActiveExitTimestampMonotonic=0
InactiveEnterTimestampMonotonic=0
CanStart=yes
CanStop=yes
CanReload=no
CanIsolate=no
StopWhenUnneeded=no
RefuseManualStart=no
RefuseManualStop=no
AllowIsolate=no
DefaultDependencies=no
OnFailureJobMode=replace
IgnoreOnIsolate=no
IgnoreOnSnapshot=no
NeedDaemonReload=yes
JobTimeoutUSec=0
ConditionResult=no
ConditionTimestampMonotonic=0
Transient=no

find /etc/ -name *open-iscsi* (with a ls -al)

lrwxrwxrwx 1 root root 20 mar 16 22:12 /etc/rcS.d/S17open-iscsi -> ../init.d/open-iscsi
-rwxr-xr-x 1 root root 6494 mar 16 23:28 /etc/init.d/open-iscsi
lrwxrwxrwx 1 root root 20 mar 16 22:12 /etc/rc6.d/K02open-iscsi -> ../init.d/open-iscsi
lrwxrwxrwx 1 root root 20 mar 16 22:12 /etc/rc0.d/K02open-iscsi -> ../init.d/open-iscsi
lrwxrwxrwx 1 root root 20 mar 16 22:12 /etc/rc1.d/K02open-iscsi -> ../init.d/open-iscsi
0xCDCDCDCD
  • 121
  • 1
  • 4
  • What is the reason that it did not start? – Michael Hampton Mar 17 '19 at 18:44
  • If we are talking about the open-iscsi this is the whole reason i'm writhing here - systemd doesn't even attempt to start it. Rrom my understanding, if it would try (and fail) the status would have been failed (not inactive) and I would probably have a log from the service then. I even did try to add an echo/log_message (i think?) in the rc init script at the beginning of open-iscsi. I didn't see anything. (I did try the same thing on a service that I know was running and I did see my message popup in the log) – 0xCDCDCDCD Mar 18 '19 at 10:28
  • Is it enabled? You didn't post any output from its status except for `Active: inactive (dead)` – Michael Hampton Mar 18 '19 at 14:42
  • `systemctl is-enabled open-iscsi` return `enabled` – 0xCDCDCDCD Mar 20 '19 at 01:14
  • Oh, it's not a real systemd unit, it's generated over an ancient-style init script. Good luck. Well it's time to upgrade Debian anyway... – Michael Hampton Mar 20 '19 at 03:04
  • @0xCDCDCDCD did you ever find a solution? – guntbert Apr 13 '20 at 14:22
  • 1
    @guntbert unfortunately I gave up :( I'm kind of unlucky guy that always has issues. I do know it would have taken me a f*** lot of time just for _this_ issue without even talking with other issues I had/will have. The only information I could provide is I was trying to use iscsi on a raspberry (3?) (so I guess I was using raspbian). I don't know if this is raspbian or debian 8 that faked the systemd (assuming MichaelHampton is right) – 0xCDCDCDCD Apr 13 '20 at 16:42

1 Answers1

1

check that node.startup = automatic is present in /etc/iscsi/iscsid.conf

Chaoxiang N
  • 1,218
  • 4
  • 10