From: "Michael Grover" <mgrover@secturion.com>
To: 'Ahmed Al-Mehdi' <ahmedalmehdi@gmail.com>, stgt@vger.kernel.org
Subject: RE: FW: Error when creating a logicalunit from a regular file
Date: Tue, 2 Jun 2015 18:39:14 -0600 [thread overview]
Message-ID: <002a01d09d95$b7b7d330$27277990$@secturion.com> (raw)
In-Reply-To: <CAKNWCPZ_Ub=wZPhZn_Dsd93ujMnv1pjotz9Rn+XFHBp+8w6qwg@mail.gmail.com>
Yes. Of course. Sorry about that! Run this to install semanage:
yum –y install policycoreutils-python
-----Original Message-----
From: Ahmed Al-Mehdi [mailto:ahmedalmehdi@gmail.com]
Sent: Tuesday, June 02, 2015 6:11 PM
To: Michael Grover; stgt@vger.kernel.org
Subject: Re: FW: Error when creating a logicalunit from a regular file
Hi Michael,
Thank you for the suggestion. I will look into trying it out. Just a bit of a background. I am running CentOS 7. I don't even have "semanage" installed by default, but I am sure I can install it. I looked into the man page of "semange" (option "fcontext") not sure what exactly the command is doing. Any idea?
Thank you,
Ahmed.
On Tue, Jun 2, 2015 at 4:14 PM, Michael Grover <mgrover@secturion.com> wrote:
> Ahmed,
>
> For some reason stgt is blocking my access to the mail server from this address, so I'm going around it.
>
> I had the exact same problem with CentOS 6.5 when I was trying to create some "file" drives. SELinux was denying iSCSI access to the files I was creating as drives in iSCSI. I ran the following commands:
>
> semanage fcontext –a –t tgtd_var_lib_t <drive_path> restorecon –Rv
> <drive_path>
>
> Then restarted tgt and all was well.
>
> Hope this helps!
>
>
> -----Original Message-----
> From: stgt-owner@vger.kernel.org [mailto:stgt-owner@vger.kernel.org]
> On Behalf Of Ahmed Al-Mehdi
> Sent: Tuesday, June 02, 2015 3:48 PM
> To: stgt@vger.kernel.org
> Subject: Error when creating a logicalunit from a regular file
>
> 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.
> --
> To unsubscribe from this list: send the line "unsubscribe stgt" in the
> body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
>
prev parent reply other threads:[~2015-06-03 0:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-02 21:47 Error when creating a logicalunit from a regular file Ahmed Al-Mehdi
[not found] ` <001201d09d89$f2b987f0$d82c97d0$@secturion.com>
2015-06-03 0:11 ` FW: " Ahmed Al-Mehdi
2015-06-03 0:39 ` Michael Grover [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='002a01d09d95$b7b7d330$27277990$@secturion.com' \
--to=mgrover@secturion.com \
--cc=ahmedalmehdi@gmail.com \
--cc=stgt@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox