LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   How a IDE partition can emulate a SCSI disk? (https://www.linuxquestions.org/questions/linux-hardware-18/how-a-ide-partition-can-emulate-a-scsi-disk-212145/)

alexlihk 08-01-2004 10:44 AM

How a IDE partition can emulate a SCSI disk?
 
Dear Experts,

I have an application which request 2 HDs to run and at lease 1 is SCSI. However, I have 1 IDE disk only. Is there any tools to emulate SCSI disk by a IMG file or a IDE Partition?

thx.
Al Exlihk

rjlee 08-01-2004 06:08 PM

USB mass storage devices use the usb-scsi emulation layer. You might get somewhere with that.

In general, I doubt it; SCSI is more complex than IDE/ATAPI as I understand it, though there is a relationship between the two.

If the application is looking for a /dev/sda file, but treats it as a block device (i.e. it doesn't do any low-level SCSI manipulation of it, like trying to eject it), then you can create a symbolic link instead. As root:
Code:

cd /dev/
rm -f sda
ln -s sda hda2

That will link the /dev/hda2 partition on the first hard disk to the second. This may not work with devfs (a virtual /dev filesystem) but you can do something similar if you're using that (see the devfs documentation). You can also link contiguous files to it. You can create an (e.g.) 2Mb contiguous file with:
Code:

dd if=/dev/zero of=/tmp/contig bs=1024 count=2048


All times are GMT -5. The time now is 05:58 AM.