* mkdir: cannot create directory `/sys/kernel/config/target/iscsi': Invalid argument
@ 2011-07-19 15:17 Raju
2011-09-16 16:09 ` Douglas Gilbert
0 siblings, 1 reply; 5+ messages in thread
From: Raju @ 2011-07-19 15:17 UTC (permalink / raw)
To: linux-scsi
Hi,
I can't able create an iscsi target because of some problem in configfs:
Below are the steps I followed in Debian Lenny(upgraded kernel to 2.6.39.2):
#!/bin/sh
# BEGIN CONFIG FOR CONFIGFS USAGE
modprobe configfs
mount -t configfs none /sys/kernel/config
# END CONFIG FOR CONFIGFS USAGE
# BEGIN CONFIGFS CODE FOR GENERIC TARGET ENGINE
modprobe target_core_mod
export CONFIGFS=/sys/kernel/config/
export TARGET=/sys/kernel/config/target/core/
export FABRIC=/sys/kernel/config/target/iscsi/
# END CONFIGFS CODE FOR GENERIC TARGET ENGINE
# START RAMDISK SUBSYSTEM PLUGIN OBJECTS
mkdir -p $TARGET/rd_mcp_0/ramdisk
echo rd_pages=32768 > $TARGET/rd_mcp_0/ramdisk/control
echo 1 > $TARGET/rd_mcp_0/ramdisk/enable
# END RAMDISK SUBSYSTEM PLUGIN OBJECTS
# BEGIN CONFIGFS CODE FOR LINUX ISCSI TARGET (LIO-TARGET)
DEF_IQN="iqn.2003-01.org.linux-iscsi.target.i686:sn.e475ed6fcdd0"
# Define the first iSCSI Network Portal
PORTAL1="10.0.0.1:3260"
# The first mkdir(2) to $FABRIC will load iscsi_target_mod
mkdir -p "$FABRIC/$DEF_IQN/tpgt_1/np/$PORTAL1"
mkdir: cannot create directory `/sys/kernel/config/target/iscsi':
Invalid argument
AND KERNEL LOG:
[10443.799266] CORE_HBA[0] - TCM Ramdisk HBA Driver v4.0 on Generic
Target CoreStack v4.0.0-rc7-ml
[10443.799272] CORE_HBA[0] - Attached Ramdisk HBA: 0 to Generic Target
Core TCQDepth: 256 MaxSectors: 1024
[10443.799278] CORE_HBA[1] - Attached HBA to Generic Target Core
[10443.799329] Target_Core_ConfigFS: Allocated struct se_subsystem_dev:
f4ee1000se_dev_su_ptr: f4e3e2c0
[10443.800370] Missing rd_pages= parameter
[10443.805761] Target_Core_ConfigFS: REGISTER-> group:f8552220 name:iscsi
[10443.838505] target_core_get_fabric() failed for iscsi
[10443.841826] Target_Core_ConfigFS: REGISTER-> group:f8552220 name:iscsi
[10443.875313] target_core_get_fabric() failed for iscsi
[10443.878496] Target_Core_ConfigFS: REGISTER-> group:f8552220 name:iscsi
[10443.910039] target_core_get_fabric() failed for iscsi
[10443.921684] Target_Core_ConfigFS: REGISTER-> group:f8552220 name:iscsi
[10443.951926] target_core_get_fabric() failed for iscsi
Please suggest any idea,
Thanks,
Raju.
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: mkdir: cannot create directory `/sys/kernel/config/target/iscsi': Invalid argument
2011-07-19 15:17 mkdir: cannot create directory `/sys/kernel/config/target/iscsi': Invalid argument Raju
@ 2011-09-16 16:09 ` Douglas Gilbert
2011-09-16 17:05 ` Douglas Gilbert
0 siblings, 1 reply; 5+ messages in thread
From: Douglas Gilbert @ 2011-09-16 16:09 UTC (permalink / raw)
To: Raju; +Cc: linux-scsi, Nicholas A. Bellinger
ping ....
Could some target folks please answer the following question?
I get the same show stopper on lk 3.0.4 :
root@test:/sys/kernel/config# mkdir target
mkdir: cannot create directory `target': No such file or directory
Doug Gilbert
On 11-07-19 11:17 AM, Raju wrote:
> Hi,
> I can't able create an iscsi target because of some problem in configfs:
>
>
> Below are the steps I followed in Debian Lenny(upgraded kernel to 2.6.39.2):
>
> #!/bin/sh
> # BEGIN CONFIG FOR CONFIGFS USAGE
> modprobe configfs
> mount -t configfs none /sys/kernel/config
> # END CONFIG FOR CONFIGFS USAGE
>
> # BEGIN CONFIGFS CODE FOR GENERIC TARGET ENGINE
> modprobe target_core_mod
> export CONFIGFS=/sys/kernel/config/
> export TARGET=/sys/kernel/config/target/core/
> export FABRIC=/sys/kernel/config/target/iscsi/
> # END CONFIGFS CODE FOR GENERIC TARGET ENGINE
>
> # START RAMDISK SUBSYSTEM PLUGIN OBJECTS
> mkdir -p $TARGET/rd_mcp_0/ramdisk
> echo rd_pages=32768> $TARGET/rd_mcp_0/ramdisk/control
> echo 1> $TARGET/rd_mcp_0/ramdisk/enable
> # END RAMDISK SUBSYSTEM PLUGIN OBJECTS
>
> # BEGIN CONFIGFS CODE FOR LINUX ISCSI TARGET (LIO-TARGET)
> DEF_IQN="iqn.2003-01.org.linux-iscsi.target.i686:sn.e475ed6fcdd0"
> # Define the first iSCSI Network Portal
> PORTAL1="10.0.0.1:3260"
> # The first mkdir(2) to $FABRIC will load iscsi_target_mod
> mkdir -p "$FABRIC/$DEF_IQN/tpgt_1/np/$PORTAL1"
> mkdir: cannot create directory `/sys/kernel/config/target/iscsi':
> Invalid argument
>
>
> AND KERNEL LOG:
>
> [10443.799266] CORE_HBA[0] - TCM Ramdisk HBA Driver v4.0 on Generic
> Target CoreStack v4.0.0-rc7-ml
> [10443.799272] CORE_HBA[0] - Attached Ramdisk HBA: 0 to Generic Target
> Core TCQDepth: 256 MaxSectors: 1024
> [10443.799278] CORE_HBA[1] - Attached HBA to Generic Target Core
> [10443.799329] Target_Core_ConfigFS: Allocated struct se_subsystem_dev:
> f4ee1000se_dev_su_ptr: f4e3e2c0
> [10443.800370] Missing rd_pages= parameter
> [10443.805761] Target_Core_ConfigFS: REGISTER-> group:f8552220 name:iscsi
> [10443.838505] target_core_get_fabric() failed for iscsi
> [10443.841826] Target_Core_ConfigFS: REGISTER-> group:f8552220 name:iscsi
> [10443.875313] target_core_get_fabric() failed for iscsi
> [10443.878496] Target_Core_ConfigFS: REGISTER-> group:f8552220 name:iscsi
> [10443.910039] target_core_get_fabric() failed for iscsi
> [10443.921684] Target_Core_ConfigFS: REGISTER-> group:f8552220 name:iscsi
> [10443.951926] target_core_get_fabric() failed for iscsi
>
>
>
> Please suggest any idea,
>
>
> Thanks,
> Raju.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mkdir: cannot create directory `/sys/kernel/config/target/iscsi': Invalid argument
2011-09-16 16:09 ` Douglas Gilbert
@ 2011-09-16 17:05 ` Douglas Gilbert
2011-09-16 19:29 ` Nicholas A. Bellinger
0 siblings, 1 reply; 5+ messages in thread
From: Douglas Gilbert @ 2011-09-16 17:05 UTC (permalink / raw)
To: linux-scsi; +Cc: Nicholas A. Bellinger
Well I can answer my own question.
configfs doesn't seem to be mounted at /sys/kernel/config
and even when it is, superuser cannot create a directory
there. So mount configfs somewhere else:
mount -t configfs none /tmp/config
Then in reference to this page:
http://linux-iscsi.org/wiki/Target/configFS
change this line:
export TARGET=/sys/kernel/config/target/core/
to
export TARGET=/tmp/config/target/core/
then continue.
BTW The target infrastructure creates this noise in the log:
"Unable to load target_core_stgt"
There is no such module that I can see.
And I still can't do what I want: to use the target
infrastructure to make a disk image in a file look
like a SCSI device on the local machine. No iSCSI,
SRP, FCxxx, SAS, UAS nor SOP ... just _SCSI_ !!
Doug Gilbert
On 11-09-16 12:09 PM, Douglas Gilbert wrote:
> ping ....
>
> Could some target folks please answer the following question?
>
> I get the same show stopper on lk 3.0.4 :
>
> root@test:/sys/kernel/config# mkdir target
> mkdir: cannot create directory `target': No such file or directory
>
> Doug Gilbert
>
>
> On 11-07-19 11:17 AM, Raju wrote:
>> Hi,
>> I can't able create an iscsi target because of some problem in configfs:
>>
>>
>> Below are the steps I followed in Debian Lenny(upgraded kernel to 2.6.39.2):
>>
>> #!/bin/sh
>> # BEGIN CONFIG FOR CONFIGFS USAGE
>> modprobe configfs
>> mount -t configfs none /sys/kernel/config
>> # END CONFIG FOR CONFIGFS USAGE
>>
>> # BEGIN CONFIGFS CODE FOR GENERIC TARGET ENGINE
>> modprobe target_core_mod
>> export CONFIGFS=/sys/kernel/config/
>> export TARGET=/sys/kernel/config/target/core/
>> export FABRIC=/sys/kernel/config/target/iscsi/
>> # END CONFIGFS CODE FOR GENERIC TARGET ENGINE
>>
>> # START RAMDISK SUBSYSTEM PLUGIN OBJECTS
>> mkdir -p $TARGET/rd_mcp_0/ramdisk
>> echo rd_pages=32768> $TARGET/rd_mcp_0/ramdisk/control
>> echo 1> $TARGET/rd_mcp_0/ramdisk/enable
>> # END RAMDISK SUBSYSTEM PLUGIN OBJECTS
>>
>> # BEGIN CONFIGFS CODE FOR LINUX ISCSI TARGET (LIO-TARGET)
>> DEF_IQN="iqn.2003-01.org.linux-iscsi.target.i686:sn.e475ed6fcdd0"
>> # Define the first iSCSI Network Portal
>> PORTAL1="10.0.0.1:3260"
>> # The first mkdir(2) to $FABRIC will load iscsi_target_mod
>> mkdir -p "$FABRIC/$DEF_IQN/tpgt_1/np/$PORTAL1"
>> mkdir: cannot create directory `/sys/kernel/config/target/iscsi':
>> Invalid argument
>>
>>
>> AND KERNEL LOG:
>>
>> [10443.799266] CORE_HBA[0] - TCM Ramdisk HBA Driver v4.0 on Generic
>> Target CoreStack v4.0.0-rc7-ml
>> [10443.799272] CORE_HBA[0] - Attached Ramdisk HBA: 0 to Generic Target
>> Core TCQDepth: 256 MaxSectors: 1024
>> [10443.799278] CORE_HBA[1] - Attached HBA to Generic Target Core
>> [10443.799329] Target_Core_ConfigFS: Allocated struct se_subsystem_dev:
>> f4ee1000se_dev_su_ptr: f4e3e2c0
>> [10443.800370] Missing rd_pages= parameter
>> [10443.805761] Target_Core_ConfigFS: REGISTER-> group:f8552220 name:iscsi
>> [10443.838505] target_core_get_fabric() failed for iscsi
>> [10443.841826] Target_Core_ConfigFS: REGISTER-> group:f8552220 name:iscsi
>> [10443.875313] target_core_get_fabric() failed for iscsi
>> [10443.878496] Target_Core_ConfigFS: REGISTER-> group:f8552220 name:iscsi
>> [10443.910039] target_core_get_fabric() failed for iscsi
>> [10443.921684] Target_Core_ConfigFS: REGISTER-> group:f8552220 name:iscsi
>> [10443.951926] target_core_get_fabric() failed for iscsi
>>
>>
>>
>> Please suggest any idea,
>>
>>
>> Thanks,
>> Raju.
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mkdir: cannot create directory `/sys/kernel/config/target/iscsi': Invalid argument
2011-09-16 17:05 ` Douglas Gilbert
@ 2011-09-16 19:29 ` Nicholas A. Bellinger
2011-09-16 19:41 ` James Bottomley
0 siblings, 1 reply; 5+ messages in thread
From: Nicholas A. Bellinger @ 2011-09-16 19:29 UTC (permalink / raw)
To: dgilbert; +Cc: linux-scsi, Jerome Martin
On Fri, 2011-09-16 at 13:05 -0400, Douglas Gilbert wrote:
> Well I can answer my own question.
> configfs doesn't seem to be mounted at /sys/kernel/config
> and even when it is, superuser cannot create a directory
> there. So mount configfs somewhere else:
>
> mount -t configfs none /tmp/config
This should actually be:
mount -t configfs configfs /sys/kernel/config
>
> Then in reference to this page:
> http://linux-iscsi.org/wiki/Target/configFS
>
> change this line:
> export TARGET=/sys/kernel/config/target/core/
> to
> export TARGET=/tmp/config/target/core/
> then continue.
>
> BTW The target infrastructure creates this noise in the log:
> "Unable to load target_core_stgt"
> There is no such module that I can see.
>
>
> And I still can't do what I want: to use the target
> infrastructure to make a disk image in a file look
> like a SCSI device on the local machine. No iSCSI,
> SRP, FCxxx, SAS, UAS nor SOP ... just _SCSI_ !!
>
I just sent an email off-list with the various wiki pointers to tcm_loop
for local SCSI LLD device access.
Using the rtsadmin shell is definately the easiest way to configure
target core backends and tcm_loop target ports. Installing this from
www.risingtidesystems.com/git source is still a bit challenging atm, but
we'd be happy to send you an rtsadmin-frozen build offlist for your own
use. Please let us know if you prefer rpm or debs. ;)
--nab
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: mkdir: cannot create directory `/sys/kernel/config/target/iscsi': Invalid argument
2011-09-16 19:29 ` Nicholas A. Bellinger
@ 2011-09-16 19:41 ` James Bottomley
0 siblings, 0 replies; 5+ messages in thread
From: James Bottomley @ 2011-09-16 19:41 UTC (permalink / raw)
To: nab; +Cc: dgilbert, linux-scsi, Jerome Martin
On Fri, 2011-09-16 at 12:29 -0700, Nicholas A. Bellinger wrote:
> On Fri, 2011-09-16 at 13:05 -0400, Douglas Gilbert wrote:
> > Well I can answer my own question.
> > configfs doesn't seem to be mounted at /sys/kernel/config
> > and even when it is, superuser cannot create a directory
> > there. So mount configfs somewhere else:
> >
> > mount -t configfs none /tmp/config
>
> This should actually be:
>
> mount -t configfs configfs /sys/kernel/config
Well, not really; they're both equally valid. For pseudo mounts which
have no underlying device, the standard
mount -t <type> <device> <mount point>
Convention has 'none' as the <device> because <device> is just ignored
by the kernel. The only reason for not choosing 'none' is that the
error messages tend to use the <device> (which does go into the mtab),
so if you later try to umount and something is using the mount point you
can get a funny looking error message
none busy
However, most versions of umount have been fixed to report the <mount
point> instead, so even this potential issue is moot.
James
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-09-16 19:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-19 15:17 mkdir: cannot create directory `/sys/kernel/config/target/iscsi': Invalid argument Raju
2011-09-16 16:09 ` Douglas Gilbert
2011-09-16 17:05 ` Douglas Gilbert
2011-09-16 19:29 ` Nicholas A. Bellinger
2011-09-16 19:41 ` James Bottomley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox