Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Absolute BSD - The Ultimate Guide To FreeBSD (2002).pdf
Скачиваний:
25
Добавлен:
17.08.2013
Размер:
8.15 Mб
Скачать

Tape Devices

FreeBSD supports both SCSI and IDE tape drives. When compared with IDE drives, SCSI drives are faster and more reliable, though IDE drives are cheaper. In most cases, either format will suffice.

Once you've physically installed your tape drive, you'll need to confirm that FreeBSD recognizes it. The simplest way is to check the /var/run/dmesg.boot file, which displays the system's boottime messages and shows all the hardware on your system. This is a very long file, so I won't reproduce it here. I do suggest that you examine the dmesg on your FreeBSD system and become familiar with it, because you'll have to look at it almost every time you have to troubleshoot hardware.

When you examine this file, you'll see IDE tape drives displayed as "ast" devices, and SCSI tapes as "sa" devices. Scan this file for your tape drive; if you see it, your system kernel is probably properly configured. (FreeBSD's GENERIC kernel picks up most tape drives.)

How to Read Dmesg.boot

The first item on each line of the example boot file shown next is the device name. This particular entry represents a DDS3 tape drive, which is fairly slow by modern standards, but is still adequate. If your system has multiple tape drives, they will have sequential numbers, such as sa0, sa1, sa2, and so on. Once you know the device name, you can access the tape drive. SCSI drives are represented by the initials sa and a trailing number; IDE tape drives show up as astX instead of saX. If you have multiple identical drives, you should label which is which. If you don't know where the tape drive is plugged into the physical bus, or the SCSI ID of the device, a bit of trial and error will identify each drive. (Every time I set up a new backup server, I mean to label the tape drives by SCSI ID as I physically assemble the machine. Every time, I wind up putting a tape in each drive and trying to access it under various tape numbers, and labeling the drive that way. Either works.)

Each line for a device contains some information about the device. For example, the tape drive shown in the following example has three descriptive lines identifying how the tape is hooked into the computer's SCSI system, the model name, and the maximum speed.

...............................................................................................

sa0 at ahc0 bus 0 target 6 lun 0

sa0: <ARCHIVE Python 04106−XXX 7350> Removable Sequential Access SCSI−2 device

sa0: 10.000MB/s transfers (10.000MHz, offset 15)

...............................................................................................

Every device on your system, from onboard clock chips to PCI busses to sound cards, will have a similar entry in dmesg.boot.

The dmesg.boot file is an invaluable source of information on what hardware is actually installed. Take a look at this file on your system; you probably never knew just how much stuff was in that little beige box.

If your tape drive doesn't appear in the /var/run/dmesg.boot file, check the release notes for the version of FreeBSD you're running to be sure it's supported. If it's listed as supported, but is not in the dmesg.boot file, ask for help (see Chapter 2). You'll probably be told to rebuild your kernel (this is covered in Chapter 4).

49