2002-08-07 21:34:53

by Eli Carter

[permalink] [raw]
Subject: Idle curiosity: Acting as a SCSI target

Based on a conversation I had recently, my curiosity got piqued...

I'm not really sure how to query google on this, and didn't turn up what
I was looking for because of that, so here's the random question:

Is there a way to make a Linux machine with a scsi controller act like a
scsi device (is the correct term 'target'?) (such as a disk) using a
local block device as storage?

I'm not sure it would be of general use, but I can see uses in weird or
remote prototyping situations...

Like the subject says, just idle curiosity; I don't see having much use
for it, but I was intrigued by the idea.

Eli
--------------------. "If it ain't broke now,
Eli Carter \ it will be soon." -- crypto-gram
eli.carter(a)inet.com `-------------------------------------------------


2002-08-07 21:47:25

by Jesse Pollard

[permalink] [raw]
Subject: Re: Idle curiosity: Acting as a SCSI target

Eli Carter <[email protected]>:
>
> Based on a conversation I had recently, my curiosity got piqued...
>
> I'm not really sure how to query google on this, and didn't turn up what
> I was looking for because of that, so here's the random question:
>
> Is there a way to make a Linux machine with a scsi controller act like a
> scsi device (is the correct term 'target'?) (such as a disk) using a
> local block device as storage?
>
> I'm not sure it would be of general use, but I can see uses in weird or
> remote prototyping situations...
>
> Like the subject says, just idle curiosity; I don't see having much use
> for it, but I was intrigued by the idea.

Easy answer: yes

Harder answer - It was done a couple of years ago using an Adaptec controller,
and the implementation was used for a TCP stack allowing 180-200 MB/Sec network
layer. The network was about 4 feet long I believe.

Another use for such a thing: Using Linux for implementation of a hardware
RAID layer attached via SCSI cable.

A third use: short range distributed lock manager for a distributed filesystem
or NAS with a Linux based controller. This gets interesting when you start
adding security labels to the data, preventing unauthorized access to
partitions.

Much of the same applications can be done over GigE cards now, so the desire
to standardize a SCSI implementation waned.

-------------------------------------------------------------------------
Jesse I Pollard, II
Email: [email protected]

Any opinions expressed are solely my own.

2002-08-07 22:03:04

by Oliver Xymoron

[permalink] [raw]
Subject: Re: Idle curiosity: Acting as a SCSI target

On Wed, 7 Aug 2002, Eli Carter wrote:

> Based on a conversation I had recently, my curiosity got piqued...
>
> I'm not really sure how to query google on this, and didn't turn up what
> I was looking for because of that, so here's the random question:
>
> Is there a way to make a Linux machine with a scsi controller act like a
> scsi device (is the correct term 'target'?) (such as a disk) using a
> local block device as storage?

No, not in the stock kernel.

However, if you look up stuff having to do with IP over SCSI (old) or SCSI
over IP (new), you will find quite a number of the pieces needed for this.

> I'm not sure it would be of general use, but I can see uses in weird or
> remote prototyping situations...

You're not thinking hard enough. Try this: embedded Linux taking whatever
form or number of disks together with software RAID _and_ volume
management / snapshot capability and whatever other intelligence you want
and presenting it to hosts as an arbitrary number of generic SCSI / FC /
iSCSI disks.

--
"Love the dolphins," she advised him. "Write by W.A.S.T.E.."

2002-08-07 22:45:26

by J.A. Magallon

[permalink] [raw]
Subject: Re: Idle curiosity: Acting as a SCSI target


On 2002.08.07 Jesse Pollard wrote:
>Eli Carter <[email protected]>:
>>
>> Based on a conversation I had recently, my curiosity got piqued...
>>
>> I'm not really sure how to query google on this, and didn't turn up what
>> I was looking for because of that, so here's the random question:
>>
>> Is there a way to make a Linux machine with a scsi controller act like a
>> scsi device (is the correct term 'target'?) (such as a disk) using a
>> local block device as storage?

Do not know about the software, but hardware allows it. Old mac laptops
were pluggable that way and one could see the other one disk. It was not
a symmetric connection, one laptop acted as disk, but worked...


--
J.A. Magallon <[email protected]> \ Software is like sex:
werewolf.able.es \ It's better when it's free
Mandrake Linux release 9.0 (Cooker) for i586
Linux 2.4.20-pre1-jam1 (gcc 3.2 (Mandrake Linux 9.0 3.2-0.2mdk))

2002-08-08 12:56:12

by Joshua MacDonald

[permalink] [raw]
Subject: Re: Idle curiosity: Acting as a SCSI target

On Wed, Aug 07, 2002 at 04:38:31PM -0500, Eli Carter wrote:
> Based on a conversation I had recently, my curiosity got piqued...
>
> I'm not really sure how to query google on this, and didn't turn up what
> I was looking for because of that, so here's the random question:
>
> Is there a way to make a Linux machine with a scsi controller act like a
> scsi device (is the correct term 'target'?) (such as a disk) using a
> local block device as storage?
>
> I'm not sure it would be of general use, but I can see uses in weird or
> remote prototyping situations...
>
> Like the subject says, just idle curiosity; I don't see having much use
> for it, but I was intrigued by the idea.

SCSI targets are also quite useful for testing disk-failure handling in file
systems, RAID devices, and databases...

http://www.cs.berkeley.edu/~abrown/papers/usenix00.pdf

-josh