open-iscsi / targetcli-fb

Command shell for managing Linux LIO kernel target
Apache License 2.0
103 stars 69 forks source link

"Could not create Target in configFS" even with ConfigFS Mounted. (requires remount) #130

Open HarrisonPace opened 5 years ago

HarrisonPace commented 5 years ago

Details: Running Proxmox 5.3 (Debian 9): Open ISCSI Version: Target fabric module iscsi: Datera Inc. iSCSI Target v4.1.0 (https://packages.debian.org/stretch/admin/targetcli-fb)


Open-ISCSI fails to detect ConfigFS is mounted and only works after issuing mount -t configfs none /config returning:

mount: none is already mounted or /config busy none is already mounted on /config"

Fstab Entry:

configfs /config configfs defaults 0 0

Systemd Mount: (/lib/systemd/system/config.mount)

[Unit]
Description=Configuration File System Config
Documentation=https://www.kernel.org/doc/Documentation/filesystems/configfs/configfs.txt
Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
DefaultDependencies=no
ConditionPathExists=/config
ConditionCapability=CAP_SYS_RAWIO
After=systemd-modules-load.service
Before=sysinit.target

[Mount]
What=none
Where=/config
Type=configfs

[Install]
WantedBy=multi-user.target

I even added a cron entry on reboot to no avail: @reboot mount -t configfs none /config

I'm not sure why but it only works after issuing the mount command from shell. I used ls to test config was mounted correctly as shown:

root@Home-Server-U1:/config# ls pci_ep rdma_cm target


Really not sure what I can do as the only way I can get Open SCSI to work is to issue the mount command from shell upon reboot and then restart the Open-SCSI service, mounting via any other mechanism does not work and I can't understand why?

Any ideas what this might pertain to? Thanks

gonzoleeman commented 5 years ago

I believe the init() routine in rtslib-fb does a "modload(configfs)", as of version 2.1.fb61..