home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / HOWTO / FTAPE-HO < prev    next >
Encoding:
Text File  |  1995-04-20  |  36.9 KB  |  1,166 lines

  1.   ftape-HOWTO
  2.   Kai Harrekilde-Petersen, <khp@pip.dknet.dk>
  3.   v1.3,    February 5th, 1995 for ftape-2.02
  4.  
  5.   This HOWTO discuss the essentials of the do's    and dont's for the ftape
  6.   driver under Linux.  The ftape driver    interfaces to QIC-40, QIC-80,
  7.   QIC-3010 and QIC-3020    compatible drives only.    The QIC-3010 and
  8.   QIC-3020 standards are also known as `QIC-WIDE'.  These drives con-
  9.   nects    via the    floppy disk controller (FDC).  It does not cover SCSI or
  10.   QIC-02 tape drives.  DAT tape    drives usually (always?) connect to a
  11.   SCSI controller.  This is but    one of the Linux HOWTO documents.  You
  12.   can get the HOWTO's from sunsite.unc.edu:/pub/Linux/doc/HOWTO    (this is
  13.   the ``official'' place) or via the web from the Linux    Documentation
  14.   home page (http://sunsite.unc.edu/mdw/linux.hmtl).  You cannot rely on
  15.   the HOWTO's being posted to comp.os.linux.announce, as some newsfeeds
  16.   have complained about    their size.
  17.  
  18.   1.  Legalese
  19.  
  20.  
  21.   This is the `Frequently Asked    Questions' (FAQ) / HOWTO document for
  22.   the ftape driver (ftape-HOWTO), Copyright (C)    1993, 1994, 1995 Kai
  23.   Harrekilde-Petersen.
  24.  
  25.   Copyright statement:
  26.  
  27.   You may distribute this document freely as a whole in    any form and
  28.   free of charge.  You may distribute parts of this document, provided
  29.   this copyright message is included and you include a message stating
  30.   that it is not the full HOWTO    document and a pointer to where    the full
  31.   document can be obtained.  Specifically, it may be included in
  32.   commercial distributions, without my prior consent.  However,    I would
  33.   like to be informed of such usage.
  34.  
  35.   You may translate this HOWTO into any    language, whatsoever, provided
  36.   that you leave this copyright    statement and the disclaimer intact, and
  37.   that you append a notice stating who translated the document.
  38.  
  39.   DISCLAIMER:
  40.  
  41.   While    I have tried to    include    the most correct and up-to-date
  42.   information available    to me, I cannot    guarantee that usage of    the
  43.   information in this document does not    result in loss of data.     I
  44.   provide NO WARRANTY about the    information in the HOWTO and I cannot be
  45.   made liable for any consequences for any damage resulting from using
  46.   information in this HOWTO.
  47.  
  48.  
  49.  
  50.   2.  News flash
  51.  
  52.  
  53.   This isn't exactly news, but anyway: the page    numbers    in the Table of
  54.   Contents (which appear at least in the LaTeX'ed versions), are off-by
  55.   one (ie: things appear one page later    than what the table of contents
  56.   thinks.  I can't help    it).
  57.  
  58.  
  59.      version 1.3 (Feb 5, 1995)
  60.  
  61.      o    New section on how to create an    emergency boot disk added
  62.     (written by Claus Tondering, <ct@login.dknet.dk>).
  63.  
  64.      version 1.2 (Feb 2, 1995)
  65.  
  66.  
  67.      o    IOmega Tape Accellerator II controller added.
  68.  
  69.      version 1.12 (Jan 16, 1995)
  70.  
  71.      o    Updated    to ftape-2.02.
  72.  
  73.      o    2.01a patch removed again :-)
  74.  
  75.      version 1.11 (Jan 15, 1995)
  76.  
  77.      o    Updated    to ftape-2.01a and included the    2.01a patch.
  78.  
  79.      version 1.1 (Jan 11, 1995)
  80.  
  81.      o    Corrected a typo in Antti's email address.
  82.  
  83.      o    Updated    to ftape-2.01
  84.  
  85.      o    List of    known drives expanded
  86.  
  87.      o    Added more about the QIC-3010/3020 (QIC-WIDE) support
  88.  
  89.  
  90.  
  91.   3.  The preliminaries
  92.  
  93.  
  94.   Note that I (the howto-maintainer) no    longer use ftape myself, so I
  95.   cannot give much up-to-date advice on    e.g. compiling ftape.  If you
  96.   have a problem, try posting on comp.os.linux.help, or    to the TAPE
  97.   channel (see ``Following the ftape development'' below).  You    should
  98.   try to post a    summary    of your    problems and its solution(s), after
  99.   you've got it    working, even if you only got it partially working.
  100.   Please also send me (<khp@pip.dknet.dk>) a copy of your solution so
  101.   that I can add it to the HOWTO.
  102.  
  103.   I read my mail daily,    I try to respond to everyone, but I cannot
  104.   guarantee that I will    respond    immediately.  Also, I seldomly read the
  105.   newsgroups (comp.os.linux.help et al), as my Internet    access is
  106.   through a modem line and I have to read news On-line 8-(.
  107.  
  108.   If you recieve this as part of a printed distribution    or on a    CD-ROM,
  109.   please check out the Linux Documentation home    page
  110.   (http://sunsite.unc.edu/mdw/linux.hmtl) or ftp to sunsite.unc.edu:
  111.   /pub/Linux/doc/HOWTO to see if there exists a    more recent version.
  112.   This could potentially save you a lot    troubles.
  113.  
  114.  
  115.  
  116.  
  117.  
  118.   4.  Getting and installing ftape
  119.  
  120.  
  121.   I will eventually include an installation guide in this section.
  122.   You'll have to do without it,    for the    moment being.
  123.  
  124.  
  125.   4.1.    What is    ftape
  126.  
  127.  
  128.   ftape    is a driver program that controls various low-cost tape    drives
  129.   that connect to the floppy controller.
  130.  
  131.   ftape    is not a backup    program    as such; it's a    device driver, which
  132.   allows you to    use the    tape drive (just like the SoundBlaster 16 driver
  133.   let you use your sound card) through the device file /dev/[n]rft[0-3].
  134.  
  135.   ftape    is written by Bas Laarhoven <bas@vimec.nl>, with ``a little help
  136.   from his friends'' to    sort out the ECC (Error    Correcting Code) stuff.
  137.   ftape    is copyrighted by Bas under the    GNU General Public License,
  138.   which    basically says:    ``go ahead and share this with the world, just
  139.   don't    disallow other people from copying it further''.
  140.  
  141.   ftape    is currently beta testing, and has been    that for some time now.
  142.   Although it seems reasonable stable and reliable, it still changes
  143.   relatively often. These changes are either because some bug as been
  144.   unearthed, or    (what has happen a few times recently) because the
  145.   modules interface in the Linux kernel    has changed.
  146.  
  147.   ftape    supports drives    that conform to    the QIC-117 and    one of the
  148.   QIC-80, QIC-40, QIC-3010, and    QIC-3020 standards.  ftape does    not
  149.   support QIC-02 tape drives or    drives that connect via    a SCSI
  150.   interface, e.g. a DAT    drive.    SCSI drives are    accessed as
  151.   /dev/[n]st[0-7] and are supported by the kernel through the SCSI
  152.   drivers.  If you look    for help on SCSI tape drives, you should read
  153.   the SCSI-howto.  See section ``Supported drives'' and    ``Un-supported
  154.   drives'' for a list of supported and unsupported drives.
  155.  
  156.  
  157.  
  158.   4.2.    How fast is ftape?
  159.  
  160.  
  161.   You can achieve quite    respectable backup and restore speeds with
  162.   ftape: I have    a Colorado DJ-20 and an    Adaptec    1542CF controller, and
  163.   have measured    a 4.25Mbyte/min    sustained data transfer    rate (no
  164.   compression) across a    70Mbyte    tar archive, while comparing the archive
  165.   on the tape with data    on my IDE disk.     The speed of ftape is mostly
  166.   dependent on the data    transfer rate of your FDC: The AHA1542CF has a
  167.   ``post-1991 82077'' FDC, and it will push 1Mbit/sec at the tape drive.
  168.   If you have an FDC which can only deliver 500Kbit/sec    data rates, you
  169.   will see half    the transfer rate (well, roughly).
  170.  
  171.  
  172.  
  173.   4.3.    The newest version of ftape - and where    to get it
  174.  
  175.  
  176.   The newest version of    the ftape driver is ftape-2.02,    which consists
  177.   of ftape-2.02.tar.gz and ftape-lsm.  ftape can be fetched from the
  178.   following sites:
  179.  
  180.  
  181.  
  182.        sunsite.unc.edu [152.2.22.81]: /pub/Linux/kernel/tapes/
  183.  
  184.  
  185.  
  186.  
  187.   You should get the files: ftape-2.02.tar.gz, and ftape-lsm. The
  188.   .tar.gz  file    is the ftape driver proper, while the lsm file is a
  189.   Linux    Software Map (LSM) file    for the    LSM project.
  190.  
  191.   Newer    kernels    (from 1.1.85 and on), have improved support for    loadable
  192.   modules (by Bjorn Ekwall and Jacques Gelinas), which (if possible)
  193.   allows you to    insert modules compiled    for an `old' kernel into a `new'
  194.   kernel.  To compile the kernel with this improved module support, you
  195.   need the modules-1.1.87.tar.gz file.    It can be found    on
  196.   tsx-11.mit.edu and sunsite.unc.edu: (on sunsite, it's    still in
  197.   pub/Linux/Incoming).    You must compile and install it    before you
  198.   compile the kernel.
  199.   WARNING: ftape-1.14 does not work. You must upgrade to at least
  200.   ftape-1.14a.
  201.  
  202.   Note that the    version    number of ftape    jumped from 1.14d directly to
  203.   2.00.
  204.  
  205.  
  206.   4.3.1.  Patches to ftape-2.02
  207.  
  208.  
  209.   Around 1.1.85    of the Linux kernel, <linux/sched.h> stopped including
  210.   the <linux/mm.h> file, which ftape needs.  Therefore,    you must add it
  211.   to ftape.h by    hand.
  212.  
  213.  
  214.  
  215.        --- ftape.h.orig           Mon Jan 23 22:44:22 1995
  216.        +++ ftape.h     Mon Jan 23 22:05:48 1995
  217.        @@ -31,6    +31,7 @@
  218.      */
  219.  
  220.     #include <linux/sched.h>
  221.        +#include <linux/mm.h>
  222.  
  223.     #include "tracing.h"
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.   4.3.2.  Problems with    kernel version 1.1.5x
  231.  
  232.  
  233.   During patchlevel 50 to 60, the floppy driver    got changed a few times.
  234.   A some point,    the floppy driver forgot to release the    interrupt line
  235.   (IRQ6).  This    would result in    that you could not use ftape and a
  236.   floppy drive at the same time.  It also resulted in the if you tried
  237.   to make a ``rescue disk'' (a very sensible thing), where you would
  238.   boot from floppy and then restore from your backup tape, you
  239.   experience that when you used    ftape, it would    say `unable to grab IRQ6
  240.   for ftape driver'. No    fun.  The solution is to upgrade the kernel
  241.   (v1.1.59 will    work).
  242.  
  243.  
  244.  
  245.   4.4.    If you have ftape-1.14a, or earlier
  246.  
  247.  
  248.   There    have been fixed    some serious bugs in the driver    and you    should
  249.   really consider to upgrade to    at least 1.14d.
  250.  
  251.  
  252.   4.5.    ftape driver Following the development of the
  253.  
  254.  
  255.   If you want to follow    the development    of the ftape driver, you should
  256.   consider subscribing to the TAPE channel on Linux-activists.    To
  257.   subscribe, you send a    mail to    <linux-activists-
  258.   request@niksula.hut.fi>, with    the first line (or as a    part of    the
  259.   header) saying `X-Mn-Admin: join TAPE'.  If you send an empty    mail you
  260.   are sent a HOWTO mail.
  261.  
  262.   To submit a real mail    to the mailing lists, send a mail to <linux-
  263.   activists@niksula.hut.fi>, and remember that the first line (or a
  264.   header line) should read `X-Mn-Key: TAPE'.
  265.   To get off the TAPE channel (:-(), send a mail to <linux-activists-
  266.   request@niksula.hut.fi> with the line    `X-Mn-Admin: leave TAPE'
  267.  
  268.   There    is also    a TAPE mailing list on vger.rutgers.edu. To subscribe to
  269.   it, send a mail saying `subscribe linux-tape'    to
  270.   majordomo@vger.rutgers.edu.  When you    subscribe, you will be sent a
  271.   greeting mail, which will tell you how to submit real    mails and how to
  272.   get off the list again.
  273.  
  274.  
  275.  
  276.   4.6.    Compiling and installing the ftape driver
  277.  
  278.  
  279.   There    is included an installation guide (the file Install-guide) in
  280.   the ftape distribution; please read that.
  281.  
  282.  
  283.  
  284.   4.7.    Where to get the kernel    sources
  285.  
  286.  
  287.   You can get the kernel sources from the same place as    you got    the
  288.   ftape    sources.  The sources are kept at the following    sites (and many
  289.   mirror-sites)
  290.  
  291.  
  292.  
  293.        tsx-11.mit.edu   [18.172.1.2]: /pub/linux/sources/system/
  294.        sunsite.unc.edu [152.2.22.81]: /pub/Linux/kernel/
  295.        ftp.funet.fi     [128.214.248.6]: /pub/OS/Linux/PEOPLE/Linus
  296.  
  297.  
  298.  
  299.  
  300.   You will find    a number of subdirectories, including two named    v1.0 and
  301.   v1.1.     These contain (you guessed it!) v1.0 and v1.1 of the kernel.  I
  302.   suggest that you get version 1.1.<something>.
  303.  
  304.  
  305.  
  306.   4.8.    Can I format my    tapes under Linux?
  307.  
  308.  
  309.   No!  Honestly, noone is working on it: If you    want to    work on    it, drop
  310.   Bas a    line. You'll have to use MessyDOS (arghhh!)  instead or    buy
  311.   preformatted tapes.  However,    some of    the preformatted tapes are not
  312.   checked for bad sectors!.  If    the ftape driver encounters a tape with
  313.   no bad blocks, it will issue a warning.  If ftape barfs at your
  314.   preformatted tapes, try out your DOS software.  If both the DOS
  315.   software and ftape barfs on your tapes, a reformat will very probably
  316.   cure the problem.
  317.  
  318.   Note that to be able to use your newly formatted tapes under ftape,
  319.   you must erase the tape first:
  320.  
  321.  
  322.            mt -f /dev/nftape erase
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.   4.9.    Which formatting programs can I    use under DOS?
  332.  
  333.  
  334.   These    are known to work:
  335.  
  336.  
  337.   o  Colorado Memory System's software (tape.exe)
  338.  
  339.   o  Conner Backup Basics v1.1 and all Windows versions
  340.  
  341.   o  Norton Backup
  342.  
  343.   o  QICstream version 2
  344.  
  345.   o  Tallgrass FileSecure v1.52
  346.  
  347.   These    programs are known to be more or less buggy:
  348.  
  349.  
  350.   o  Conner Backup Basics 1.0
  351.  
  352.   o  Colorado Windows tape program
  353.  
  354.   o  CP    Backup (wastes tape space, but is OK apart from    that)
  355.  
  356.   In fact, most    software under DOS should work.     The Conner Backup
  357.   Basics v1.0 has a parameter off-by-one (someone could    not read the
  358.   QIC-80 specs right!),    which is corrected in version 1.1.  However,
  359.   ftape    detects    this, and will work around it.    Dennis T. Flaherty
  360.   (<dennisf@denix.elk.miles.com>) report that Conner C250MQ owners can
  361.   obtain the new v1.1, by calling Conner at 1-800-4Conner (in the US)
  362.   and ask for an upgrade (for a    nominal    fee for    the floppy).  The
  363.   Windows versions should work fine.  Some versions of Colorado's tape
  364.   program for windows, has an off-by-one error in the number of
  365.   segments. ftape also detect and work around that bug.
  366.  
  367.   Central Point    Backup can be used, but    it wastes precious tape    space
  368.   when it encounters a bad spot    on the tape.
  369.  
  370.   NOTE:    If you are running a formatting    software under DOS, which is not
  371.   mentioned here, please mail the relevant info    to me
  372.   (<khp@pip.dknet.dk>),    so I can update    the HOWTO.
  373.  
  374.  
  375.  
  376.   4.10.     Mixing    ftape and floppies
  377.  
  378.  
  379.   Since    both the floppy    driver and ftape needs the FDC (and IRQ6), they
  380.   cannot run concurrently.  Thus, if you have mounted a    floppy and then
  381.   try to access    the tape drive,    ftape will complain that it cannot grab
  382.   IRQ6 and then    die.  This is especially a problem when    designing a
  383.   emergency disk for use with ftape.  This solution is to either load
  384.   the boot/root    disk into a ramdisk and    then unmount the floppy, or have
  385.   two FDC's.
  386.  
  387.  
  388.  
  389.  
  390.  
  391.   5.  (Un)supported hardware
  392.  
  393.  
  394.  
  395.  
  396.  
  397.   5.1.    Supported tape drives
  398.  
  399.  
  400.   All drives that are both QIC-117 compatible and either QIC-40    or
  401.   QIC-80 compatible should work. There are also    experimental support of
  402.   QIC-3010 and QIC-3020    drives (QIC-3010/302 can use 8mm tapes.    This is
  403.   sometimes refered to as `QIC-WIDE'). Currently, the list of drives
  404.   that are known to work with ftape is:
  405.  
  406.  
  407.   o  Alloy Retriever 250
  408.  
  409.   o  Archive 5580i / XL9250i
  410.  
  411.   o  Colorado DJ-10 / DJ-20 (aka: Jumbo    120 / Jumbo 250)
  412.  
  413.   o  Conner C250MQ
  414.  
  415.   o  Conner TSM420R (partly)
  416.  
  417.   o  Escom / Archive (Hornet) 31250Q
  418.  
  419.   o  Insight 80Mb
  420.  
  421.   o  Iomega 250
  422.  
  423.   o  Mountain FS8000
  424.  
  425.   o  Summit SE 150 / SE    250
  426.  
  427.   o  Tallgrass FS300 (needs a tiny hack    to work    with AHA1542B)
  428.  
  429.   o  Memorex tape drive    backup system
  430.  
  431.   o  Wangtek 3080F
  432.  
  433.   You can always check out the newest list of drives that are recognised
  434.   by ftape, by looking in the file vendors.h in    the ftape distribution.
  435.  
  436.   Although I do    not want to endorse one    drive type over    another, I want
  437.   to mention that the Colorado DJ-20 drive is rather noisy, when
  438.   compared to, say, a Conner C250MQ drive ('tis    said that the Colorado
  439.   is 5-10 times    as noisy as the    Conner drive. I    can't tell for sure, but
  440.   I have a Colorado, and it is quite noisy).
  441.  
  442.   If you have a    Tallgrass FS300    and an AHA1542B, you need to increase
  443.   the bus-on / bus-off time of the 1542B.  Antti Virjo
  444.   (<klanvi@uta.fi>), says that changing    CMD_BUSON_TIME to 4 and
  445.   CMD_BUSOFF_CMD to 12 in linux/drivers/scsi/aha1542.c will do the
  446.   trick.
  447.  
  448.   One user has reported    that ftape works (partially) the with Conner
  449.   TSM420R drive, which supports    both QIC-80 (normal) and `QIC-WIDE'
  450.   tapes.  As of    right now, ftape provides only experimental support the
  451.   QIC-WIDE tapes, and you should consider it it    sheer luck that    the
  452.   TSM420R works    at all with ftape (or any other    QIC-WIDE drive).
  453.   Hopefully, the TSM420R drive,    and other QIC-WIDE drives, will    be
  454.   supported fully soon.     If you    have a drive that can use QIC-WIDE
  455.   tapes, are interested    in getting it to work with ftape, and not afraid
  456.   of being ALPHA tester, drop Bas <bas@vimec.nl> a mail, stating which
  457.   drive    you have.
  458.  
  459.   NOTE:    If you have a drive that works fine, but it is not listed here,
  460.   please send a    mail to    the HOWTO maintainer (<khp@pip.dknet.dk>).
  461.  
  462.  
  463.   5.2.    Supported special controllers
  464.  
  465.  
  466.   These    dedicated high-speed tape controllers are supported by ftape:
  467.  
  468.  
  469.   o  Colorado FC-10
  470.  
  471.   o  Mountain MACH-2
  472.  
  473.   o  IOmega Tape Accelerator II
  474.  
  475.   Support for the FC-10    controller has been merged into    the ftape driver
  476.   in version 1.12. See the RELEASE-NOTES and the Makefile files    in the
  477.   ftape    distribution.
  478.  
  479.   The support for the MACH-2 controller    was added in ftape-1.14d.
  480.  
  481.   To use the IOmega Tape Accelerator II, use -DMACH2, and set the right
  482.   settings for I/O base, IRQ and DMA.  This works (by the empirical
  483.   testing of Scott Bailey <sbailey@xcc.mc.xerox.com>), with at least
  484.   ftape-2.02.
  485.  
  486.  
  487.   Anti-Colorado    message:
  488.  
  489.   As of    lately,    Colorado has proved themselves totally unwilling to help
  490.   with FC-10 and FC-20 support.     This is sad, and can only force me to
  491.   say: Don't buy a Colorado high-speed controller, or even a Colorado
  492.   tape drive.  Why support a manufacturer, who does not    want to    support
  493.   his own product?
  494.  
  495.  
  496.  
  497.   5.3.    Un-supported tape drives
  498.  
  499.  
  500.  
  501.   o  All drives    that connect to    the parallel port (eg: Colorado    Trakker)
  502.  
  503.   o  High-Speed    controller's. (eg: Colorado TC-15  & FC-20)
  504.  
  505.   o  Irwin AX250L / Accutrak 250. (not a QIC-80    drive)
  506.  
  507.   o  IBM Internal Tape Backup Unit (identical to the Irwin AX250L drive)
  508.  
  509.   o  COREtape light
  510.  
  511.   Generally, ALL drives    that connect to    the parallel port are NOT
  512.   supported.  This is because these drives uses    (different) proprietary
  513.   interfaces, that are very much different from    the QIC-117 standard.
  514.  
  515.   The Colorado TC-15 controller    (and it's like)    are not    supported
  516.   directly by the ftape    driver.     The only `special' controllers    that can
  517.   be used with ftape is    the Colorado FC-10 and the Mountain MACH-2 (see
  518.   above).
  519.  
  520.   The Irwin AX250L (and    the IBM    Internal Tape Backup Unit) does    not work
  521.   the ftape.  This is because they only    support    QIC-117, but not the
  522.   QIC-80 standard (they    use Irwin's proprietary    servoe (Rhomat)    format).
  523.   I know nothing about the Rhomat format, nor where to get any info on
  524.   it.  Sorry.
  525.  
  526.   The COREtape light, does not accept the initialisation commands, we're
  527.   feeding it. This pretty much leaves the drive    unusable.
  528.  
  529.   5.4.    Using an external tape drive with ftape
  530.  
  531.  
  532.   If you have a    floppy controller which    has a female DB37 connector on
  533.   the bracket (and some    means of delivering power to the drive), you can
  534.   use it with ftape.  OK, that sentence    was not    very obvious. Let's try
  535.   it this way: Some FDC's (the very ancient one's), have a DB37
  536.   connector on the bracket, for    connecting to external floppy drives.
  537.  
  538.   If you make a    suitable cable (from a quick glance on an FDC that I've
  539.   got lying around, it seems to    be a straight 1-to-1 cable. However,
  540.   your milage may vary)    from the DB37 connector    (on the    FDC) and to your
  541.   external tape    drive, you can get ftape to control your tape drive.
  542.  
  543.   This is because that from a program's    view there is no difference
  544.   between the internal and the external    connectors. So,    from ftape's
  545.   point    of view, they are identical.
  546.  
  547.  
  548.  
  549.   5.5.    ftape Getting PCI motherboards to work with
  550.  
  551.  
  552.   Unfortunately, some PCI motherboards cause problems when running
  553.   ftape.  Some people have experienced that ftape would    not run    in a PCI
  554.   based    box, but ran flawlessly    in a normal ISA    based 386DX machine.  To
  555.   quote    from the RELEASE-NOTES file in the ftape distribution:
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.   More PCI news:
  596.   --------------
  597.  
  598.   There    have been more reports about PCI problems, some    of them
  599.   were solved by upgrading the (flash) BIOS.
  600.   Other    rumours    are that it has    to do with the FDC being on the
  601.   PCI bus, but that is not the case with the Intel Premiere boards.
  602.  
  603.   Here is a list of systems and    the BIOS versions known    to work:
  604.  
  605.   board:              bios revision:
  606.  
  607.   Intel    Premiere PCI (Revenge)      1.00.09.AF2
  608.  
  609.   Intel    Premiere PCI II    (Plato)      1.00.08.AX1 (disable GAT in BIOS!)
  610.                   1.00.10.AX1
  611.  
  612.   To see if you're having the GAT problem, try making a    backup
  613.   under    DOS. If    it's very slow and often repositions you're
  614.   probably having this problem.
  615.  
  616.   PCI news:
  617.   ---------
  618.   There    have been some problem reports from people using PCI-bus based
  619.   systems getting overrun errors.
  620.   I wasn't able    to reproduce these until I ran ftape on    a Intel    Plato
  621.   (Premiere PCI    II) motherboard    with bios version 1.00.08AX1.
  622.   It turned out    that if    GAT (Guaranteed    Access Timing) is enabled (?)
  623.   ftape    gets a lot of overrun errors.
  624.   The problem disappears when disabling    GAT in the bios.
  625.   Note that Intel removed this setting (permanently disabled) from the
  626.   1.00.10AX1 bios !
  627.  
  628.   It looks like    that if    GAT is enabled there are often large periods
  629.   (greater than    120 us !??) on the ISA bus that    the DMA    controller cannot
  630.   service the floppy disk controller.
  631.   I cannot imagine this    being acceptable in a decent PCI implementation.
  632.   Maybe    this is    a `feature' of the chipset. I can only speculate why
  633.   Intel    choose to remove the option from the latest Bios...
  634.  
  635.   The lesson of    this all is that there may be other motherboard
  636.   implementations having the same of similar problems.
  637.   If you experience a lot of overrun errors during a backup to tape,
  638.   see if there is some setting in the Bios that    may influence the
  639.   bus timing.
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.   6.  Backing up and restoring data
  649.  
  650.  
  651.   This section describes some simple uses of tar and mt.
  652.  
  653.  
  654.  
  655.   6.1.    Writing    an archive to a    tape
  656.  
  657.  
  658.   You can use `tar', `dd', `cpio', and `afio'. You will    need to    use `mt'
  659.   to get the full potential of your tapes and the ftape    driver.     For a
  660.   start    I'd recommend using `tar', as it can archive lots of directories
  661.   and let you pick out seperate    files from an archive.    I have been told
  662.   that cpio creates smaller archives and is more flexible than tar, but
  663.   I haven't tried it myself.  `afio' creates backups where each    file is
  664.   compressed individually and then concatenated.  This will allow you to
  665.   access the files ``after'' the point of the error.  If you use gzipped
  666.   tar files, all data after the    point of the error is lost! (to    me, this
  667.   is a pretty good reason for NOT using    compression on backups).
  668.  
  669.   To make a backup of your kernel source tree using tar, do this
  670.   (assuming you    have the sources in /usr/src/linux):
  671.  
  672.  
  673.  
  674.            cd /usr/src
  675.            tar cf /dev/ftape linux
  676.  
  677.  
  678.  
  679.  
  680.   This will not    compress the files, but    gives you a smoother tape run.
  681.   If you want the compression (and you've got tar 1.11.2), you just
  682.   include the -z flag(*), eg: `tar czf /dev/ftape linux'
  683.  
  684.   For further instructions on how to use tar, dd and mt    look at    the man
  685.   pages    and the    texinfo    files that comes with the respective
  686.   distributions.
  687.  
  688.   (*) tar assumes that the first argument is options, so the `-' is not
  689.   necessary, i.e. these    two commands are the same: `tar    xzf /dev/ftape'
  690.   and `tar -xzf    /dev/ftape'
  691.  
  692.  
  693.  
  694.   6.2.    Restoring an archive
  695.  
  696.  
  697.   OK, let us restore the backup    of the kernel source you made in section
  698.   ``Writing an archive to a tape'' above.  To do this you simply say
  699.  
  700.  
  701.  
  702.            tar xf /dev/ftape
  703.  
  704.  
  705.  
  706.  
  707.   If you used compression, you will have to say
  708.  
  709.  
  710.  
  711.            tar xzf /dev/ftape
  712.  
  713.  
  714.  
  715.  
  716.   When you use compression, gzip will complain about trailing garbage
  717.   after    the very end of    the archive (and this will lead    to a `broken
  718.   pipe'    message).  This    can be safely ignored.
  719.  
  720.   For the other    utilities, please read the man page.
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.   6.3.    Testing    the archive
  728.  
  729.  
  730.   tar has an option (-d) for detecting differences between two archives.
  731.   To test your backup of the kernel source say
  732.  
  733.  
  734.  
  735.            tar df /dev/ftape
  736.  
  737.  
  738.  
  739.  
  740.   If you do not    have the man page for tar, you are not lost (yet); tar
  741.   has a    builtin    option list: try `tar --help 2>&1 | more'
  742.  
  743.  
  744.  
  745.   6.4.    Putting    more than one tar file on a tape
  746.  
  747.  
  748.   To put more than one tar file    on a tape you must have    the mt utility.
  749.   You will probably have it already, if    you got    one of the mainline
  750.   distributions, e.g.  Slackware or Debian.
  751.  
  752.   tar generates    a single Tape ARchive (that's why it is    called `tar')
  753.   and knows nothing about multiple files or positioning    of a tape, it
  754.   just reads or    writes from/to a device. mt knows everyting about moving
  755.   the tape back    and forth, but nothing about reading the data off the
  756.   tape.     As you    might have guessed, tar    and mt in conjunction, does the
  757.   trick.
  758.  
  759.   By using the nrft[0-3] (nftape) device, you can use `mt' to position
  760.   the tape the correct place (`mt -f /dev/nftape fsf 2'    means step over
  761.   two ``file marks'', i.e.  tar    files) and then    use tar    to read    or write
  762.   the relevant data.
  763.  
  764.  
  765.  
  766.   6.5.    Appending files    to an archive
  767.  
  768.  
  769.   ``Is there a way to extend an    archive    -- put a file on the tape, then
  770.   later, add more to the tape?''
  771.  
  772.   No. The tar documentation will tell you to use `tar -Ar', but    it does
  773.   not work.  This is a limitation of the current ftape driver.
  774.  
  775.  
  776.  
  777.   6.6.    Mount/unmounting tapes
  778.  
  779.  
  780.   Since    a tape does not    have a ``filesystem'' on it, you do not    mount /
  781.   unmount the tape.  To    backup,    you just insert    the tape and run your
  782.   `tar'    command    (or whatever you use to    access the tape    with).
  783.  
  784.  
  785.  
  786.  
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.   7.  Creating an emergency boot floppy    for ftape
  794.  
  795.  
  796.   This section was written by Claus Tondering <ct@login.dknet.dk>.
  797.  
  798.   Once you are the happy owner of a tape drive and several tapes full of
  799.   backups, you will probably ask yourself this question: ``If everything
  800.   goes wrong, and I completely lose my hard disk, how do I restore my
  801.   files    from tape?''
  802.  
  803.   What you need    is an emergency    floppy disk that contains enough files
  804.   to enable you    to boot    Linux and restore your hard disk from tape.
  805.  
  806.   The first thing you should do    is to read ``The Linux Bootdisk    HOWTO''
  807.   written by Graham Chapman <grahamc@zeta.org.au>.  That document tells
  808.   you almost everything    you need to know about making an emergency
  809.   floppy boot kit.  The    paragraphs below contain a few extra pieces of
  810.   information that will    make your life a bit easier when you follow
  811.   Graham Chapman's procedures:
  812.  
  813.  
  814.   o  You don't really need /etc/init, /etc/inittab, /etc/getty,    and
  815.      /etc/rc.d/* on your floppy    disk.  If Linux    doesn't    find /etc/init,
  816.      it    will start /bin/sh on your console, which is fine for restoring
  817.      your system.  Deleting these files    gives you extra    space on your
  818.      floppy, which you will probably need.
  819.  
  820.   o  Find a small version of /bin/sh.  They are    frequently available on
  821.      the boot floppies that come with a    Linux distribution.  This again
  822.      will give you extra space.
  823.  
  824.   o  The /etc/fstab you    include    on your    floppy disk should look    like
  825.      this:
  826.  
  827.  
  828.            /dev/fd0           /           minix   defaults
  829.            none           /proc           proc    defaults
  830.  
  831.  
  832.  
  833.  
  834.  
  835.   Once you have    booted from your floppy, give the command:
  836.  
  837.  
  838.            mount -av
  839.  
  840.  
  841.  
  842.  
  843.  
  844.   o  Make sure your floppy drive is not    mounted    when you access    the
  845.      streamer tape!  Otherwise you may get the following error message:
  846.  
  847.  
  848.            Unable to grab IRQ6 for ftape driver
  849.  
  850.  
  851.  
  852.  
  853.  
  854.   This implies that you    MUST load the floppy into a RAMDISK.
  855.  
  856.   This has the unfortunate consequence that the    programs needed    to
  857.   restore the files from the tape must not be located on a separate
  858.   floppy disk.    You have two options here:
  859.      1.    You place tar (or cpio or afio or whatever other backup    program
  860.     you use) on your root floppy disk.  (This is where you'll need
  861.     all the    extra space created in the steps above.)
  862.  
  863.      2.    Before you start restoring from    tape, copy tar (or cpio    or afio
  864.     or whatever) to    your hard disk and load    it from    there.
  865.  
  866.   o  Apart from    your backup program, you will probably need mt on your
  867.      root floppy as well.
  868.  
  869.   o  Make sure your ftape device (typically /dev/nrft0)    is present on
  870.      your boot floppy.
  871.  
  872.   o  Finally: TRY IT! Of course, I don't recommend that    you destroy your
  873.      hard disk contents    to see if you are able to restore everything.
  874.      What I do recommend, however, is that you try booting from    your
  875.      emergency disks and make sure that    you can    at least make a    file
  876.      listing of    the contents of    your backup tape.
  877.  
  878.  
  879.  
  880.  
  881.  
  882.   8.  Frequently Asked Questions
  883.  
  884.  
  885.   This is a collection of questions I get asked    once in    a while, which
  886.   could    fall into the category of FAQ's.  If you feel that there is some
  887.   question that    ought to be added to the list, please feel free    to mail
  888.   me (but do include an    answer,    thanks!).
  889.  
  890.  
  891.  
  892.   8.1.    Can I exchange tapes with someone using    DOS?
  893.  
  894.  
  895.   No.  The DOS software    conforms to the    QIC-80 specs about the layout of
  896.   the DOS filesystem, and it should(?)    be a small problem to write a
  897.   program that can read/write the DOS format.  In fact,    I'd bet    that
  898.   creating a nice user interface would be a bigger problem.
  899.  
  900.  
  901.  
  902.   8.2.    How do I `....'    with tar?
  903.  
  904.  
  905.   These    are really tar questions: Please read the man page and the info
  906.   page.     If you    have not got it    either,    try `tar --help    2>&1 | more'.
  907.  
  908.   If your version of tar is v1.11.1 or earlier,    consider upgrading to
  909.   v1.11.2 - This version can call GNU zip directly (i.e.: it supports
  910.   the -z option) and has an elaborate help included.  Also, it compiles
  911.   right    out of the box on Linux.
  912.  
  913.  
  914.  
  915.   8.3.    ftape DMA transfers gives ECC errors
  916.  
  917.  
  918.   Sadly    to say there are some SVGA cards and ethernet cards that do not
  919.   decode their addresses correct.  This    typically happens when the ftape
  920.   buffers are in the range 0x1a0000 to 0x1c0000.  Somehow, the DMA write
  921.   cycles get clobbered and every other byte written gets a bad value
  922.   (0xff).  These problems are reported to happen with both SVGA    and
  923.   ethernet cards.  We know of at least one (bad?) ATI 16bit VGA    card
  924.   that caused this.
  925.   The easiest solution is to put the card in an    8bit slot (it is often
  926.   not enough to    reconfigure the    card to    8bit transfers).  Moving the
  927.   ftape    buffer away from the VGA range is only a partial solution; All
  928.   DMA buffers used in Linux can    have this problem!  Let    us make    this one
  929.   clear: This has nothing to do    with the ftape software.
  930.  
  931.  
  932.  
  933.   8.4.    insmod says the    kernel version is wrong
  934.  
  935.  
  936.   The insmod program checks the    kernel version against the version
  937.   recorded in the ftape    driver.     This is a string in kernel-version.h,
  938.   (e.g.: #define KERNEL_VERSION    "1.1.72";) which is extracted from the
  939.   kernel you are running when you run `make dep'.  If you got the error
  940.   when you tried to insert the ftape driver, remove the    file `kernel-
  941.   version.h', type `make dep; make' again and the kernel-version.h file
  942.   should be updated.  Remember that you    will have to do    this every time
  943.   you change to    another    kernel version.
  944.  
  945.  
  946.  
  947.   8.5.    added The v1.1.0 kernel    wont compile when ftape    support    is
  948.  
  949.  
  950.   (Although I haven't heard a lot of complains,    I include it here, just
  951.   to be    sure)
  952.  
  953.   This was due to a typo (and a    hacker who didn't use ftape himself, so
  954.   he never got around to actually test the code    he wrote).  This is
  955.   corrected by patch1.gz, which    can be found from the usual ftp    sites.
  956.  
  957.  
  958.  
  959.   8.6.    format''' ftape    complains that ``This tape has no 'Linux raw
  960.  
  961.  
  962.   You get this complaint, if you haven't erased    your freshly formatted
  963.   tape.    This is    because    ftape wants a ``magic header'' on the tape, to
  964.   be able that it is allowed to    interpret the header segment in    it's own
  965.   way (eg: file    marks).    To remove the problem, say `mt -f /dev/nftape
  966.   erase'
  967.  
  968.  
  969.  
  970.   8.7.    binaries/sources/manpages?  Where can I    find the tar/mt/cpio/dd
  971.  
  972.  
  973.   All of these tools have been developed by the    GNU project, and the
  974.   source (and man page)    can be fetched from just-about any ftp site in
  975.   the world (including ftp.funet.fi, tsx-11.mit.edu, and
  976.   sunsite.unc.edu).  In    any case they can be fetched from the official
  977.   GNU home site: prep.ai.mit.edu [18.71.0.38]:/pub/gnu.     The latest
  978.   versions (by 26. march 94) are:
  979.  
  980.  
  981.  
  982.            cpio:   2.3 (cpio-2.3.tar.gz)
  983.            dd:     3.9 (fileutils-3.9.tar.gz)
  984.            mt:     2.3 (cpio-2.3.tar.gz)
  985.            tar:    1.11.2 (tar-1.11.2.tar.gz)
  986.            gzip:   1.2.4 (gzip-1.2.4.tar.gz)
  987.  
  988.  
  989.  
  990.  
  991.   They all compile out of the box on Linux v1.0.4 / libc v4.5.19 / gcc
  992.   v2.5.8 (The rmt program does not compile out of the box, but it is not
  993.   needed as it is only used for    accessing the tape drive remotely).
  994.   There    is a patch for mt included in the ftape    distribution, which
  995.   makes    the mt status command spew out usable information for ftape
  996.   drives.
  997.  
  998.  
  999.  
  1000.   8.8.    Where can I obtain the QIC standards?
  1001.  
  1002.  
  1003.   If you wish to help developing ftape,    or add some utility (e.g. a tape
  1004.   formatting program), you will    need that appropriate QIC standards.
  1005.   The standard(s) to get is: QIC-80 and    perhaps    QIC-117.  QIC-117
  1006.   describes how    commands are sent to the tape drive (including timing
  1007.   etc),    so you would probably never need it.  QIC-80 describes the tape
  1008.   layout, ECC code, standard filesystem    and all    such ``higher-level''
  1009.   stuff.  You can get the QIC standards    from the following address:
  1010.  
  1011.  
  1012.  
  1013.        Quarter Inch Cartridge Drive Standars, Inc.
  1014.        311 East    Carrillo Street
  1015.        Santa Barbara, California 93101
  1016.        Phone: (805) 963-3852
  1017.        Fax:   (805) 962-1541
  1018.  
  1019.  
  1020.  
  1021.  
  1022.  
  1023.   8.9.    What block-size    to use with tar
  1024.  
  1025.  
  1026.   When using compression, and in all general, it can be    a benefit to
  1027.   specify to tar, that it should block the output into chunks.    Since
  1028.   ftape    cuts things into 29Kbyte blocks, saying    `-b58' should be
  1029.   optimum.
  1030.  
  1031.   ``Why    29Kbyte?'', I hear you cry.  Well, the QIC-80 standard specifies
  1032.   that all data    should be protected by an Error    Correcting Code    (ECC)
  1033.   code.     The code specified in the QIC-80 standard is known as a Reed-
  1034.   Solomon (R-S)    code.  The R-S code takes 29 data bytes    and generates 3
  1035.   parity bytes.     To increase the performance of    the ECC    code, the parity
  1036.   bytes    are generated across 29    1Kbyte sectors.     Thus, ftape takes
  1037.   29Kbytes of data, adds 3Kbytes of ECC    parity,    and writes 32Kbytes to
  1038.   the tape at a    time.  For this    reason,    ftape will always read 32K byte
  1039.   blocks to be able to detect (and correct) data errors.
  1040.  
  1041.   If you are curious, and wish to know more, look in the ecc.c and ecc.h
  1042.   files, they an explanation of    the code and a reference to a textbook
  1043.   on Reed-Solomon codes.
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.   9.  Debugging    the ftape driver
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.   9.1.    bug?  The kernel/ftape crashes on me when I do `...' - is that a
  1058.  
  1059.  
  1060.   No, that is a    feature    ;-)
  1061.  
  1062.   Seriously, reliable software do not crash.  Especially kernels do not
  1063.   or rather should not crash.  If the kernel crashes upon you when you
  1064.   are running ftape, and you can show that it is ftape that is messing
  1065.   things up, regard it as a Bug    That Should Be Fixed.  Mail the    details
  1066.   to Bas (<bas@vimec.nl>) and to the tape channel.
  1067.  
  1068.  
  1069.   9.2.    OK, it's a bug ...ehhh... feature - How    do I submit a report?
  1070.  
  1071.  
  1072.   First, make sure you can reproduce the problem.  Spurious errors are a
  1073.   pain in the ass, since they are just about impossible    to hunt    down :-/
  1074.   This is a quick check    list:
  1075.  
  1076.  
  1077.   o  Kernel version, and patches applied
  1078.  
  1079.   o  ftape version
  1080.  
  1081.   o  tape drive    model /    manufacturer
  1082.  
  1083.   o  Expansion bus type    (EISA, ISA, PCI, or VL-bus)
  1084.  
  1085.   o  What you did to expose the    problem
  1086.  
  1087.   o  What went wrong on    your system.
  1088.  
  1089.   o  Do    not delete the kernel and the ftape.o file. We may want    you run
  1090.      try some patches out or run a different test on your system.
  1091.  
  1092.   Increase the tracing level to    7 (just    below maximum tracing) and run
  1093.   the offending    command    again.    Get the    tracing    data from the kernel log
  1094.   or /proc/kmsg, depending on where you    harvest    your error messages.
  1095.   Try to look at what ftape spews out at you.  It may look in-
  1096.   comprehensible to you    at first, but you can get valuable information
  1097.   from the logfile.  Most messages have    a function name    prepended, to
  1098.   make it easier to locate the problem.     Look through the source, don't
  1099.   just cry ``WOLF!'', without giving it    a try.    If your    version    of the
  1100.   kernel (or ftape for that matter), is    ``old'', when compared to the
  1101.   newest version of the    kernel,    try to get a newer (or even the    newest)
  1102.   kernel and see if the    problem    goes away under    the new    kernel.     When
  1103.   you post your    problem    report,    include    the information    about ftape
  1104.   version, kernel version, expansion bus type (ISA, VL-bus, PCI    or
  1105.   EISA), bus speed, floppy controller, and tape    drive.    State exactly
  1106.   what you did,    and what happened on your system.  Some    people have
  1107.   experienced that ftape would not run in a PCI    based box, but ran
  1108.   flawlessly in    a normal ISA based 386DX machine (see section ``Getting
  1109.   PCI motherboards to work with    <tt>ftape</tt>'' on PCI    machines above)
  1110.  
  1111.   Also,    please think of    the poor souls who actually pay    the their
  1112.   Internet access (like    me): avoid posting a (huge) log    from the ftape
  1113.   run, without reason.    Instead, you could describe the    problem, and
  1114.   offer    to send    the log    to the interested parties.
  1115.  
  1116.   Send your bug    report to <linux-activists@niksula.hut.fi> (remember to
  1117.   add a    `X-Mn-Key: TAPE' line in the header).  You might also want to
  1118.   mail the bug to <bas@vimec.nl>.
  1119.  
  1120.  
  1121.  
  1122.  
  1123.   9.3.    How do I change    the trace-level?
  1124.  
  1125.  
  1126.   You can do this two ways: either change the default trace-level (the
  1127.   var `tracing'    in file    `ftape-rw.c') and recompile or say
  1128.  
  1129.  
  1130.  
  1131.            mt -f /dev/ftape    fsr <tracing-level>
  1132.  
  1133.  
  1134.  
  1135.  
  1136.   The use of the fsr command in    mt is a    hack, and will probably
  1137.   disappear or change with time.
  1138.  
  1139.  
  1140.   9.4.    ftape keep saying `... new tape', what do I do?
  1141.  
  1142.  
  1143.   [You cannot do this anymore; I do not    know a way of fixing it]
  1144.  
  1145.   To get rid of    this, do this (blindfold): login as root and say `rmmod
  1146.   ftape'.  ftape should    choke a    few times, give    three segmentation
  1147.   violations (or so), and give up life.
  1148.  
  1149.   Check    the activity LED on your floppy    drive (you do have one,    don't
  1150.   you?).  If it    is constantly lit, you have turned the floppy cable
  1151.   upside down somewhere.  Check    your cable between controller, tape
  1152.   drive    and floppy drive.  Usually, one    (or more) of the connectors have
  1153.   been turned upside down, such    that pin 1 in one end connects to pin 34
  1154.   in the other end.  (All the even-numbered pins are grounded, so you
  1155.   wont be able to use your floppy either).  Don't worry; this cannot
  1156.   damage your hardware.
  1157.  
  1158.  
  1159.   9.5.    When I use /dev/nftape,    I get garbage ... why?
  1160.  
  1161.  
  1162.   This was a problem in    `the old days',    before version 0.9.10.
  1163.   Nowadays, the    non-rewinding devices are working.  If you have    anything
  1164.   earlier, I strongly recommend    you to update to (at least) the    1.14d
  1165.   version, preferably v2.02
  1166.