home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Enter 1999 June / enter_06_1999.iso / doc / HOWTO / Optical-Disk-HOWTO < prev    next >
Text File  |  1998-10-14  |  16KB  |  463 lines

  1.   Linux - Optical Disk HOWTO
  2.   Skip Rye, Skip_Rye@faneuil.com
  3.   v1.4, 22 December 1997
  4.  
  5.   This document describes the installation and configuration of optical
  6.   disk drives for Linux. Currently, the only drive covered well is the
  7.   Panasonic LF1000 PD Phase change optical drive with the SCSI-II inter-
  8.   face. Please, if any one has experiences with optical storage under
  9.   Linux, send it and I will update it in SGML and forward it to the
  10.   Linux community.
  11.   ______________________________________________________________________
  12.  
  13.   Table of Contents
  14.  
  15.  
  16.   1. Disclaimer
  17.  
  18.   2. Copyright
  19.  
  20.      2.1 LF1000 mini-HOWTO
  21.      2.2 Optical Disk-HOWTO
  22.  
  23.   3. Phase Change Optical Technology
  24.  
  25.      3.1 Introduction
  26.      3.2 Panasonic LF1000
  27.         3.2.1 POINTS OF INTEREST
  28.         3.2.2 THINGS YOU SHOULD KNOW
  29.         3.2.3 Installation
  30.         3.2.4 Installation steps
  31.         3.2.5 Usage hints
  32.      3.3 Additional Configuration concerns by Jeff Rooze
  33.  
  34.   4. Magneto Optical Technology
  35.  
  36.      4.1 Introduction
  37.  
  38.   5. Optical Jukeboxes
  39.  
  40.  
  41.  
  42.   ______________________________________________________________________
  43.  
  44.  
  45.   1.  Disclaimer
  46.  
  47.  
  48.   Neither the author nor the distributors of this HOWTO are in any way
  49.   responsible for physical, financial, moral or any other type of damage
  50.   incurred by following the suggestions in this text.
  51.  
  52.  
  53.  
  54.   2.  Copyright
  55.  
  56.   The "Optical Disk-HOWTO" and "LF1000 mini-HOWTO" are copyrighted.
  57.  
  58.  
  59.   2.1.  LF1000 mini-HOWTO
  60.  
  61.   (C) 1996,1997 by Skip Rye, abr@brspc_0064.msd.ray.com
  62.  
  63.   2.2.  Optical Disk-HOWTO
  64.  
  65.   (C) 1997 by Skip Rye, abr@brspc_0064.msd.ray.com
  66.  
  67.   Linux HOWTO documents may be reproduced and distributed in whole or in
  68.   part, in any medium physical or electronic, as long as this copyright
  69.   notice is retained on all copies. Commercial redistribution is allowed
  70.   and encouraged. The author, however, would like to be notified of any
  71.   such distributions. All translations, derivative works, or aggregate
  72.   works incorporating any Linux HOWTO documents must be covered under
  73.   this copyright notice. In other words, you may not produce a
  74.   derivative work from a HOWTO and impose additional restrictions on its
  75.   distribution.  Exceptions to these rules may be granted under certain
  76.   conditions. In short we wish to promote dissemination of this
  77.   information through as many channels as possible. However, we do wish
  78.   to retain copyright on the HOWTO documents, and would like to be
  79.   notified of any plans to redistribute the HOWTOs. Should you have any
  80.   questions, please contact Tim Bynum, the Linux HOWTO coordinator, at
  81.   linux-howto@sunsite.unc.edu.  You may finger his address for phone
  82.   number and additional contact information.
  83.  
  84.  
  85.   3.  Phase Change Optical Technology
  86.  
  87.  
  88.   3.1.  Introduction
  89.  
  90.   Optical Phase Change technology is used to create "In Phase" or "Out
  91.   of Phase" bits on a special media for phase change writing. The drive
  92.   uses a LASER of different power levels or LASER intensities to produce
  93.   this effect.  One power level allows the media to flow into a
  94.   crystalline form while the other creates an "Out of Phase" condition.
  95.   The crystallized areas reflect the read Lasers beam with a different
  96.   coefficient of reflectivity than the non-crystallized areas. Thus,
  97.   data can be read from the disk.
  98.  
  99.  
  100.   What makes the phase change optical disk special is that it the disk
  101.   is formated with concentric cylinders or tracks with each track being
  102.   sectored much like a magnetic disk or read/write optical disk. The
  103.   tracks are very close so a lot of data can be stored on a disk. This
  104.   is different from a CD-ROM in that it gives your system the look and
  105.   feel of a magnetic disk. CD-ROMs have a spiraling track much like a
  106.   audio record. Having tracks and sectors alone would not make the phase
  107.   change drive special from optical disk but the drive has some very
  108.   special properties; The phase change drive allows for direct overwrite
  109.   of data which magneto optical can't do inexpensively and the media has
  110.   the very special property of NOT being susceptible to magnetic fields
  111.   or as sensitive to static discharge which gives the media a very long
  112.   shelf life.
  113.  
  114.  
  115.   3.2.  Panasonic LF1000
  116.  
  117.  
  118.   3.2.1.  POINTS OF INTEREST
  119.  
  120.  
  121.   o  Read/Write optical disk.
  122.  
  123.   o  Can read CD-ROMs at 4X speed.
  124.  
  125.   o  Can read Kodak PhotoCDs.
  126.  
  127.   o  Media has a 15 Year shelf life.
  128.  
  129.   o  SCSI-2 Interface.
  130.  
  131.   o  Track/sector format as opposed to CD-ROMs spiraling record format.
  132.  
  133.   o  165ms access time - much better than a tape file restore.
  134.  
  135.   o  650Mb data storage per diskette.
  136.  
  137.   o  Diskettes are about $50 each.
  138.  
  139.  
  140.   3.2.2.  THINGS YOU SHOULD KNOW
  141.  
  142.  
  143.   o  Optical disk format not compatible with any other disk drive.
  144.  
  145.   o  Vendors don't seem to support UNIX very well - marketing is
  146.      targeted for DOS/Windows and Macintosh.
  147.  
  148.   o  Do NOT purchase the PD drive which uses the parallel port interface
  149.      - To my knowledge there is no Linux driver for it.
  150.  
  151.  
  152.   3.2.3.  Installation
  153.  
  154.   The LF1000 is SCSI-2 compatible device. It features a block size of
  155.   512 bytes and is compatible with the Linux SCSI drivers. This drive
  156.   was installed on a PC compatible AMD 100MHZ 486 with an Adaptic 1542C
  157.   SCSI bus-master controller. To install and mount a disk the following
  158.   steps were taken;
  159.  
  160.  
  161.   3.2.4.  Installation steps
  162.  
  163.  
  164.   o  Install the drive and set the SCSI address to not interfere with
  165.      other SCSI devices. Reconnect all cabling.
  166.  
  167.   o  Boot the computer. Your SCSI controller should note the new drive.
  168.  
  169.   o  During the Linux kernel boot, you should see an additional SCSI
  170.      device. In my case, having a magnetic system disk for device
  171.      /dev/sda it shows up as /dev/sdb.
  172.  
  173.   o  I did NOT partition the device because fdisk issued an overwrite
  174.      warning and I did not want to change anything from a dosemu
  175.      standpoint.
  176.  
  177.   o  mkfs -t ext2 /dev/sdb
  178.  
  179.   o  mkdir /pd
  180.  
  181.   o  mount -t ext2 -o ro,suid,dev,exec,auto,nouser,async /dev/sdb /pd -
  182.      Read only
  183.  
  184.   o  mount -t ext2 -o defaults /dev/sdb /pd - Mount drive W/R
  185.  
  186.   Your ready to "Rock'n'Roll"
  187.  
  188.  
  189.   3.2.5.  Usage hints
  190.  
  191.  
  192.   o  The media which comes with the drive is reported be re-writable
  193.      about 500,000 times. This means that it is not advisable to install
  194.      a live operating system such as Linux on the phase change optical
  195.      drive. These live operating systems tend to cache processes to and
  196.      from disk. Over time this can easily approach the phase change
  197.      media life.
  198.  
  199.   o  Mount drive read only as much as possible.
  200.  
  201.   o  When writing to the drive do so in large chunks. This will help
  202.      reduce any file fragmentation which will require more read seeks.
  203.  
  204.  
  205.   o  This is however an excellent media for backups, gifs, mpeg or
  206.      storing large programs which you don't use that often. The restore
  207.      from backup is much faster that tape. Backups can be performed
  208.      using the cp -rp command without the need for the ftape driver.
  209.      This however, will replace symbolic links with the actual file.
  210.  
  211.   o  If while using the PD for writing, You find that the file you just
  212.      wrote to the disk are not there, chances are that the disk write
  213.      protect tab is in write protect mode and you mounted it in
  214.      read/write mode.
  215.  
  216.  
  217.   3.3.  Additional Configuration concerns by Jeff Rooze
  218.  
  219.   Hello,
  220.  
  221.   I read your article on configuring the Panasonic LF-1000 for Linux. I
  222.   have configured my system so that the optical drive has its own device
  223.   name and the CD-ROM has its own device name.  This has allowed me to
  224.   mount either media at any time. I do not require any media in the
  225.   drive when I boot Linux. Also I am using the optical drive as an ext2
  226.   formatted media.
  227.  
  228.   I had a couple of minor difficulties in doing so.
  229.  
  230.  
  231.   First, I had configured my hard drive at SCSI ID 6 and my PD at SCSI
  232.   ID 4. (I wanted to have the hard drive at a higher priority that the
  233.   PD). This caused a problem with the Linux SCSI driver. The driver
  234.   scans the SCSI devices from the Lower SCSI id's to the higher (eg: 0
  235.   .. 6).  Consequently my logical device names were assigned differently
  236.   depending on which type of media was installed in the PD drive. This
  237.   caused a big problem. My Linux partition is on my SCSI hard drive and
  238.   the root device name would change! I corrected this problem by
  239.   modifying the software in the kernel SCSI driver to scan the devices
  240.   in reverse order.
  241.  
  242.   Second, the distribution Linux kernel does not scan all SCSI LUNS.
  243.   The PD/CD drive has a mode that establishes the CD-ROM at LUN 1 and
  244.   the PD at LUN 0. This mode is selected by the configuration switches
  245.   on the PD/CD drive. Switch #2 should be down (off?). If this switch is
  246.   up (on?), the signature of the device is dependent upon the media that
  247.   is installed and it only reports this device on LUN 0. If no media is
  248.   installed I think it defaults to CD-ROM.  I am using an Future Domain
  249.   16-xx SCSI interface card and the software in Linux kernel driver
  250.   supports an optical device signature when scanning the LUNS. I assume
  251.   that this is standard for most of the SCSI drivers. I reconfigured the
  252.   kernel to enable the "scan all LUNS" switch. The kernel then assigns
  253.   different device names for each device. The following is an excerpt
  254.   from by boot log. You will note a series of errors in this log. This
  255.   is because I did not have the optical media installed in the drive and
  256.   the driver was attempting to look at the partition table to determine
  257.   the block size. Fortunately it defaults to 512. I am planning on
  258.   modifying the Future Domain SCSI driver to not do this when it detects
  259.   the optical device.
  260.  
  261.  
  262.  
  263.  
  264.  
  265.   >  scsi0 <fdomain>: BIOS version 3.2 at 0xde000 using scsi id 7
  266.   >  scsi0 <fdomain>: TMC-18C50 chip at 0x140 irq 12
  267.   >  scsi0 : Future Domain TMC-16x0 SCSI driver, version 5.28
  268.   >  scsi : 1 host.
  269.   >    Vendor: CONNER    Model: CP30545 545MB3.5  Rev: A9AF
  270.   >    Type:   Direct-Access                      ANSI SCSI revision: 02
  271.   >  Detected scsi disk sda at scsi0, id 6, lun 0
  272.   >    Vendor: MATSHITA  Model: PD-1 LF-1000      Rev: A109
  273.   >    Type:   Optical Device                     ANSI SCSI revision: 02
  274.   >  Detected scsi disk sdb at scsi0, id 4, lun 0
  275.   >    Vendor: MATSHITA  Model: PD-1 LF-1000      Rev: A109
  276.   >    Type:   CD-ROM                             ANSI SCSI revision: 02
  277.   >  Detected scsi CD-ROM sr0 at scsi0, id 4, lun 1
  278.   >  fdomain: Selection failed
  279.   >  scsi : detected 1 SCSI cdrom 2 SCSI disks total.
  280.   >  SCSI Hardware sector size is 512 bytes on device sda
  281.   >  fdomain: REQUEST SENSE Key = 2, Code = 3a, Qualifier = 0
  282.   >  last message repeated 3 times
  283.   >  sdb : READ CAPACITY failed.
  284.   >  sdb : status = 0, message = 00, host = 0, driver = 28
  285.   >  sdb : extended sense code = 2
  286.   >  sdb : block size assumed to be 512 bytes, disk size 1GB.
  287.   >  .
  288.   >  .
  289.   >  .
  290.   >  Partition check:
  291.   >    sda: sda1 sda2 sda3
  292.   >  scsidisk I/O error: dev 0810, sector 0
  293.   >    unable to read partition table of device 0810
  294.  
  295.  
  296.  
  297.  
  298.   Third, I modified my file system table (/etc/fstab) to list each
  299.   device but do not attempt to auto mount when booting. I have included
  300.   an excerpt from my fstab. The most important options are the noauto,
  301.   rw(ro), and the checkpass flag.
  302.  
  303.   To create a ext2 file system on the PD, I used the command "mkfs.ext2
  304.   -i 2048 /dev/sdb".
  305.  
  306.  
  307.  
  308.        # fstab - List of file systems
  309.        #
  310.        # device  mount   type          options              dumpfrequency
  311.        checkpass
  312.        /dev/sdb /optd    ext2   rw,user,suid,noauto,sync,exec,dev,umask=0 0 2
  313.        /dev/sr0 /dist  iso9660  ro,user,suid,noauto,sync,exec,dev 0 2
  314.  
  315.  
  316.  
  317.  
  318.  
  319.   After making these changes, I have had no problems with mounting
  320.   either media. All I need to do is to load the media and type "mount
  321.   /optd" or "mount /dist" and the system does all the rest.
  322.  
  323.   I hope this information is useful.
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.   Jeff
  332.   --
  333.   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  334.   \ Jeff Rooze -- http://www.treknet.net/~jrooze -- jrooze@treknet.net /
  335.   /  If builders built buildings the way some programmers write        \
  336.   \  programs, then the first woodpecker that came along would destroy /
  337.   /  civilization.                                     GERALD WEINBERG \
  338.   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  339.  
  340.  
  341.  
  342.  
  343.  
  344.   I tried Jeff's suggestion. Here are the steps I performed;
  345.  
  346.   o  Modify my kernel using "make xconfig" in the /usr/src/linux
  347.      directory and installed it.
  348.  
  349.   o  Change the mode jumper on the PD drive to non-DOS mode. I soldered
  350.      a switch across the mode jumper connections and routed it the the
  351.      back panel. I figured out which switch position was the open
  352.      position and labeled this one for DOS.  The other position is of
  353.      course Linux.  So before I boot my system I decide which OS I'll be
  354.      using and set the switch accordingly. History shows it staying in
  355.      the Linux position more and more.
  356.  
  357.   o  Reboot your system. You should now see multiple LUN show up during
  358.      boot for the PD SCSI device number - It works great!!! If you have
  359.      an older kernel modify the "/usr/src/linux/drivers/scsi/config.in"
  360.      file.
  361.  
  362.   o  Update the fstab for both CD and PD drives.
  363.  
  364.   o  Use appropriate mount command.
  365.  
  366.   o  "df" to make sure your ready.
  367.  
  368.   I did try moving my primary SCSI drive to 6 but experienced some
  369.   difficulties. Can't remember exactly what it was but it may have been
  370.   that my controller "Adaptec 1542" with "Corel SCSI" requires a
  371.   bootable disk and SCSI 0 for the BIOS install to work properly with
  372.   DOS. So I switched it back and enjoyed playing with my properly
  373.   install PD drive! With this configuration "workman" - the audio CD
  374.   player util - works fine.
  375.  
  376.  
  377.   4.  Magneto Optical Technology
  378.  
  379.  
  380.   4.1.  Introduction
  381.  
  382.   Magneto optical drives use a "Far field" magnetic field and a laser to
  383.   change polarization of a magnetic media. The media is of such a nature
  384.   that it must be heated to the appropriate temperature before a
  385.   polarization change can happen - this is where the laser come in. A
  386.   high power write laser is used to heat the disk surface to the
  387.   appropriate temperature at which time the "Far field" can set the
  388.   polarization on the disk magnetic surface. After a short period of
  389.   time the disk surface cools and "locks" the polarization into place.
  390.   The read back I'm a little fuzzy on - someone please send me the
  391.   proper wording.  I think a low power laser is used for read back and
  392.   the "H" field of the disk polarization interacts with the "E" and "H"
  393.   field of the incident laser to produce a reflective polarization which
  394.   will correspond to the disk bit polarization - I hope this is in the
  395.   ballpark, it's certainly no home run. Maybe a total strike out.
  396.  
  397.   The use of a laser for polarization change allows the disk bit and
  398.   track densities to be higher than conventional "Flying" magnetic
  399.   heads. The "far field" means no more "head crashes" - that is assuming
  400.   your disk label doesn't peal off during the load or you don't leave
  401.   one of those sticky pads on the disk cartridge. Most media allows 650
  402.   Megs per platter and on some models both sides of the media is used
  403.   yielding 1.3Gig storage media - you must remove the media and flip it
  404.   over to use the other 650Megs though.
  405.  
  406.  
  407.   5.  Optical Jukeboxes
  408.  
  409.   I have no experience with optical jukeboxes with Linux!!!!  I have had
  410.   experiences with Optical Jukeboxes under HP-UX. In this setup the the
  411.   Jukebox had a SCSI address of it's own. Each slot in the Jukebox had
  412.   an associated LUN number. A device name was assigned for each disk
  413.   slot A side and B side. The mount command was run against the
  414.   appropriate device name. I had a Jukebox with just one drive and 16
  415.   optical disk slots - 20 Gig. I thought it was going to be a real
  416.   hassle to write a disk mount manager to share this drive among users
  417.   until I discovered you can mount as many disk as you want and the
  418.   Jukebox driver takes care of arbitration - what a nice feature.
  419.   Granted, you only want archive type data here and your overall system
  420.   configuration to be such that not too many processes will be accessing
  421.   the Jukebox at the same time. The disk spin down, carriage load,
  422.   carriage move, carriage unload, carriage move to the next disk,
  423.   carriage next disk load, carriage move, optical drive load, and spin
  424.   up takes about 12 seconds - "seek-from-hell".
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.