Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

iSCSI tgtd does not start properly on boot (works after service restart)

Featured Replies

Hi,

I'm using  Armbian 21.08.6 Bullseye on an Odroid HC2 (http://ix.io/3JUu). I set up tgt (Linux iSCSI) and everything works fine (clients can access the targets). The targets are stored on a btrfs volume.

fstab content:

UUID=4d27c22c-348e-4d96-8d6d-0bed3cc7f965		/	ext4	noatime,nodiratime,defaults,commit=600,errors=remount-ro	0 1
tmpfs /tmp tmpfs defaults,nosuid 0 0
/dev/disk/by-uuid/23e54a5b-e08b-49a9-af88-cffc88d9e84e		/srv/dev-disk-by-uuid-23e54a5b-e08b-49a9-af88-cffc88d9e84e	btrfs	defaults,nofail	0 2

However, when a reboot occurs, tgtd seems to not start properly:

  • Clients cannot access the targets.
  • tgtadm shows `backing store path: None`

Full output:

nas:~:# tgtadm --lld iscsi --mode target --op show
Target 1: iqn.2021-12.odroidxu4:test
    System information:
        Driver: iscsi
        State: ready
    I_T nexus information:
    LUN information:
        LUN: 0
            Type: controller
            SCSI ID: IET     00010000
            SCSI SN: beaf10
            Size: 0 MB, Block size: 1
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            SWP: No
            Thin-provisioning: No
            Backing store type: null
            Backing store path: None
            Backing store flags: 
    Account information:
    ACL information:
        ALL
Target 2: iqn.2021-12.odroidxu4:testf
    System information:
        Driver: iscsi
        State: ready
    I_T nexus information:
        I_T nexus: 1
            Initiator: iqn.1991-05.com.microsoft:sirius alias: none
            Connection: 1
                IP Address: 192.168.50.26
    LUN information:
        LUN: 0
            Type: controller
            SCSI ID: IET     00020000
            SCSI SN: beaf20
            Size: 0 MB, Block size: 1
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            SWP: No
            Thin-provisioning: No
            Backing store type: null
            Backing store path: None
            Backing store flags: 
    Account information:
    ACL information:
        ALL

However after restarting the tgtd with `systemctl restart tgt.service`, everything works fine again. tgtadm output: (Note that `Backing store path`is set).

nas:~:# tgtadm --lld iscsi --mode target --op show
Target 1: iqn.2021-12.odroidxu4:test
    System information:
        Driver: iscsi
        State: ready
    I_T nexus information:
    LUN information:
        LUN: 0
            Type: controller
            SCSI ID: IET     00010000
            SCSI SN: beaf10
            Size: 0 MB, Block size: 1
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            SWP: No
            Thin-provisioning: No
            Backing store type: null
            Backing store path: None
            Backing store flags: 
        LUN: 1
            Type: disk
            SCSI ID: IET     00010001
            SCSI SN: beaf11
            Size: 536871 MB, Block size: 512
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            SWP: No
            Thin-provisioning: No
            Backing store type: rdwr
            Backing store path: /srv/dev-disk-by-uuid-23e54a5b-e08b-49a9-af88-cffc88d9e84e/backup-nb-regina/test
            Backing store flags: 
    Account information:
    ACL information:
        ALL
Target 2: iqn.2021-12.odroidxu4:testf
    System information:
        Driver: iscsi
        State: ready
    I_T nexus information:
        I_T nexus: 1
            Initiator: iqn.1991-05.com.microsoft:sirius alias: none
            Connection: 1
                IP Address: 192.168.50.26
    LUN information:
        LUN: 0
            Type: controller
            SCSI ID: IET     00020000
            SCSI SN: beaf20
            Size: 0 MB, Block size: 1
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            SWP: No
            Thin-provisioning: No
            Backing store type: null
            Backing store path: None
            Backing store flags: 
        LUN: 1
            Type: disk
            SCSI ID: IET     00020001
            SCSI SN: beaf21
            Size: 1073742 MB, Block size: 512
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            SWP: No
            Thin-provisioning: No
            Backing store type: rdwr
            Backing store path: /srv/dev-disk-by-uuid-23e54a5b-e08b-49a9-af88-cffc88d9e84e/backup-nb-regina/testf
            Backing store flags: 
    Account information:
    ACL information:
        ALL

I worked around this issue by adding a `ExecStartPre=/bin/sleep 60` to the `tgt.service` unit.

However, I would like to solve the issue substantially. Does anybody have an idea how to debug/solve this?

 

Best,

exponentialverteilt

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.