Error when creating a logicalunit from a regular file
Ahmed Al-Mehdi <[email protected]> Tue, 2 Jun 2015 14:47:48 -0700
| Newsgroups | org.kernel.vger.stgt |
|---|---|
| Message-ID | <CAKNWCPb+GZcSaJ1QB8OE392HCm6Xi6s3OvgFzVxNRiiRgM3S_w@mail.gmail.com> |
Hello,
I am trying to setup tgt on a CentOS 7 system. I created a target,
and enabled "ALL" initiators to login. When I try to create a logical
unit from a regular file (which I believe is supported and should
work), I get the error message "tgtadm: invalid request". In the
logs, I see an error message related to "Permission denied". Can
someone please help or give me pointers to debug this issue. Please
CC me in the response.
# tgtadm --mode target --op new --tid 1 --targetname target1
# tgtadm --mode target --op bind --tid 1 -I ALL
# tgtadm --mode target --op show
Target 1: target1
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
# ls -l /tmp/tgt_disk2_dd
-rwxrwxrwx. 1 root root 1048576 Jun 2 14:18 /tmp/tgt_disk2_dd
# tgtadm --lld iscsi --mode logicalunit --op new --tid 1 --lun 2 -b
/tmp/tgt_disk2_dd
tgtadm: invalid request
I see the following log entries:
Jun 02 14:39:46 unknown0800275C3F01 tgtd[5505]: tgtd: device_mgmt(246)
sz:23 params:path=/tmp/tgt_disk2_dd
Jun 02 14:39:46 unknown0800275C3F01 tgtd[5505]: tgtd: bs_thread_open(412) 16
Jun 02 14:39:46 unknown0800275C3F01 tgtd[5505]: tgtd:
backed_file_open(92) Could not open /tmp/tgt_disk2_dd, Permission
denied
Jun 02 14:39:46 unknown0800275C3F01 tgtd[5505]: tgtd:
backed_file_open(92) Could not open /tmp/tgt_disk2_dd, Permission
denied
Thank you very much in advance,
Ahmed.