Skip to contentSkip to conversation

Remote SCSI Emulation

DISCUSSION Muthian S 6 participants 8 messages Sep 3, 2003 – Sep 5, 2003

lore
Share & tools
lore

Muthian S

author
#0 lore raw

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

#1 lore raw
Quoted 16 lines · Muthian S

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.

Quoted 8 lines

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.

#2 lore raw

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

Quoted 68 lines · Richard B. Johnson

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

Quoted 16 lines · Muthian S

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.

Quoted 8 lines

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/

#3 lore raw
In reply to Muthian S
Quoted 7 lines · Muthian S

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.

Signature · 1 line
Wes Felter - [email protected] - http://felter.org/wesley/
#4 lore raw
Quoted 12 lines · Wes Felter
Quoted 7 lines · Muthian S

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.

Quoted 3 lines

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

#5 lore raw
Quoted 12 lines · Nuno Silva
Quoted 11 lines · Wes Felter
Quoted 7 lines · Muthian S

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.

Quoted 7 lines
Quoted 3 lines

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

#6 lore raw

On Gwe, 2003-09-05 at 00:59, David Lang wrote:>

Quoted 5 lines
Quoted 3 lines

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

Quoted 2 lines

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.

Quoted 4 lines

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.

#7 lore raw
Quoted 11 lines · Alan Cox

On Gwe, 2003-09-05 at 00:59, David Lang wrote:>

Quoted 5 lines
Quoted 3 lines

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

Quoted 5 lines
Quoted 2 lines

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

Quoted 12 lines
Quoted 4 lines

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.