Views:

Summary



This article describes how to persistently set a tape drive for variable block size mode on Linux.

Resolution



In some distributions of Linux (notably RedHat), the default blocksize for tape devices is not a variable blocksize. You can change this by mounting tapes into the drives and issuing the mt-f <dev file> setblk 0 command. This setting may not persist after the tape is dismounted from the drive. Use stinit to make the change automatic.

  1. Use the DPX detect utility to get the vendor and model of the tape drive:

    <root@echo bin># /opt/BackEx/bin/JB/detect -q

    The following is the output of the detect utility:

    SCSI Devices found:
    ------------------
    Device Target Adapter Device
    File ID LUN ID BUS STATUS Type String
    --------- ----- --- ------ --- ------ ---------------------- -------------
    /dev/nst0 1 0 0 0 0 Sequental Access Device IBM ULTRIUM-TD1
    /dev/nst1 5 0 0 0 0 Sequental Access Device IBM ULTRIUM-TD1
    /dev/sg2 6 0 0 0 0 Medium Changer Device PLASMON FTA


     
  2. Create the stinit definition file in /etc/stinit.def.

    <root@echo bin># cat /etc/stinit.def
    manufacturer=IBM model = "ULTRIUM-TD1"
    {mode1 blocksize=0 compression=1}
     
  3. Initialize the drives by typing in stinit (without loading tapes into the drives). The file will be read at boot time.