open-iscsi / rtslib-fb

Python library for configuring the Linux kernel-based multiprotocol SCSI target (LIO)
Apache License 2.0
72 stars 90 forks source link

usb_gadget doesn't show up in targetcli list #172

Open JuniorJPDJ opened 3 years ago

JuniorJPDJ commented 3 years ago

I uncomented it in this line: https://github.com/open-iscsi/rtslib-fb/blob/33b174f313ba4f8aec2e2a159ff337ae7ca42cb8/rtslib/fabric.py#L470

Even tried to set path at myself like that:

self._path = "%s/%s" % (self.configfs_dir, "usb_f_tcm")

This is how this directory tree looks like:

$ ls /sys/module/target_core_mod/holders/                                                                                                                                                             
iscsi_target_mod
$ modprobe tcm_usb_gadget
$ cd /sys/module/target_core_mod/holders/
$ ls
iscsi_target_mod  usb_f_tcm
$ cd usb_f_tcm/
$ ls
coresize   holders    initsize   initstate  notes      refcnt     sections   taint      uevent
$ targetcli ls
o- / ......................................................................................................................... [...]
  o- backstores .............................................................................................................. [...]
  | o- block .................................................................................................. [Storage Objects: 0]
  | o- fileio ................................................................................................. [Storage Objects: 0]
  | o- pscsi .................................................................................................. [Storage Objects: 0]
  | o- ramdisk ................................................................................................ [Storage Objects: 0]
  o- iscsi ............................................................................................................ [Targets: 0]
  o- loopback ......................................................................................................... [Targets: 0]
  o- vhost ............................................................................................................ [Targets: 0]
  o- xen-pvscsi ....................................................................................................... [Targets: 0]