[SOLVED] iet: iscsi_trgt: open_path(119) Can't open /dev/blah -2
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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,
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.