Библиотека сайта rus-linux.net
Linux System Administrator's Survival Guide lsg14.htm
The previous chapters covered the most common devices that Linux users add to their systems, but there are still a few more available peripherals you may want to add to your system. These include an Uninterruptible Power Supply (UPS), scanners, and devices that don't fall handily into any one category, such as high-capacity magneto-optical drives and DAT tape library machines. This short chapter looks at a few of the most common peripherals you may want to add.
Uninterruptible Power Supplies
A few years ago, only the large workstation or network server owner purchased a UPS (Uninterruptible Power Supply). Like tape drives, the UPS is now considered an important peripheral. If you run your Linux system unattended or all the time, you should include a UPS with your system, even at the expense of compromise on another component like an extra hard drive or high-speed modem; the UPS can save your entire system from problems.
Power bars with spike filters used to be considered adequate for many users' needs. Spike filters do serve a purpose; if it's a matter of a spike filter or nothing, most spike filters are a good idea. However, several spike filters on the market can cause more problems than they solve by burning out their circuitry when a spike of sufficient intensity hits. The surge is then passed on to all units plugged into the power supply.
As prices of UPSs have dropped and the power supply from the utility companies has seemingly gotten worse, UPSs are quickly becoming a necessary component. Besides protecting the computer equipment attached to the UPS, the UPS provides battery backup power to allow you to shut your Linux system down cleanly when the power fails, preventing corrupted filesystems. More recently, software that integrates with Linux is beginning to appear that can shut your system down completely by itself in case of problems.
UPSs are available in several different configurations, but a typical unit consists of a battery that is charged whenever the electrical supply is good. Some UPSs provide all power from the outputs of the UPS from the battery, thereby ensuring a flat, controlled electrical supply. This way a guaranteed 120 volts can be supplied with no fluctuation. Some UPSs use a regulating supply to tame incoming spikes and surges, complementing low voltages from the UPS battery. All UPSs have a fast-acting shunt that switches the output supply to the battery in case of main power failure.
Some UPS units lack the battery aspect and instead regulate the power directly. A battery backup may be further down the line, or one may not be used at all (which leaves the system exposed to blackouts). For sites with chronic problems (especially industrial buildings or remote locations), such regulation may be necessary to ensure long life from computer equipment.
More common, though, are the plug-in battery-based UPS units. Usually these units vary widely in price and features. The capacity of the battery and the amount of filtering the internal circuitry can perform also varies among the available models. Most manufacturers offer units based on voltage and wattage capacities. Choosing a unit with too much capacity can result in overspending, but an underpowered unit can cause problems by not providing all units plugged into it with enough power.
A typical home computer and monitor requires a small UPS. A 200V, 130W unit is common, although most people should consider 400V a minimumunless they have very few devices (such as just one floppy drive and one hard drive). Workstations and servers can require much more, typically in the 600V, 400W range. When choosing a UPS, total the power supply draws from all the equipment that will be plugged in to the system. For example, a typical well-equipped PC has a 250W power supply, the monitor may draw 90W, and a modem and other external devices may add another 40W. Rounding up is the rule, so this type of system should have a 600V, 400W UPS.
The number of output jacks on the rear of a UPS tends to increase as capacity increases. A 200V unit may have four sockets, and a 600V UPS offers six, for example. Many users plug power bars into the rear jacks of a UPS, which makes more sockets available (often necessary with bulky connectors like modem power supplies), but can lead to unintentional overloading of the UPS capacity.
The amount of capacity of a UPS dictates the length of time it can be run off battery power. A typical system is designed to provide about 20 minutes of battery power when a power failure occurs. After that, the system must be powered off. Extra-long battery support is available either by purchasing a unit with a much higher capacity rating than you need or by adding external batteries. Practically all UPSs have an audible alarm when power failures occur, and some also let you know through a tone when surges, spikes, or sags are dealt with. These alarms can be useful but also annoying, so the capability to turn them off is important.
Other than capacities, UPSs differ in a couple of other important aspects: front-panel information and software support. The front panel of a UPS, while seemingly innocuous, can provide valuable information to a user. Small UPSs usually have a light or two to show that the unit is on, and a simple alarm when the power fails (and the user should start to shut down the system). Higher-end systems have multiple status lights or full displays. Some UPS software is now available for a variety of operating systems that can display this type of information in a window on your PC.
UPS software is an important point for many units today. The UPS software installs on an operating system and has capability to shut down the computer automatically and properly when power problems become serious. This capability is especially important with operating systems like Linux, which can experience data loss if the system is not shut down in a specific sequence. In these cases, the UPS software sends a signal to a driver on the computer when power failures occur and can invoke timers to send users warning messages. Eventually, the software can start a complete, orderly shutdown of the computer and peripherals, which can then stay off until started by the administrator. Few software packages allow unattended restarts. Several companies are porting their UPS automated shutdown software to Linux (most have a generic UNIX version that may work, too). If software is not available for your UPS, you can develop the routines if you are a competent programmer. The UPS signals a problem through a serial port pin, and your software needs only to watch for that signal and then start a shutdown process.
Removable Cartridge Drives
Several removable cartridge drive systems are currently available. Some use traditional disk platter technology, and others use magneto-optical techniques. For all these drives, the degree to which they will integrate with Linux depends on the drivers necessary to make them function.
SCSI systems are the easiest. The Linux SCSI interface recognizes most SCSI-based cartridge drives, and you can format the cartridge and mount it as a filesystem, just as you would with any other secondary disk drive. Whenever you change the cartridge, unmount the filesystem, insert the new cartridge, and mount the new filesystem. The entire process requires no special Linux interface at all. Usually, the only problem with removable cartridge drives is the formatting of the cartridge, which often must be done under DOS. Split partitions on the removable cartridges are also supported up to the normal Linux limit. (See Chapter 18, "Filesystems," for more information.)
Non-SCSI drive systems tend to not function with Linux unless a device driver has been developed specifically for that drive. The popularity of parallel port adapter drives has surged for Windows and DOS machines, but no driver for them is currently available for Linux. The same is true of the quasi-SCSI devices that require a special adapter card to function. Again, for these, a special device driver is necessary, and the kernel must be rebuilt to handle the devices.
If you are considering adding a new mass-storage device, check the Linux FTP and BBS sites carefully to ensure that a device driver is available. The popularity of many DOS and Windows-based devices means that a programmer is likely to port them to Linux eventually, so it's a matter of waiting for the driver to appear.
Scanners, Optical Readers, and Similar Devices
Most scanners and similar devices don't have available device drivers for Linux. Again, SCSI devices are the easiest to work with under Linux as the SCSI interface handles all the device communications for the unit. The problem then is providing an application that can talk to the device. For a scanner, for example, you need a user application that can accept the data coming over the SCSI stream from the scanner head and massage it into a presentable image. There are a few scanner utilities available for Linux, with several more under development.
For non-SCSI devices, the device drivers have to be written. Few non-SCSI devices have any driver support at all, although some experimental device drivers and applications are appearing on the FTP and BBS sites. As with any new device, make sure you can find a device driver for the unit before you purchase it (unless you are going to use it under another operating system).
If you want to use a device that doesn't have a device driver under Linux, you can still use the device under some conditions. If you are using the DOS emulator, it may allow some DOS-based devices to function properly. The same applies for WINE, the Windows emulator. You can run some Windows-based devices and applications through the emulator, with the files saved to the Linux filesystem.
Failing that approach, you can use the devices in their native operating system by booting into DOS or Windows, and then save the files in an area that Linux can access. When you reboot to Linux, you can copy the files into whatever target directory you want and start manipulating them there. You can avoid a lot of file format problems by using a standard filetype, such as TIFF for graphics. Most Linux applications will handle file formats from DOS applications.
The need to continually expand a Linux system's peripheral arsenal can be overwhelming at times, although you should be careful not to over tax the kernel's capabilities. At all times, remember that each physical device you add to the PC needs a Linux device driver and applications that can access the device. As this chapter mentioned several times, many new device drivers are appearing on BBS and FTP sites as more programmers get involved in the Linux project. Always check these sites for information on newly supported hardware and software.
Только зарегистрированные пользователи могут оценивать и комментировать статьи.