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