![background image](http://html1.mh-extra.com/html/quantum/dlt-1/dlt-1_install-manual_3663611003.webp)
# cd /
# tar cvf /dev/st0 tmp
# tar xvf /dev/st0 tmp
Until you’re sure your DLTtape drive is operating correctly, use test files that you can afford to lose when
you overwrite them with a restore.
Turn hardware compression off:
DLTtape drives usually have hardware compression turned on by default upon power-up. Some datasets
that you want to back up may already be highly compressed via software. When backing up data that is not
further compressible, there is no benefit from using the hardware compression on the DLTtape drive. You
can toggle hardware compression using the
mt
command.
Using GNU
mt
,
# mt -f /dev/st0 datcompression 0 # turns compression off
Compression off.
# mt -f /dev/st0 datcompression 2 # turns compression on
Compression on.
# mt -f /dev/st0 datcompression 1 # reports whether on or off
Compression on.
Using
mt-st
,
# mt -f /dev/st0 compression 0 # turns compression off
# mt -f /dev/st0 compression 1 # turns compression on
Tuning for performance
DLTtape drives perform best when large blocksizes are used.
Check that your drive is set to variable blocksize mode, which is the default, and also the preferred mode
under Unix.
mt
status should report the drive blocksize as 0 bytes. If not, this can be changed using the
mtsetblk
operation.
Specify a large per-drive buffer – say 128 Kbytes - to the
st
driver. The fastest way to do this is to pass the
kernel the boot-time option
st=128
. Just specify
append=”st=128”
for your kernel of choice in
/etc/lilo.conf
, run
lilo
, and reboot. Any time you rebuild the kernel from sources, you can also hard-code
the buffer-size by editing the
st_options.h
file (it’s in
/usr/src/linux/drivers/scsi
). Look for the
ST_BUFFER_BLOCKS
parameter in this file, and change its value to 128 (the default value is 32
Kbytes).
Explicitly specify a blocksize of 64 Kbyte or 128 Kbyte to backup and restore utilities such as
tar
:
# cd /
# tar cvbf 128 /dev/st0 home
# tar xvbf 128 /dev/st0 home
For good backup speed, you also need to make sure your disk drives and filesystems are cooperating by
delivering the data fast enough. If you have several slow disk drives, experiment with software packages
such as
raidtools
to see if disk striping helps. Keeping the filesystem defragmented is always a good idea;
it should improve sequential file-read performance. Check your favorite Linux mirror-site for alternative
backup tools. Some of them implement double-buffering, which could help reduce the frequency of
repositioning on DLTtape drives.