Re: FW: Error when creating a logicalunit from a regular file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx [mailto:stgt-owner@xxxxxxxxxxxxxxx] On Behalf Of Ahmed Al-Mehdi
> Sent: Tuesday, June 02, 2015 3:48 PM
> To: stgt@xxxxxxxxxxxxxxx
> 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@xxxxxxxxxxxxxxx More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux