VOICE Home Page: http://www.os2voice.org |
February 2004
Newsletter Index
|
By Gerrit Schoenmaker © February 2004 |
Nowadays you will see ads more and more in computer magazines, triggering you to buy an external hard disk enclosure with USB 2.0 interface (downwards compatible with USB 1.x). Well, I finally caved in and bought myself such an enclosure. I supplied it with a 40 Gb hard disk and did the necessary research on how to run it on my eCS 1.1 loaded computer equipped with a MSI K4 Ultra mainboard which has an onboard USB 2.0 controller.
Usually there are two models of these kind of enclosures. Those suitable for 2.5" disks without power supply on board and those for 3.5" disks fitted with a power supply. The latter is also suitable to enclose 5.25" drives, like CD-ROM, CD-RW or DVD-ROM (RAM). So, if you want to buy one, I strongly advise you to choose an external case with an AC power supply built in, because that one has more possibilities and relieves the USB port of delivering power!
Get the latest basic IBM USB drivers, to be found on (http://www.ecomstation.com).
Chris Wohlgemuth's Mass Storage USB driver (http://www.os2world.com/os2usb/files/cw-usbmsd-v1_2b.zip).
USB Resource Manager, this driver shows all connected USB devices, except USB hubs (ftp://ftp.netlabs.org/pub/usb/usbres.zip).
USBMOUNTD, a utility to automatically mount the USB media devices in OS/2's LVM. As soon as a new USB device is connected to the PC, USBmountd will invoke LVM's "Refresh Removables" command and assign a drive-letter to the device (if appropriate). If the hard disk has the dirty flag set, USBmountd can automatically invoke the checkdisk procedure (http://www.os2world.com/os2usb/files/usbmountd.zip).
The External USB 2.0 hard disk casing itself. (Click on the small image of the box front to the right to enlarge it) :-) Tested is a case with an USB interface of the brand ACER, a familiar name with regard to USB. Basically, all USB hard disk cases should work, but there is no guarantee unfortunately. The tested case with AC power supply costs around 50 Euro (approximately $50USD).
STARTB, an advanced utility by Christian Langanke (http://www.clanganke.de/os2/sw/startb) that offers more features than the normal START command of eCS. We use the STARTB command to invoke USBMOUNTD during system start of eCS (or OS/2).
USB device drivers.
Out of the box eCS 1.1 installs all the standard USB drivers you need, except Chris
Wohlgemuth's mass storage USB driver. [Editor's note: You may need to try the
CWUSMMSD or the IBM written USBMSD driver, as some combinations of controllers and drives
work with one better, if at all, with one version then the other.] If you don't have any
USB driver installed, copy the latest IBM basic USB drivers including Chris Wohlgemuth's
CWUSMMSD.SYS to your OS2\BOOT directory. Then open a command prompt and run
HCIMONIT.EXE, included in IBM's USB driver package, to
detect the amount and type of the USB controllers on your mainboard. For each detected
controller you have to put a BASEDEV statement in your CONFIG.SYS. For a mainboard which has
3 USB 1.1 and 1 USB 2.0 controllers the lines in your CONFIG.SYS should look like this:
BASEDEV=USBUHCD.SYS BASEDEV=USBUHCD.SYS BASEDEV=USBUHCD.SYS BASEDEV=USBEHCD.SYS BASEDEV=USBD.SYS /REQ:USBUHCD$,USBEHCD$ BASEDEV=USBHID.SYS
The only thing left is to add a basedev statement for the USB mass storage device driver of Chris Wohlgemuth.
BASEDEV=CWUSBMSD.ADD /V /REMOVABLES:1 /FORCE_TO_REMOVABLE
The options mean that resources for only one removable device are reserved and that the device has to identify itself to the system as a removable one.
USB Resource Manager.
This one is automatically installed by eCS 1.1, however if you have an older version of eCS you will have to manually install the Netlabs package.
The following line has to be added to your CONFIG.SYS:
DEVICE=C:\OS2\BOOT\USBRESMG.SYS
Actually, you don't really need the USB resource manager, it's only there for your convenience to see whether your USB ports are working and what hardware is detected.
This could be of importance to tell others about the vendors of which USB interfaces are working.
USBMOUNT
Install USBMOUNT according to the installation instructions. Attention, this driver only works on LVM systems, like eCS, MCP1 and 2, WSeB, ACP1 and 2. So, you cannot use it on Warp 4.0 systems!
There are several ways to start the program. A very nice way is to use the STARTB command in your STARTUP.CMD. If you want to do so, you will need to add the following lines to your STARTUP.CMD file:
C: CD SYSTOOLS\USBMOUNTD STARTB /BG /WIN /INV USBMOUNTD.EXE -s -t 6000 -c
Of course, you have to adapt the pathnames to your own hard disk layout.
The options /WIN, /INV and /BG belong to the STARTB command and take care off starting USBMOUNTD invisible, VIO-windowed in the background. The other options are part of USBMOUNTD. They mean:
After hard labor to install everything you have to reboot your machine. Finally the moment where you have been waiting for has arrived. You are about to attach your brand new investment of a hard disk enclosure with USB interface. Hopefully you haven't forgotten to mount a hard disk in it!
After connecting your USB HDD you may expect to see all the events mentioned below:
After a beep the USB device will be visible in the USB resource manager.
After a delay of 6 seconds, the command: LVM /RediscoverPRM will be invoked. Depending on your disk size this takes some time (8-10 s on my 40Gb disk).
A free drive-letter will be assigned.
Depending on the fact of whether a dirty flag is found or not, USBMOUNTD will invoke checkdisk to recover from disk "errors".
If the disk is not formatted yet, you are allowed to do so now.
To detach your removable USB disk and to release and shutdown the filesystem on the right way, you have to choose Eject Disk from the context menu of the USB drive's icon.
Sysbench 0.94g was used to do some disk I/O measurements and to compare one of my hard disks connected to the secondary IDE-controller with the external one connected via the USB 2.0 interface. Both hard disks have nearly the same specifications (IBM deskstar, 40 Gb, UDMA 100, 7200 r.p.m.) You have to keep in mind that the USB 2.0 interface has a throughput value somewhat higher as the Firewire standard, namely 48 MB/s! You will find the results in the picture below.
The results show that the average transfer rate of the external hard disk is about 4-times slower compared to the USB 2.0 standard and the internal disk. Despite this, the average transfer values for the USB connected disk are very satisfying!
Even after disconnecting my USB disk the right way, sometimes a dirty flag was enabled on the disk, resulting in a time consuming checkdisk next time the disk was attached. I really don't have any explanation yet for this phenomena.
After attaching and detaching the USB drive for a second time the Eject Disk command was coming with an error message which disappeared after clicking the OK button. I have not noticed any particular influence of this error on the mounting process and no connection was found between this error and the appearance of a dirty flag on the disk.
It's also possible to connect the hard disk case to a computer with 1.1 USB controllers. Of course this will slow down the average data transfer rate, including the mounting process!
References:
|
Feature Index
editor@os2voice.org
< Previous Page | Newsletter Index | Next Page >
VOICE Home Page: http://www.os2voice.org