LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   iet: iscsi_trgt: open_path(119) Can't open /dev/blah -2 (http://www.linuxquestions.org/questions/linux-server-73/iet-iscsi_trgt-open_path-119-cant-open-dev-blah-2-a-4175443801/)

eantoranz 01-02-2013 07:46 AM

iet: iscsi_trgt: open_path(119) Can't open /dev/blah -2
 
Hi!

I'm trying to set up a pacemaker-based cluster using a SAN.

I have added the iSCSITarget resource and now I'm trying to set up a iSCSILogicalUnit. So far, I've been unable to do it with pacemaker so I decided to take matters into my own hands and I'm doing things by hand. So I've reached the point where I can call the ietadm command where the iscsi LUN is set up.

Code:

root@cluster1:/usr/lib/ocf# ietadm --op new --tid=1 --lun=1 --params Path=/dev/sdc,Type=fileio,ScsiId=default,ScsiSN=c21f969b,
Operation not permitted.

On syslog I get this:
Code:

Jan  2 09:08:13 cluster1 kernel: [ 1663.626555] iscsi_trgt: open_path(119) Can't open /dev/sdc -2
Jan  2 09:08:13 cluster1 kernel: [ 1663.711196] iscsi_trgt: fileio_attach(283) -2
Jan  2 09:08:13 cluster1 ietd: Can't create a logical unit 2 1 1 Path=/dev/sdc,Type=fileio,ScsiId=default,ScsiSN=c21f969b,

What's going on over here? Thanks in advance

eantoranz 01-02-2013 08:02 AM

Ok.... apparently the "path" is not just any desired device I want it to be called once set up. From ietadm man page:

Code:

add a new logical unit with [lun] to specific target with [id]. The logical unit is offered to the initiators. [path] must be block device files (including LVM and RAID devices) or regular files.
So I created a regular file in my FS and then I reissued the command with the new path and it worked. But I can't see the device yet:

Code:

Jan  2 09:27:57 cluster1 iSCSILogicalUnit[3373]: DEBUG: Calling ietadm --op new --tid=1 --lun=1 --params Path=/usr/local/sanoswww,Type=fileio,ScsiId=sanwwwsanos,ScsiSN=151c9bde,
Jan  2 09:27:57 cluster1 iSCSILogicalUnit[3373]: DEBUG: Exit code 0
Jan  2 09:27:57 cluster1 iSCSILogicalUnit[3373]: DEBUG: Command output: ""

Sweet! But the san resource is not anywhere to be found if you ask me:

Code:

root@cluster1:/usr/lib/ocf# fdisk -lu

Disk /dev/sda: 10.5 GB, 10485760000 bytes
255 heads, 63 sectors/track, 1274 cylinders, total 20480000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0008089e

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *        2046    16623615    8310785    5  Extended
/dev/sda5            2048      999423      498688  82  Linux swap / Solaris
/dev/sda6        1001472    16623615    7811072  83  Linux

So, where's the logical unit?

eantoranz 01-02-2013 09:01 AM

I know what's going on. ietadm (and iSCSITarget/iSCSILogicalUnit in pacemaker) are use to set up target/logical units on the server/san, not on the initiator/client. In other words, I'm not doing the right thing. I needed to setup a ocf:heartbeat:iscsi resourcein pacemaker.


All times are GMT -5. The time now is 05:12 PM.