2003-09-03 20:38:19

by Muthian S

[permalink] [raw]
Subject: Remote SCSI Emulation

Hi,

Certain SCSI adapters like the Adaptec AHA 29160 are reportedly capable of
acting as a target and can receive SCSI commands from initiators. Such an
adapter can be used to facilitate remote SCSI emulation by a PC.
For instance, if two PCs have the adapter, the two adapters can be
directly connected by a SCSI bus and the second PC can in effect serve as
an "emulated SCSI disk". Such a setup is extremely helpful in various
scenarios.

However, for this to work, the OS on the second PC (which serves as the
emulated scsi disk) should be capable of handling incoming SCSI requests and
directing them to an appropriate software layer. Apparently, the CAM
subsystem of FreeBSD has this capability. I was wondering if there is a
similar mechanism in linux.

It would be really helpful if people have comments on whether such a setup
is
possible in linux, and if yes, are there specific adapters that are known
to work in this fashion.

thanks,
Muthian.

_________________________________________________________________
Get MSN 8 and enjoy automatic e-mail virus protection.
http://join.msn.com/?page=features/virus


2003-09-03 21:23:46

by Richard B. Johnson

[permalink] [raw]
Subject: Re: Remote SCSI Emulation

On Wed, 3 Sep 2003, Muthian S wrote:

> Hi,
>
> Certain SCSI adapters like the Adaptec AHA 29160 are reportedly capable of
> acting as a target and can receive SCSI commands from initiators. Such an
> adapter can be used to facilitate remote SCSI emulation by a PC.
> For instance, if two PCs have the adapter, the two adapters can be
> directly connected by a SCSI bus and the second PC can in effect serve as
> an "emulated SCSI disk". Such a setup is extremely helpful in various
> scenarios.
>
> However, for this to work, the OS on the second PC (which serves as the
> emulated scsi disk) should be capable of handling incoming SCSI requests and
> directing them to an appropriate software layer. Apparently, the CAM
> subsystem of FreeBSD has this capability. I was wondering if there is a
> similar mechanism in linux.
>
> It would be really helpful if people have comments on whether such a setup
> is
> possible in linux, and if yes, are there specific adapters that are known
> to work in this fashion.
>
> thanks,
> Muthian.
>

Many modern SCSI Adapters can receive SCSI commands. They are not,
however, relayed to some "appropriate software layer". Instead, the
driver will handle these commands and provide an appropriate
abstraction layer to user-mode software. Anybody who wants,
can make such a driver. Typically the SCSI 'device' becomes a
"memory device" because this provides the largest possible communications
capability (a memory device can be a DSP (or several), for instance).

Analogic's AP-85, now obsolete was a SCSI "memory device". It
could accumulate high-speed data then it could process it with
code that was uploaded using the SCSI interface as well. It was
quite a machine, now about 15 years out-of-date. The processing
was done with 4 DSPs (TMS320C30) plus a 16-bit controller uP.
This was designed long before anybody heard of SMP.

These kinds of interfaces are quite out-of-date because of the
relatively low speed at which they operate (75 Megabytes/second).
Therefore, there is not much call for such interface drivers.
Everybody wants at least 300 Megabytes/second now-days, preferably
4 times that. A typical high-speed interface to parallel DSP
systems now-days will ... "do an infinite loop in a few hours..."
-- that, from an also-obsolete Gray advertisement --

Cheers,
Dick Johnson
Penguin : Linux version 2.4.22 on an i686 machine (794.73 BogoMips).
Note 96.31% of all statistics are fiction.


2003-09-03 21:40:17

by David Lang

[permalink] [raw]
Subject: Re: Remote SCSI Emulation

the type of thing that Muthian is looking at is the ability to take a
Linux box, stuff a bunch of cheap IDE drives in it, use LVM, MD, etc in
linux to provide redundancy, snapshots, replication, etc and then drop in
a SCSI card and let another server then treat the linux box like a large
external disk.

David Lang


On Wed, 3 Sep 2003, Richard B. Johnson wrote:

> Date: Wed, 3 Sep 2003 17:23:46 -0400 (EDT)
> From: Richard B. Johnson <[email protected]>
> To: Muthian S <[email protected]>
> Cc: [email protected]
> Subject: Re: Remote SCSI Emulation
>
> On Wed, 3 Sep 2003, Muthian S wrote:
>
> > Hi,
> >
> > Certain SCSI adapters like the Adaptec AHA 29160 are reportedly capable of
> > acting as a target and can receive SCSI commands from initiators. Such an
> > adapter can be used to facilitate remote SCSI emulation by a PC.
> > For instance, if two PCs have the adapter, the two adapters can be
> > directly connected by a SCSI bus and the second PC can in effect serve as
> > an "emulated SCSI disk". Such a setup is extremely helpful in various
> > scenarios.
> >
> > However, for this to work, the OS on the second PC (which serves as the
> > emulated scsi disk) should be capable of handling incoming SCSI requests and
> > directing them to an appropriate software layer. Apparently, the CAM
> > subsystem of FreeBSD has this capability. I was wondering if there is a
> > similar mechanism in linux.
> >
> > It would be really helpful if people have comments on whether such a setup
> > is
> > possible in linux, and if yes, are there specific adapters that are known
> > to work in this fashion.
> >
> > thanks,
> > Muthian.
> >
>
> Many modern SCSI Adapters can receive SCSI commands. They are not,
> however, relayed to some "appropriate software layer". Instead, the
> driver will handle these commands and provide an appropriate
> abstraction layer to user-mode software. Anybody who wants,
> can make such a driver. Typically the SCSI 'device' becomes a
> "memory device" because this provides the largest possible communications
> capability (a memory device can be a DSP (or several), for instance).
>
> Analogic's AP-85, now obsolete was a SCSI "memory device". It
> could accumulate high-speed data then it could process it with
> code that was uploaded using the SCSI interface as well. It was
> quite a machine, now about 15 years out-of-date. The processing
> was done with 4 DSPs (TMS320C30) plus a 16-bit controller uP.
> This was designed long before anybody heard of SMP.
>
> These kinds of interfaces are quite out-of-date because of the
> relatively low speed at which they operate (75 Megabytes/second).
> Therefore, there is not much call for such interface drivers.
> Everybody wants at least 300 Megabytes/second now-days, preferably
> 4 times that. A typical high-speed interface to parallel DSP
> systems now-days will ... "do an infinite loop in a few hours..."
> -- that, from an also-obsolete Gray advertisement --
>
> Cheers,
> Dick Johnson
> Penguin : Linux version 2.4.22 on an i686 machine (794.73 BogoMips).
> Note 96.31% of all statistics are fiction.
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>

2003-09-03 22:59:48

by Wes Felter

[permalink] [raw]
Subject: Re: Remote SCSI Emulation

On Wed, 03 Sep 2003 20:38:14 +0000, Muthian S wrote:

> Certain SCSI adapters like the Adaptec AHA 29160 are reportedly capable of
> acting as a target and can receive SCSI commands from initiators. Such an
> adapter can be used to facilitate remote SCSI emulation by a PC.
> For instance, if two PCs have the adapter, the two adapters can be
> directly connected by a SCSI bus and the second PC can in effect serve as
> an "emulated SCSI disk". Such a setup is extremely helpful in various
> scenarios.

Search the archives/Web for "SCSI target", "LinuxDisk", etc. There are
plenty of half-finished implementations of this.

--
Wes Felter - [email protected] - http://felter.org/wesley/


2003-09-04 23:34:46

by Nuno Silva

[permalink] [raw]
Subject: Re: Remote SCSI Emulation



Wes Felter wrote:
> On Wed, 03 Sep 2003 20:38:14 +0000, Muthian S wrote:
>
>
>>Certain SCSI adapters like the Adaptec AHA 29160 are reportedly capable of
>>acting as a target and can receive SCSI commands from initiators. Such an
>>adapter can be used to facilitate remote SCSI emulation by a PC.
>>For instance, if two PCs have the adapter, the two adapters can be
>>directly connected by a SCSI bus and the second PC can in effect serve as
>>an "emulated SCSI disk". Such a setup is extremely helpful in various
>>scenarios.
>
>
> Search the archives/Web for "SCSI target", "LinuxDisk", etc. There are
> plenty of half-finished implementations of this.
>

Another, more generic, solution is "ip over scsi":

http://www.google.com/search?q=%22ip+over+scsi%22

Regards,
Nuno Silva


2003-09-05 00:02:38

by David Lang

[permalink] [raw]
Subject: Re: Remote SCSI Emulation

On Fri, 5 Sep 2003, Nuno Silva wrote:

> Wes Felter wrote:
> > On Wed, 03 Sep 2003 20:38:14 +0000, Muthian S wrote:
> >
> >>Certain SCSI adapters like the Adaptec AHA 29160 are reportedly capable of
> >>acting as a target and can receive SCSI commands from initiators. Such an
> >>adapter can be used to facilitate remote SCSI emulation by a PC.
> >>For instance, if two PCs have the adapter, the two adapters can be
> >>directly connected by a SCSI bus and the second PC can in effect serve as
> >>an "emulated SCSI disk". Such a setup is extremely helpful in various
> >>scenarios.
> >
> >
> > Search the archives/Web for "SCSI target", "LinuxDisk", etc. There are
> > plenty of half-finished implementations of this.
> >
>
> Another, more generic, solution is "ip over scsi":
>
> http://www.google.com/search?q=%22ip+over+scsi%22

Actually, ip over scsi cannot accomplish the goal listed above.

what is beeing looked for here is the scsi equivalent of the USB 'gadget'
driver, letting linux be at the slave end of things as well as the master.

does anyone have an idea why *BSD was able to do this, but all the linux
projects seem to get stuck half-finished? is this just added complexity
due to the large number of linux scsi drivers or is there something deeper
in the system?

David Lang

2003-09-05 01:02:14

by Alan

[permalink] [raw]
Subject: Re: Remote SCSI Emulation

On Gwe, 2003-09-05 at 00:59, David Lang wrote:>
> > Another, more generic, solution is "ip over scsi":
> >
> > http://www.google.com/search?q=%22ip+over+scsi%22
>
> Actually, ip over scsi cannot accomplish the goal listed above.

No, it can instead replace much of it with a better infrastructure as
can ATA over ethernet. Or you can push the whole problem up to fs level
and you get stuff like LUSTRE

> what is beeing looked for here is the scsi equivalent of the USB 'gadget'
> driver, letting linux be at the slave end of things as well as the master.

Which is a strange place to put a Linux box but I guess you might want
to build a legacy SCSI raid box that way as opposed to iSCSI.

> does anyone have an idea why *BSD was able to do this, but all the linux
> projects seem to get stuck half-finished? is this just added complexity
> due to the large number of linux scsi drivers or is there something deeper
> in the system?

You need to add target support to some of the drivers and probably a
chunk of infrastructure as well. I suspect someone did the job for BSD
and since its pretty rarely needed and its normally in a closed box
where the core OS being Linux doesn't matter everyone else just used BSD
for that job.


2003-09-05 01:05:19

by David Lang

[permalink] [raw]
Subject: Re: Remote SCSI Emulation

On Fri, 5 Sep 2003, Alan Cox wrote:

> On Gwe, 2003-09-05 at 00:59, David Lang wrote:>
> > > Another, more generic, solution is "ip over scsi":
> > >
> > > http://www.google.com/search?q=%22ip+over+scsi%22
> >
> > Actually, ip over scsi cannot accomplish the goal listed above.
>
> No, it can instead replace much of it with a better infrastructure as
> can ATA over ethernet. Or you can push the whole problem up to fs level
> and you get stuff like LUSTRE
>
> > what is beeing looked for here is the scsi equivalent of the USB 'gadget'
> > driver, letting linux be at the slave end of things as well as the master.
>
> Which is a strange place to put a Linux box but I guess you might want
> to build a legacy SCSI raid box that way as opposed to iSCSI.

that's exactly what I think is being asked about. make it look to the host
system like a standard legacy SCSI drive, but under the covers take
advantage of all the things that linux can do (cheap IDE drives, raid,
snapshots, journaling (only partially useful), etc)

David Lang

> > does anyone have an idea why *BSD was able to do this, but all the linux
> > projects seem to get stuck half-finished? is this just added complexity
> > due to the large number of linux scsi drivers or is there something deeper
> > in the system?
>
> You need to add target support to some of the drivers and probably a
> chunk of infrastructure as well. I suspect someone did the job for BSD
> and since its pretty rarely needed and its normally in a closed box
> where the core OS being Linux doesn't matter everyone else just used BSD
> for that job.
>
>