What I have and want

Here's what I have:

and I just want to do simple backups to the tape drive using dump and restore.

The LSI card came with the tape drive, and the 1U server has room for that PCI card. My 1U server also has a 2TB Seagate Constellation ES.2, which is 6Gb/s SAS. My backups are about 110GB in total. I am using rsync to pull files from our NFS server (home directories and mail) to this 1U server and then dumping them at a later time to tape every now and then. For our rsync scripts I have followed Mike Rubel's approach.

Setting up the PCI card

This card from LSI has two modes: RAID and Initiator/Target (IT). To use it with a tape drive, we want it in IT mode, but I think they all come by default in IR (RAID) mode. I just followed the directions that came with the drive, but a few steps were unclear, so I am adding them here:

Now the sas2flash program for linux shows the upgraded FIRMWARE and BIOS:

$ sudo ./sas2flash -listall
LSI Corporation SAS2 Flash Utility
Version 10.00.00.00 (2011.05.13) 
Copyright (c) 2008-2011 LSI Corporation. All rights reserved 

Adapter Selected is a LSI SAS: SAS2008(B1)   

Num   Ctlr            FW Ver        NVDATA        x86-BIOS         PCI Addr
----------------------------------------------------------------------------
0  SAS2008(B1)     14.00.00.00    0e.03.00.01    07.27.00.00     00:01:00:00

Finished Processing Commands Successfully.
Exiting SAS2Flash.
and when you boot the machine and hit Cntrl-C when the LSI message appears on the console, you see the card is in IT mode.

Using the tape drive

This part was really easy. I just connected the tape drive, turned on the tape drive, and then booted the computer. The device file (/dev/nst0) was all set and the mt and dump commands just worked.

$ cat /proc/scsi/scsi
Host: scsi4 Channel: 00 Id: 00 Lun: 00
Vendor: QUANTUM  Model: ULTRIUM 5        Rev: 3082
Type:   Sequential-Access                ANSI  SCSI revision: 06

$ lsmod | grep st
st                     45134  0

$ ls -l /dev/nst*
crw-rw---- 1 root tape 9, 128 Aug 10 17:30 /dev/nst0
crw-rw---- 1 root tape 9, 224 Aug 10 17:30 /dev/nst0a
crw-rw---- 1 root tape 9, 160 Aug 10 17:30 /dev/nst0l
crw-rw---- 1 root tape 9, 192 Aug 10 17:30 /dev/nst0m

$ TAPE=/dev/nst0

(put tape in tape drive)

$ sudo mt -f $TAPE rewind
$ sudo dump 0anf $TAPE /root/snapshots/mail.0
  DUMP: Date of this level 0 dump: Mon Aug 13 13:34:55 2012
  DUMP: Dumping /dev/sdb1 (/root/snapshots (dir /mail.0)) to /dev/nst0
  DUMP: Label: none
  DUMP: Writing 10 Kilobyte records
  DUMP: mapping (Pass I) [regular files]
  DUMP: mapping (Pass II) [directories]
  DUMP: estimated 1481037 blocks.
  DUMP: Volume 1 started with block 1 at: Mon Aug 13 13:34:56 2012
  DUMP: dumping (Pass III) [directories]
  DUMP: dumping (Pass IV) [regular files]
  DUMP: Closing /dev/nst0
  DUMP: Volume 1 completed at: Mon Aug 13 13:35:20 2012
  DUMP: Volume 1 1480910 blocks (1446.20MB)
  DUMP: Volume 1 took 0:00:24
  DUMP: Volume 1 transfer rate: 61704 kB/s
  DUMP: 1480910 blocks (1446.20MB) on 1 volume(s)
  DUMP: finished in 22 seconds, throughput 67314 kBytes/sec
  DUMP: Date of this level 0 dump: Mon Aug 13 13:34:55 2012
  DUMP: Date this dump completed:  Mon Aug 13 13:35:20 2012
  DUMP: Average transfer rate: 61704 kB/s
  DUMP: DUMP IS DONE

$ sudo dump 0anf $TAPE /root/snapshots/hourly.0/users1
  DUMP: Date of this level 0 dump: Mon Aug 13 13:36:18 2012
  DUMP: Dumping /dev/sdb1 (/root/snapshots (dir /hourly.0/users1)) to /dev/nst0
  DUMP: Label: none
  DUMP: Writing 10 Kilobyte records
  DUMP: mapping (Pass I) [regular files]
  DUMP: mapping (Pass II) [directories]
  DUMP: estimated 19179805 blocks.
  DUMP: Volume 1 started with block 1 at: Mon Aug 13 13:36:44 2012
  DUMP: dumping (Pass III) [directories]
  DUMP: dumping (Pass IV) [regular files]
  DUMP: Closing /dev/nst0
  DUMP: Volume 1 completed at: Mon Aug 13 13:41:12 2012
  DUMP: Volume 1 19158960 blocks (18709.92MB)
  DUMP: Volume 1 took 0:04:28
  DUMP: Volume 1 transfer rate: 71488 kB/s
  DUMP: 19158960 blocks (18709.92MB) on 1 volume(s)
  DUMP: finished in 263 seconds, throughput 72847 kBytes/sec
  DUMP: Date of this level 0 dump: Mon Aug 13 13:36:18 2012
  DUMP: Date this dump completed:  Mon Aug 13 13:41:12 2012
  DUMP: Average transfer rate: 71488 kB/s
  DUMP: DUMP IS DONE

End results: I get an average transfer rate of about 73MB/sec, so my Level 0 dump of about 110GB takes about 25 minutes!


Useful links


back to helps
Last Modified: Mon 13 Aug 2012 04:24:01 PM EDT