KanguruData Bank Configuration for Red Hat Linux 7.3
Updated 01/12/2008
Introduction
01/12/2008:
We upgraded to Kanguru's 7-bay KanguruData Bank in late December 2007. The unit arrived with a broken bay door. The first 3 drive bays were "dead". I shipped the unit back (at my expense) and received a replacement about 2 weeks later. All drive bays are active, but the unit is clearly incompatible with RHEL 3 (2.4.21-53), and RH 7.3 (2.4.35). I haven't had a chance to test it on RHEL 4 or RHEL 5 yet -- perhaps the 2.6 kernel does a better job of managing the drives. I was also disappointed that the 7-bay drive doesn't include the extra internal drive.
Original post:
After spending thousands of dollars on SCSI tape drive repairs, tape media, and with disk sizes surpassing our HP SureStore 12/24 DDS3 drives, I decided to look for alternatives to tape technology which at best, has always been a "hit or miss" proposition. Even with well-monitored backup scripts with daily e-mail reports, our network was growing and we were adding disk capacity. We were running out of tape space and were now backing up only the most important file systems. Instead of replacing 3 out of 4 tape drives (including a DDS2 drive in an IBM E30 machine) with larger capacity LVD drive costing $1000 or more a copy, it seemed more economical to use some form of removable network storage. Another advantage to using disk as a backup medium is that if offers direct, rather than sequential access.
There are a few inexpensive network market but I had already been a KanguruDisk drive user and had been quite satisfied with their product line. We have been backing up our 20-40 GB laptops to a portable KanguruDisk using a PCMCIA interface. KanguruDisks support PCMCIA, USB 1.1, USB 2.0, and parallel interfaces -- all from the same drive.
Kanguru (an Interactive Media spin-off) had just introduced the Kanguru Data Bank (properly known as the KanguruData Bank scaleable storage tower) which can provide up to 2.2 terabytes of storage when fully configured with their largest 250 MB drives. The Data Bank is available in 2-, 4- and 8-bay configurations.
I chose the 4-bay unit which includes an internal 80 GB drive. I ordered 3 additional 80 GB removable drives to populate 3 out of the 4 bays. The Data Bank was $749.00 and each removable drive was $184.00. The total, including 2nd day air shipping was $1362.00.
| 4 Bay Kanguru Data Bank | KDB-4-USB2-80 |
| 80 GB Black KanguruDisk | 11A-KD-81GB-BLK |
The scheme was to create a large file system on each drive, then subdivide it into directories that could be discreetly mounted by 8 remote machines over Samba. Each night, every machine would choose a different drive to back up to, scattering the writing across all of the drives. With USB 2.0, throughput is 480 Mbps. Theoretically, the bottleneck would be the network (still). What follows below is a re-enactment of the steps taken to set the Kanguru Data Bank up. The details related to the setup of the individual directories, Samba, or any of the backup scripts are left to the reader to implement. We have been successful in implementing our own backup scheme and if time permits, may decide to publish it.
Caution
This procedure works with kernel 2.4.20-13.7. It probably works with any post 2.4.10 kernel with USB 2.0 support but I didn’t test it with any other kernel. There have been many recent improvements to the USB 2.0 Mass Storage driver suite, so you’ll have the best results using the most recent kernel you can find.
Hardware
The hardware is simple to install.
- Shut down Linux and power the machine down.
- Install the USB2.0 PCI Card / Combo Hub supplied with the Data Bank in an available PCI slot in the host computer.
- Connect the USB 2.0 cable to the back of the Data Bank.
- Do not insert any removable drives into the drive bays.
- Power the Kanguru Data Bank up and observe that the fans are running and a single green LED is lit.
- Power the host computer up and observe the boot messages. In particular, look for:
Initializing USB Controller (usb-uhci)
Initializing USB Controller (usb-ohci)
Initializing USB Controller (usb-ehci)
The usb-ehci module indicates that your kernel has support for USB 2.0, providing transfer speeds of 480Mbps. The system is now ready for you to configure the internal drive in the Data Bank.
Configuring Linux
Determine the PCI slot number for your USB hub by typing:
dmesg | grep 'USB device'
In our machine with no removable disks inserted, one internal drive is visible. This output is displayed:
hub.c: new USB device 00:10.2-4, assigned address 2
hub.c: new USB device 00:10.2-4.1, assigned address 3
hub.c: new USB device 00:10.2-4.4, assigned address 4
usb.c: USB device 4 (vend/prod 0xdbf/0x300) is not claimed by any active driver.
The first two addresses are assigned to the USB 2.0 hubs and the internal drive. Looking in /var/log/messages for USB-related entries, we see:
usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
usb-uhci.c: $Revision: 1.9 $ time 13:31:39 May 12 2003
usb-uhci.c: High bandwidth mode enabled
PCI: Sharing IRQ 14 with 00:10.0
usb-uhci.c: USB UHCI at I/O 0xcce0, IRQ 14
usb-uhci.c: Detected 2 ports
usb.c: new USB bus registered, assigned bus number 1
hub.c: USB hub found
hub.c: 2 ports detected
usb-uhci.c: v1.275:USB Universal Host Controller Interface driver
PCI: Found IRQ 14 for device 00:10.0
PCI: Sharing IRQ 14 with 00:07.2
usb-ohci.c: USB OHCI at membase 0xe091b000, IRQ 14
usb-ohci.c: usb-00:10.0, NEC Corporation USB
usb.c: new USB bus registered, assigned bus number 2
hub.c: USB hub found
hub.c: 3 ports detected
PCI: Assigned IRQ 10 for device 00:10.1
usb-ohci.c: USB OHCI at membase 0xe091d000, IRQ 10
usb-ohci.c: usb-00:10.1, NEC Corporation USB (#2)
usb.c: new USB bus registered, assigned bus number 3
hub.c: USB hub found
hub.c: 2 ports detected
PCI: Assigned IRQ 5 for device 00:10.2
PCI: Sharing IRQ 5 with 02:09.1
ehci-hcd 00:10.2: NEC Corporation USB 2.0
ehci-hcd 00:10.2: irq 5, pci mem e0925000
usb.c: new USB bus registered, assigned bus number 4
PCI: 00:10.2 PCI cache line size set incorrectly (32 bytes) by BIOS/FW.
PCI: 00:10.2 PCI cache line size corrected to 128.
ehci-hcd 00:10.2: USB 2.0 enabled, EHCI 0.95, driver 2003-Jan-22
hub.c: USB hub found
hub.c: 5 ports detected
hub.c: connect-debounce failed, port 2 disabled
hub.c: new USB device 00:10.2-4, assigned address 2
hub.c: USB hub found
hub.c: 4 ports detected
hub.c: new USB device 00:10.2-4.1, assigned address 3
hub.c: USB hub found
hub.c: 4 ports detected
hub.c: new USB device 00:10.2-4.4, assigned address 4
usb.c: USB device 4 (vend/prod 0xdbf/0x300) is not claimed by any active driver.
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
scsi2 : SCSI emulation for USB Mass Storage devices
Vendor: SAMSUNG Model: SV8004H Rev: QR10
Type: Direct-Access ANSI SCSI revision: 02
Attached scsi disk sdb at scsi2, channel 0, id 0, lun 0
SCSI device sdb: 156368016 512-byte hdwr sectors (80060 MB)
sdb: sdb1
USB Mass Storage support registered.
At the end, you’ll notice that SCSI shows up. That’s because the USB mass storage device driver is written to emulate SCSI devices. On the PowerEdge 1300 used for this installation, there are dual 18-GB SCSI drives mirrored together with a PERC card. Those drives appear as a single drive to Linux which assigns them to /dev/sda. Therefore, the next SCSI drive is automatically assigned the name /dev/sdb.
Configuring the Fixed Drive
If your /var/log/messages file shows an entry indicating that Linux registered a USB Mass Storage device as a new SCSI disk, make a note of the device name. It will begin with “/dev/sd” and will end with a lower case letter, most likely “b” or “c”.
CAUTION: You are about to use some commands that can destroy the data on a hard disk. It is strongly suggested that you back up your system before proceeding.
As root, type:
fdisk /dev/sdb
The system will start the fdisk utility:
The number of cylinders for this disk is set to 9733.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/sdb: 255 heads, 63 sectors, 9733 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 9733 78180291 83 Win95 FAT32
You will want to remove this partition and create a new one formatted with Linux EXT3. In this case, we created a single 80 gigabyte partition.
Command (m for help): d
Partition number (1-4): 1
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-9733, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-9733, default 9733): 9733
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
Now that the drive is partitioned, create a mountable file system on it.
Note that the next command requires you to append a “1” to the end of the device name:
mke2fs -j /dev/sdb1
mke2fs 1.27 (8-Mar-2002)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
9781248 inodes, 19545072 blocks
977253 blocks (5.00%) reserved for the super user
First data block=0
597 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424
Before the command exits, the inode tables will be built. This takes a couple of minutes. Then, the following message is displayed:
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 31 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
Now, the drive needs to be labeled. With fixed disks this is almost optional since the same drive receives the same name on every reboot of Linux. This isn’t nearly the case with removable drives, or fixed drives that are integrated into a removable drive subsystem such as this. Depending on the order in which the Data Bank reports its drives to Linux, the device names may change, even for the fixed disk. By labeling the disks, you allow the desired drive to be mounted on the desired mount point independently of the low-level name that was assigned to the device during the boot sequence.
To label the drive, decide upon a short (up to 16 character) name to call your new drive. In our case, we called it /backup1.
Note that you must append a “1” to the device name.
Type:
e2label /dev/sdb1 /backup1
Now, edit your /etc/fstab file and add the following entry:
LABEL=/backup1 /backup1 ext3 defaults 1 2
Save the file.
Create the mount point and mount the drive:
mkdir /backup1
mount /backup1
Check that the drive is mounted:
df –k /backup1
The system should return with:
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/sdb1 76952544 32828 73010704 1% /backup3
Configuring the Removable Drives
By tailing the end of the /var/log/messages file, you’ll see each disk being detected as soon as it is inserted:
hub.c: new USB device 00:10.2-4.3, assigned address 5
scsi3 : SCSI emulation for USB Mass Storage devices
Vendor: SAMSUNG Model: SV8004H Rev: 0 0
Type: Direct-Access ANSI SCSI revision: 02
Attached scsi disk sdc at scsi3, channel 0, id 0, lun 0
SCSI device sdc: 156368016 512-byte hdwr sectors (80060 MB)
sdc: sdc1
Repeat the procedure described for the fixed disk above for each of the removable disks, using the device name assigned by Linux. When you are finished, all disks should be mounted.
Editing the rc.sysinit File
Because it takes a few seconds for the USB controllers and hubs to gather and report the information from downstream devices, we need to add a short delay in the system initialization script. Edit /etc/rc.sysinit and search for the section where the file systems are checked for integrity:
# Check filesystems
if [ -z "$fastboot" ]; then
STRING=$"Checking filesystems ..."
echo $STRING
sleep 6 # <-- Inserted for USB
initlog -c "fsck -T -R -A -a $fsckoptions"
Save the file.
Create some small adhesive labels with each removable disk name. Affix them to the front of the disks at this time.
Now shut the system down. Remove the disks and switch them into different bays. Then restart the system. Observe that when all of your existing file systems are being mounted, that all of the removable file systems will be mounted too.
Caveats
If you reboot the system without all of the removable disks inserted, the system will drop to single user mode and require you to edit /etc/fstab to comment out the entry corresponding to the disk that’s not there. I’m sure there is a way around this using automount or some derivative thereof, but I didn’t have the time to fully research it.
Always remember to unmount a removable disk before actually removing it from the Data Bank.
Notes
In the 4-bay model used in our installation, the drive bays map to the following device numbers:
| 00:10.2-4.3 (Removable) |
| 00:10.2-4.1.2 (Removable) |
| 00:10.2-4.1.3 (Removable |
| 00:10.2-4.1.4 (Removable) |
| 00:10.2.4.4 (Fixed) |
Conclusion
After running this system for a week, we have not encountered a single data or media error. Since installation, the internal fixed disk was reconfigured for duty as a regular network drive and has served extremely well in that capacity. So far, the system has been a solution to one of the many growing pains that a small startup typically encounters when its needs surpass its budget.
Update - 8/15/2003
I have not seen a single glitch in 30 days of continuous operation. The performance was surprisingly better than I had expected. A quick comparison of drive technologies shows why:
| Protocol | MB/s |
| IrDA-Control | 0.009 |
| Serial | 0.02 |
| Parallel | 1.0 |
| Bluetooth 1.1 | 0.125 |
| USB 1.1 | 1.5 |
| Bluetooth 2 | 2 to 12 |
| SCSI 1 | 5 |
| Fast SCSI 2 | 10 |
| Fast Wide SCSI 2 | 20 |
| Ultra SCSI | 20 |
| Ultra Wide SCSI | 40 |
| USB 2.0 | 60 |
| Ultra2 SCSI | 80 |
| FireWire (IEEE 1394) | 50 |
| FireWire (IEEE 1394b) | 100 |
| Ultra 160 SCSI | 160 |
The information in this table was obtained from http://www.a1-electronics.net/.



