UNIX / Linux Tutorial
2.8.3 Making Backups To Tape Devices | 2.8.4 Using Floppies As File Systems
2.9 Upgrading And Installing New Software
2.8.3 Making Backups To Tape Devices Archiving to a streaming tape drive is similar to making a backup to a floppy file system, only to a different device driver. Tapes are also formatted and handled differently that floppy diskettes. Some representative tape device drivers for Linux systems are listed in Table 2.5: Tape device driver Format /dev/rft0 QIC-117 tape, rewind on close. /dev/nrft0 QIC-117 tape, no rewind on close. /dev/tpqic11 QIC-11 tape, rewind on close. /dev/ntpqic11 QIC-11 tape, no rewind on close. /dev/qft0 Floppy tape drive, rewind on close. /dev/nqft0 Floppy tape drive, no rewind on close. Table 2.5: Tape device drivers. Floppy tape drives use the floppy drive controller interface and are controlled by the ftape device driver, which is covered below. To archive the /etc directory a tape device with tar, use the command: # tar cvf /dev/qft0 /etc Similarly, to extract the files from the tape, use the commands: #cd / # tar xvf /dev/qft0 These tapes, like diskettes, must be formatted before they can be used. The ftape driver can format tapes under Linux. To format a QIC-40 format tape, use the command: # ftformat --format-parameter qic40-205ft --mode-auto --omit-erase --discard-header Other tape drives have their own formatting software. Check the hardware documentation for the tape drive or the documentation of the Linux device driver associated with it. Before tapes can be removed from the drive, they must be rewound and the I/O buffers written to the tape. This is analogous to unmounting a floppy before ejecting it, because the tape driver also caches data in memory. The standard Unix command to control tape drive operations is mt. Your system may not provide this command, depending on whether it has tape drive facilities. The ftape driver has a similar command, ftmt, which is used to control tape operations. To rewind a tape before removing it, use the command: # ftmt -f /dev/qft0 rewoffl Of course, substitute the correct tape device driver for your system. It is also a good idea to retension a tape after writing to it, because magnetic tapes are susceptible to stretch. The command: # ftmt -f /dev/qft0 retension To obtain the status of the tape device, with a formatted tape in the drive, give the command: # ftmt -f /dev/qft0 status 2.8.4 Using Floppies As File Systems You can create a file system on a floppy as you would on a hard drive partition. For example: # mke2fs /dev/fd0 1440 creates a file system on the floppy in /dev/fd0. The size of the file system must correspond to the size of the floppy. High-density 3.5" disks are 1.44 megabytes, or 1440 blocks, in size. High-density 5.25" disks are 1200 blocks. It is necessary to specify the size of the file system in blocks if the system cannot automatically detect the floppy's capacity. In order to access the floppy, you must mount the file system contained on it. The command: # mount /dev/fd0 /mnt will mount the floppy in /dev/fd0 on the directory /mnt. Now, all of the files on the floppy will appear under /mnt on your drive. The mount point, the directory where you're mounting the file system, must exist when you use the mount command. If it doesn't exist, create it with mkdir. See earlier pages for more information on file systems, mounting, and mount points. Note that any I/O to the floppy is buffered the same as hard disk I/O is. If you change 3 data on the floppy, you may not see the drive light come on until the kernel flushes its I/O buffers. It's important that you not remove a floppy before you unmount it with the command: # umount /dev/fd0 Do not simply switch floppies as you would on a MS-DOS system. Whenever you change floppies, umount the first floppy and mount the next. 2.9 Upgrading And Installing New Software Another duty of the system administrator is the upgrading and installation of new software. Linux system development is rapid. New kernel releases appear every few weeks, and other software is updated nearly as often. Because of this, new Linux users often feel the need to upgrade their systems constantly to keep up the the rapidly changing pace. This is unnecessary and a waste of time. If you kept up with all of the changes in the Linux world, you would spend all of your time upgrading and none of your time using the system. Some people feel that you should upgrade when a new distribution release is made; for example, when Slackware comes out with a new version. Many Linux users completely reinstall their system with the newest Slackware release every time. The best way to upgrade your system depends on the Linux distribution you have. Debian, S.u.S.E., Caldera and Red Hat Linux all have intelligent package management software which allows easy upgrades by installing a new package. For example, the C compiler, gcc, comes in a pre-built binary package. When it is installed, all of the files of the older version are overwritten or removed. For the most part, senselessly upgrading to "keep up with the trend" is not important at all. This isn't MS-DOS or Microsoft Windows. There is no important reason to run the newest version of all of the software. If you find that you would like or need features that a new version offers, then upgrade. If not, don't upgrade. In other words, upgrade only what you must, when you must. Don't upgrade for the sake of upgrading. This wastes a lot of time and effort.
1.1 Introduction 1.2.10 Referring To Home Directories 1.3.4 Copying Files
1.6 Exploring The File System 1.8 Wildcards 1.9.3 Pipes 1.10.3 Permissions Dependencies
1.12.4 Stopping And Restarting Jobs 1.13.3 Inserting Text 1.13.9 Including Other Files
1.14.3 Shell Initialization Scripts System Administration 2.3.1 The /etc/imitate file
2.4 Managing File Systems 2.6 Managing Users 2.6.5 Groups 2.7.2 gzip and compress
2.8.3 Making Backups To Tape Devices 2.9.1 Upgrading The Kernel
2.9.3 Installing A Device Driver Module
BOOK: LINUX QUICK COMMAND REFERENCE
http://personal.atl.bellsouth.net/~psadler
© copyright KnowledgeWorks, Inc. (2001)