Re: iscsi root on Ubuntu

2008-05-02 Thread Tomasz Chmielewski

aspasia schrieb:
> 
> 
> On May 2, 7:14 am, Tomasz Chmielewski <[EMAIL PROTECTED]> wrote:
>> aspasia schrieb:
>>
>>
>> iSCSI initiators and dynamic IP address are two things which don't like
>> each other very much.
>>
>> It will work if you add a dhclient to your initrd, but with any IP
>> address change you'll run into problems.
>>
> 
> that's true ... although, in my pilot I have followed your script and
> statically assigned an IP address ...
> i finally got it to a point where it successfully chroot'ed and
> started the /sbin/init ...
> 
> however, at some point it loses its connection ... at some point:
> 
> 1.  I got an EXT3 fs corruption error; but when I try to mount that
> device from another host, the FS is good.
> 2.  I thereafter disabled the "dhcp" daemon (by just deleted the S-
> links in the rc scripts.. and those FS corrupt errors disappeared ...
> 3.  But still would somehow lose connection 
> 
> The golden image server was installed and configured to DHCP;  I
> checked the /etc/network/interfaces and its values were:
> auto lo
> iface lo inet loopback
> 
> I tried to change it "manually" and assign it a static address entry:
> auto eth0
> iface eth0 inet static
> address 192.168.17.27
> gateway 192.168.16.1
> netmask 255.255.240.0
> broadcast 192.168.31.255
> 
> Now that I boot it, I'm still somehow hanging ...

Is the IP the same as assigned in the PXE/tftp stage?

Can you ping when it's "hanged"?


> My question to you; when you prepared your root image, how was your
> server's networking configured, I am assuming static IP?

You mean iSCSI initiator's? Yeah, IP assigned is the same in the 
PXE/tftp stage as it is in the network configuration part.

For your information, it works correctly also on Debian here, which 
should be similar enough to Ubuntu.


> I'm
> wondering if I should go back to my golden build server and simply re-
> configure the build to assign a static IP address and then recopy the /
> etc/directory into the iscsi root image?

I don't think I understand correctly what you mean here.



-- 
Tomasz Chmielewski
http://wpkg.org

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: Target address redirect ignored

2008-05-02 Thread ptashek

> The bug in this thread is is just a dumb problem where discovery.c gets
> LOGIN_REDIRECT and treats it like success instead of following the new
> portal.

Great. So it's a bug then.
Does a patch exist, or is this the patch you have mentioned? :)


regards,
Lukasz

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: Target address redirect ignored

2008-05-02 Thread ptashek

> What target are you using?

Hi Mike,

AFAIR it's a Cisco MDS 9200 series, which then redirects to the
"proper" targets. I'm not sure what these are running on.

regards,
Lukasz

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: iscsi root on Ubuntu

2008-05-02 Thread aspasia



On May 2, 7:14 am, Tomasz Chmielewski <[EMAIL PROTECTED]> wrote:
> aspasia schrieb:
>
>
> iSCSI initiators and dynamic IP address are two things which don't like
> each other very much.
>
> It will work if you add a dhclient to your initrd, but with any IP
> address change you'll run into problems.
>

that's true ... although, in my pilot I have followed your script and
statically assigned an IP address ...
i finally got it to a point where it successfully chroot'ed and
started the /sbin/init ...

however, at some point it loses its connection ... at some point:

1.  I got an EXT3 fs corruption error; but when I try to mount that
device from another host, the FS is good.
2.  I thereafter disabled the "dhcp" daemon (by just deleted the S-
links in the rc scripts.. and those FS corrupt errors disappeared ...
3.  But still would somehow lose connection 

The golden image server was installed and configured to DHCP;  I
checked the /etc/network/interfaces and its values were:
auto lo
iface lo inet loopback

I tried to change it "manually" and assign it a static address entry:
auto eth0
iface eth0 inet static
address 192.168.17.27
gateway 192.168.16.1
netmask 255.255.240.0
broadcast 192.168.31.255

Now that I boot it, I'm still somehow hanging ...

My question to you; when you prepared your root image, how was your
server's networking configured, I am assuming static IP?  I'm
wondering if I should go back to my golden build server and simply re-
configure the build to assign a static IP address and then recopy the /
etc/directory into the iscsi root image?

Any thoughts?

thanks in advance.

- a.




> --
> Tomasz Chmielewskihttp://wpkg.org
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: can't start iscsid on 2.6.25.1

2008-05-02 Thread Tomasz Chmielewski

Konrad Rzeszutek schrieb:
> On Fri, May 02, 2008 at 04:33:42PM +0200, Tomasz Chmielewski wrote:
>> Konrad Rzeszutek schrieb:
 shmget(IPC_PRIVATE, 52, IPC_CREAT|IPC_EXCL|0644) = -1 ENOSYS (Function 
 not implemented)
>>> What OS under Xen are you running that doesn't have the shm* commands 
>>> implemented?
>>> That is your problem BTW.
>> Yeah, it looks to me I'm missing some kernel option - I started from a 
>> very minimalistic .config.
> 
> I believe you need these:
> 
> CONFIG_SYSVIPC=y
> CONFIG_SYSVIPC_SYSCTL=y

Indeed, this was it. This one does not seem to be needed (or is present 
in 2.6.25):

> CONFIG_SYSVIPC_COMPAT=y


> And obviously your glibc needs to be compiled with this support.

It used to work with 2.6.18, and I didn't change glibc.


>> I can't find the right one, though.
>>
>>
>> BTW, why does it work in the foreground?
> 
> There are two forks in the iSCSI daemon - one handling the iSCSI parts and 
> another handling
> asynchronously logging to syslog (or a file). The logging subsystem is 
> normally forked
> and the iSCSI part would would use semaphores to pass logging information. If 
> you run the daemon
> run it in the foreground it doesn't use the semaphores and synchronously 
> passes logging information.

Indeed.


-- 
Tomasz Chmielewski
http://wpkg.org

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: can't start iscsid on 2.6.25.1

2008-05-02 Thread Konrad Rzeszutek

On Fri, May 02, 2008 at 04:33:42PM +0200, Tomasz Chmielewski wrote:
> 
> Konrad Rzeszutek schrieb:
> >> shmget(IPC_PRIVATE, 52, IPC_CREAT|IPC_EXCL|0644) = -1 ENOSYS (Function 
> >> not implemented)
> > 
> > What OS under Xen are you running that doesn't have the shm* commands 
> > implemented?
> > That is your problem BTW.
> 
> Yeah, it looks to me I'm missing some kernel option - I started from a 
> very minimalistic .config.

I believe you need these:

CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_SYSVIPC_COMPAT=y

And obviously your glibc needs to be compiled with this support.
> 
> I can't find the right one, though.
> 
> 
> BTW, why does it work in the foreground?

There are two forks in the iSCSI daemon - one handling the iSCSI parts and 
another handling
asynchronously logging to syslog (or a file). The logging subsystem is normally 
forked
and the iSCSI part would would use semaphores to pass logging information. If 
you run the daemon
run it in the foreground it doesn't use the semaphores and synchronously passes 
logging information.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: Publishing iSER limitations

2008-05-02 Thread Pete Wyckoff

[EMAIL PROTECTED] wrote on Mon, 28 Apr 2008 11:20 -0500:
> Erez Zilber wrote:
>> Mike Christie wrote:
>>> Erez Zilber wrote:
>>>   
 This new thread summarizes and continues a discussion that we (Mike, Or
 and myself) had outside the list. This is what we have so far:

 * Having a parent device: commit
   62786b526687db54c6dc22a1786d6df8b03da3f3 in the bnx2i branch looks
   ok, and will solve the DMA mask problem. I think that it's cleaner
   than calling slave_alloc etc. However, this code cannot be used
   outside the bnx2i branch. I think that we need to create another
   patch (based on this one) to submit upstream. Mike - what do you
   think?
 
>>> I am going to push that code soon. Since it is not critical for 2.6.26 I 
>>> am waiting to push it for .27.
>>>   
>>
>> I agree - the DMA mask is not so urgent. However, as you said, Pete is
>> waiting with his patch. Do you want to post something in linux-scsi?
>
> Yeah, will do. I ccd him here too, so we could talk about the dma alignment 
> patch.

Sorry for the delay.  This commit id has changed, and I'm not
finding what you mean.  Perhaps this is the endpoint stuff,
which is good.

 * iSER alignment issue: I'm not sure if we can force our
   restrictions through scsi_host_template. Again, the restrictions are:
   o The 1st element must end at the page boundary.
   o The last element must start at the page boundary.
   o All other elements must be page aligned (i.e. start at the
 beginning of a page and end at the page boundary).

Can it be done using blk_queue_dma_alignment? pad_mask?
 
>>
>> I understand that IB's requirements are too difficult to force. I guess
>> that we will do something like:
>>
>> * If the scatterlist is aligned, just use it as is.
>> * If some elements at the beginning/end of the scatterlist are
>>   unaligned, we can copy only them (and use the rest of the
>>   scatterlist as is). We saw that sometimes (e.g. GFS), only the 1st
>>   element is unaligned, so copying the whole data is unnecessary.
>> * Else, copy the whole scatterlist to buffers that iSER allocates.
>>   This is what we do today with unaligned buffers.
>>
>
> Pete, we are discissing the dma_alignment patch you sent. Above are the dma 
> restrictions the iser driver has right now. For the 3rd requirement does 
> that mean we want to set the alignment to be page aligned right?

Erez's alignment rules leave out one case:  when the sg list
has only one element, there are no restrictions on start/end
alignment.

The iser alignment requirements are too complex to express with the
q->dma_alignment approach.  In iser, as Erez suggests, bouncing can
be done.  His second (*) would be a nice addition that would
definitely help some of our apps.

My patch "iscsi iser: remove DMA alignment restriction" changes
iser to make the alignment 0, rather than the default 512, to avoid
the bounce buffering in __blk_rq_map_user().  Else confirming
single-element or multi-element sg lists will be bounced
unnecessarily.  As bouncing already exists in iser, anything that
the block layer might do is purely duplicative, so it is best to
turn it off.  This can be done now.

Here it is for reference.  I updated the commentary; hopefully
it makes sense.  Expect some fuzz as this is against an older
2.6.25-rc4.

-- Pete

commit 47eaf146cde1ddd0a80aa45a1f50514f6a05b928
Author: Pete Wyckoff <[EMAIL PROTECTED]>
Date:   Fri May 2 10:31:58 2008 -0400

iscsi iser: remove block-layer DMA alignment restriction

iser has rather complex rules for data alignment that come from
its particular use of memory mapping hardware on IB.  iser uses
its own bouncing layer to satisfy these requirements.

This patch removes the 512-byte DMA alignment requirement that
is imposed by default at the block layer.  Without this change,
IO from userspace (through sg or bsg, for example) would be
bounced at the block layer even if that is not required by iser.

Signed-off-by: Pete Wyckoff <[EMAIL PROTECTED]>

diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c 
b/drivers/infiniband/ulp/iser/iscsi_iser.c
index be1b9fb..313f102 100644
--- a/drivers/infiniband/ulp/iser/iscsi_iser.c
+++ b/drivers/infiniband/ulp/iser/iscsi_iser.c
@@ -543,6 +543,12 @@ iscsi_iser_ep_disconnect(__u64 ep_handle)
iser_conn_terminate(ib_conn);
 }
 
+static int iscsi_iser_slave_configure(struct scsi_device *sdev)
+{
+   blk_queue_dma_alignment(sdev->request_queue, 0);
+   return 0;
+}
+
 static struct scsi_host_template iscsi_iser_sht = {
.module = THIS_MODULE,
.name   = "iSCSI Initiator over iSER, v." DRV_VER,
@@ -556,6 +562,7 @@ static struct scsi_host_template iscsi_iser_sht = {
.eh_device_reset_handler= iscsi_eh_device

Re: can't start iscsid on 2.6.25.1

2008-05-02 Thread Tomasz Chmielewski

Konrad Rzeszutek schrieb:
>> shmget(IPC_PRIVATE, 52, IPC_CREAT|IPC_EXCL|0644) = -1 ENOSYS (Function 
>> not implemented)
> 
> What OS under Xen are you running that doesn't have the shm* commands 
> implemented?
> That is your problem BTW.

Yeah, it looks to me I'm missing some kernel option - I started from a 
very minimalistic .config.

I can't find the right one, though.


BTW, why does it work in the foreground?


-- 
Tomasz Chmielewski
http://wpkg.org



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: can't start iscsid on 2.6.25.1

2008-05-02 Thread Konrad Rzeszutek

> shmget(IPC_PRIVATE, 52, IPC_CREAT|IPC_EXCL|0644) = -1 ENOSYS (Function 
> not implemented)

What OS under Xen are you running that doesn't have the shm* commands 
implemented?
That is your problem BTW.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



Re: iscsi root on Ubuntu

2008-05-02 Thread Tomasz Chmielewski

aspasia schrieb:
> 
> On Apr 29, 1:10 pm, Tomasz Chmielewski <[EMAIL PROTECTED]> wrote:
>> aspasia schrieb:
>>
>> If you're referring 
>> tohttp://wpkg.org/Diskless_/_remote_boot_with_Open-iSCSI, rootfs is
>> currently hardcoded.
>>
> 
> thanks ... yeah .. i remember your paper ... i am almost getting
> there ...
> 
> only thing i have to figure out is the ifconfig portion - your init
> script defines a static IP address, whereas in my environment I use
> DHCP ... I'll have to post in Ubuntu Forums 

iSCSI initiators and dynamic IP address are two things which don't like 
each other very much.

It will work if you add a dhclient to your initrd, but with any IP 
address change you'll run into problems.



-- 
Tomasz Chmielewski
http://wpkg.org



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---



can't start iscsid on 2.6.25.1

2008-05-02 Thread Tomasz Chmielewski

I can't start iscsid (2.0-869) on a 2.6.25.1 vanilla kernel, running as 
a Xen guest.

# iscsid -c /etc/iscsi/iscsid.conf
# echo $?
1

There is no iscsid process running.

Interesting is, it starts just fine in the foreground:

# iscsid -c /etc/iscsi/iscsid.conf -f -d 2
iscsid: transport class version 2.0-869. iscsid version 2.0-869
iscsid: InitiatorName=iqn.2006-12.net.syneticon:server.backup1
iscsid: InitiatorAlias=server.backup1
iscsid: Max file limits 1024 1024


Here is a strace when I try to start it in the background:

# strace iscsid -c /etc/iscsi/iscsid.conf
execve("/sbin/iscsid", ["iscsid", "-c", "/etc/iscsi/iscsid.conf"], [/* 
46 vars */]) = 0
brk(0)  = 0x806f000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 
0) = 0xb7fc7000
access("/etc/ld.so.preload", R_OK)  = -1 ENOENT (No such file or 
directory)
open("/etc/ld.so.cache", O_RDONLY)  = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=18092, ...}) = 0
mmap2(NULL, 18092, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7fc2000
close(3)= 0
open("/lib/i686/libc.so.6", O_RDONLY)   = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\360`\1"..., 
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1298800, ...}) = 0
mmap2(NULL, 1308112, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 
0) = 0xb7e82000
mmap2(0xb7fbc000, 12288, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x139) = 0xb7fbc000
mmap2(0xb7fbf000, 9680, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7fbf000
close(3)= 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 
0) = 0xb7e81000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7e816c0, 
limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, 
limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb7fbc000, 4096, PROT_READ)   = 0
mprotect(0xb7fe1000, 4096, PROT_READ)   = 0
munmap(0xb7fc2000, 18092)   = 0
rt_sigaction(SIGINT, {0x8065640, [], 0}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGPIPE, {0x8065640, [], 0}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGTERM, {0x8065640, [], 0}, {SIG_DFL}, 8) = 0
shmget(IPC_PRIVATE, 52, IPC_CREAT|IPC_EXCL|0644) = -1 ENOSYS (Function 
not implemented)
exit_group(1)   = ?
Process 6100 detached


-- 
Tomasz Chmielewski
http://wpkg.org

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~--~~~~--~~--~--~---