[Prev][Next][Index][Thread]

Re: Tape question



Hello everyone,

I have a SCSI tape drive attached to a Linux machine. It is defined as 
/dev/st0. /dev/tape and /dev/rmt0 are both symbolic links to /dev/st0.

If I log into the system as root, everything is fine. Tape programs (mt, 
tar) point to /dev/st0 by default. 

If I log as a regular user, funny things start to happen. mt still points
to /dev/st0, however tar does not. Moreover, behavior of tar depends on a
user default shell, at least it seems so. Here are examples: 

User 1, default shell /bin/tcsh.

>tar -t
tar: can't open /dev/nst0 : Permission denied

User 2, default shell /bin/bash.

$tar -t
tar: can't open /dev/nftape : Permission denied

Both /dev/nst0 and dev/nftape exist, and the latter is a symbolic link to 
/dev/nrft0

So my questions are:

1. Where does tar get its default tape name? Why is it different for 
different login names and/or shells? 

2. Is there a way to tell tar once and for all what its default tape is? I
tried to create a file /etc/default/tar (like you do under Solaris) with
default tar tape names, but apparently it does not work under Linux. Yes 
of course I can write tar `-tf /dev/st0' but this is not my question.

3. Is it safe to delete devices /dev/nst0 and /dev/nrft0 and create them 
anew as links to /dev/st0? A problem may arise if there are other 
programs that use these device names.

Thanks,

Andy

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*               Andrey Tsouladze                *                   *
*          Webmaster/Systems Manager            *                   *
*                SPL WorldGroup                 * Cogito,           *
*              3b Yoni Netaniyahu               *                   *
*           Or-Yehuda 60200, Israel             *       ergo        *
*    E-mail: andy@spl.co.il                     *                   *
*    E-mail: tsoul@aluf.technion.ac.il          *            sum    *
*    http://www.spl.co.il/~andy                 *                   *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


Follow-Ups: References: