Backing Up In Linux
You next need to make sure that you have the module utilities. This set of utilities allows the ftape driver to be loaded so that the kernel can access it. You will need the program insmod which should be in /sbin. If you do not have it, obtain the latest version (see Tape Resources), compile it (which is quite easy), and install it.
$ tar xzf modules-xx.xx.tar.gz $ cd modules-xx.xx $ make clean $ make $ make install
Note that if you are using modules-1.1.87, you must replace insmod.c and insmod.h with the ones that come in the ftape distribution. To avoid these problems, obtain a copy of the latest modules, which contains many other bug fixes as well.
Before you can use the tape drive, you must load the ftape program. You will have to be root to do so.
$ insmod ftape.o
This must be done every time you boot up Linux. If you do a lot of tape drive work, it is a good idea to include this in your rc.local startup script so that every time you boot up the tape driver is automatically loaded.
There are two steps to using a new tape with Linux. The tape must be low-level formatted. You can actually buy pre-formatted tapes (and they are only a couple of extra dollars and well worth the money), but if you have bought an unformatted tape, you will have to format it yourself. There is no Linux program available to format tapes, so this must be done under DOS, OS/2 or WINDOWS. DOS programs known to format tapes correctly include Norton Backup, Colorado Systems Backup Program (shipped with Jumbo drives), and Conner Backup Basics.
Next, the tape has to be prepared for use by ftape which has to write headers and sector maps. You can use mt do this preparation (which is known as erasing a tape).
$ mt -f /dev/ftape erase
mt comes as part of the cpio package from GNU. See below for locations.
If you are using zftape, your device name is /dev/qftape and hence, you need to issue:
$ mt -f /dev/qftape erase
PCI motherboards Some PCI motherboards have problems using ftape. The difficulty seems to lie with the Guaranteed Access Timing (GAT) option in the BIOS. This option must be disabled for ftape to work correctly. Note that some of the later Intel boards (1.00.10AX1 and later) have this setting permanently disabled.
insmod says “wrong kernel version” As mentioned above, ftape will only work with the kernel that was running when it was compiled. Each time you change kernel versions, you will need to recompile ftape.
Unable to use floppy disk Because both the tape drive and the floppy disk use IRQ 6, it is impossible to concurrently use the tape drive and floppy disk drive. Therefore, if you try to use the floppy disk while ftape is installed, you will get an error message. Similarly, if you try to install ftape while you have a floppy disk mounted, you will get an error. This is a hardware limitation and has nothing to do with ftape.
ftape seems to hang after accessing tape Earlier versions of ftape had problems with retry errors. Updating to the latest ftape (currently v2.03) usually solves these.
No such device error When trying to use tar or some other program that accesses the tape drive, you get a “No such device error”. This is because you have not installed the ftape driver using insmod as described above.
No such file or directory When trying to use tar or some other program that accesses the tape drive, you get a No such file or directory error. This is because you do not have a /dev/ftape and /dev/rft0 entries in your /dev directories. Create them using MAKEDEV or using the method outlined above.
SCSI tape drives can be difficult (or very easy) to get working but they are generally quicker, and more reliable, and there is no problem using floppies and tape drives simultaneously. The downside is that they are usually much more expensive than their floppy drive equivalents.
You have to ensure that the kernel you are running has support enabled for your SCSI adaptor. Change to the kernel directory and start the kernel configuration script:
$ cd /usr/src/linux $ make config
Press ENTER for all the options to accept the default values, until you come to the question CONFIG_SCSI. Type Y for this option. Press ENTER until you come to the question CONFIG_CHR_DEV and type Y for this option. Continue pressing ENTER until you come to your SCSI adaptor and answer Y to this question. You then have to recompile the kernel, as mentioned above.
When you boot up, you should now get a message similar to this (the numbers, and details may, of course, vary):
Detected SCSI tape st0 at scsi0 id 4, lun 0 scsi: Detected 1 SCSI tape 1 SCSI disk total
Practical Task Scheduling Deployment
July 20, 2016 12:00 pm CDT
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.Register Now!
- SUSE LLC's SUSE Manager
- My +1 Sword of Productivity
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- Managing Linux Using Puppet
- Non-Linux FOSS: Caffeine!
- Doing for User Space What We Did for Kernel Space
- SuperTuxKart 0.9.2 Released
- Google's SwiftShader Released
- Parsing an RSS News Feed with a Bash Script
- Rogue Wave Software's Zend Server