Best of Technical Support

Our experts answer your technical questions.
SCSI Error Message

I recently upgraded from a SCSI TR4 Travan tape drive to a 24GB DAT drive on a Linux server, and every morning I have the following message on the console after an overnight backup:

st0: Error with sense data:
[valid=0] Info fld=0x0, Current st09:00:
sense key U
nit Attention
Additional sense indicates Not ready to ready
transition (medium may have changed)

Can anyone say why this is so?

—Clark, CLARKKclr@cs.com

Check to make sure your SCSI bus is correctly terminated.

—Christopher Wingert, cwingert@qualcomm.com

You do not say whether the backup actually occurs before you get this message, or whether you are able to write anything on tape. If you haven't yet been able to write anything on tape, make sure that you do not have SCSI connection or termination issues. If your backup does occur, you may have some mt command after the backup that does something that isn't supported by the tape drive, or the tape drive may require some attention, like a cleaning.

—Marc Merlin, marc_bts@valinux.com

Where's /dev/fd0?

I try to mount my floppy disk (1.44MB) on Mandrake 8.1 with the command mount /dev/fd0 /mnt/floppy, and it says “unknown device”. It is connected correctly and it works perfectly, but Mandrake doesn't recognize it.

—Luis, godoman1@hotmail.com

Check to make sure that /dev/fd0 exists. Also, check /var/log/messages after running the mount to see if there is any clue to the problem.

—Christopher Wingert, cwingert@qualcomm.com

Make sure the kernel sees your floppy. You should have something like this in /var/log/dmesg:

Floppy drive(s): fd0 is 1.44M
FDC 0 is a National Semiconductor PC87306

Then see what dmesg says after you try your mount command.

—Marc Merlin, marc_bts@valinux.com

When you say that “it is connected correctly and it works perfectly”, I assume you dual boot your system and the floppy drive works in the other OS environment. Here are a few things you can check: make sure that the /dev/fd0 file exists, that it is indeed a device-special file and that it has the correct permissions on it. The floppy you are trying to mount has a filesystem on it, and the filesystem support is present in the kernel.

—Usman Ansari, uansari@yahoo.com

I Have No /dev/printer and I Must Print

I am using Red Hat 7.1 and can't seem to find /dev/printer. I need this socket for a Perl script. I can change the name in the script, but can someone tell me what to change it to? I do not know the name of the socket that the lpd dæmon uses in Red Hat 7.1.

Scott Statland, scott@nycgiftbaskets.com

Not to be obstructionist, but are you sure you need direct access to the device file? If you're just trying to print, you can do that in Perl with

open(FH, '| lpr')  ||  die $!;

and print your desired text to the FH filehandle. If your script is intended for broad distribution, bear in mind that UNIX printing is very flexible; a given print queue may be serviced by a printer attached to some other machine on the network, for example, so the local machine may not have any file under /dev that represents that printer. You might want to find a Perl module that helps you parse /etc/printcap and look for a print queue's lp resource to learn what device file, if any, is associated with that printer. (Type man printcap for a thorough description of that file.)

—Scott Maxwell, maxwell@ScottMaxwell.org

The device nodes /dev/lp[0-2] give you direct access to your parallel printer (bypassing lpd altogether).

—Marc Merlin, marc_bts@valinux.com

If you want to print using lpd, there's a Perl Net::Printer module downloadable from CPAN that lets you print to lpd and check the status of your print jobs from a Perl script. Read the man page on-line here: search.cpan.org/doc/CFUHRMAN/Net-Printer-0.20/Printer.pm.

—Don Marti, dmarti@ssc.com

______________________

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix