Linux Tape Backup: Difference between revisions

From Dave-Wiki
Jump to navigation Jump to search
(Created page with "=Linux Drivers= My first obstacle was getting the drive to show up in Linux. Apparently RHEL/CentOS decided to stop putting LSI SAS2008 (SAS9200-8e) drivers in the distro, starting with RHEL/CentOS8. Here's some more info: [https://access.redhat.com/discussions/3722151 https://access.redhat.com/discussions/3722151] Also a helpful vid: [https://www.youtube.com/watch?v=4fOAuXiynYM https://www.youtube.com/watch?v=4fOAuXiynYM] I was able to get the correct drivers for my L...")
 
No edit summary
Line 1: Line 1:
=Linux Drivers=
=Linux Drivers=
==LSI SAS2008==


My first obstacle was getting the drive to show up in Linux. Apparently RHEL/CentOS decided to stop putting LSI SAS2008 (SAS9200-8e) drivers in the distro, starting with RHEL/CentOS8. Here's some more info: [https://access.redhat.com/discussions/3722151 https://access.redhat.com/discussions/3722151] Also a helpful vid: [https://www.youtube.com/watch?v=4fOAuXiynYM https://www.youtube.com/watch?v=4fOAuXiynYM]
My first obstacle was getting the drive to show up in Linux. Apparently RHEL/CentOS decided to stop putting LSI SAS2008 (SAS9200-8e) drivers in the distro, starting with RHEL/CentOS8. Here's some more info: [https://access.redhat.com/discussions/3722151 https://access.redhat.com/discussions/3722151] Also a helpful vid: [https://www.youtube.com/watch?v=4fOAuXiynYM https://www.youtube.com/watch?v=4fOAuXiynYM]
Line 5: Line 7:
I was able to get the correct drivers for my LSI SAS9200-8e using the driver that matched my kernel (CentOS Stream 8/4.18.0-448.el8.x86_6) here: [http://mirror.centos.org/centos/8-stream/kmods/x86_64/packages-rebuild/Packages/k/ http://mirror.centos.org/centos/8-stream/kmods/x86_64/packages-rebuild/Packages/k/] (I used kmod-mlx4-4.18.0~448-1.el8s.x86_64.rpm).
I was able to get the correct drivers for my LSI SAS9200-8e using the driver that matched my kernel (CentOS Stream 8/4.18.0-448.el8.x86_6) here: [http://mirror.centos.org/centos/8-stream/kmods/x86_64/packages-rebuild/Packages/k/ http://mirror.centos.org/centos/8-stream/kmods/x86_64/packages-rebuild/Packages/k/] (I used kmod-mlx4-4.18.0~448-1.el8s.x86_64.rpm).


Also, FWIW, I'm using a Quantum Ultrium LTO 4 (Model B) SAS Tape Drive attached to a LSI SAS9200-8E. I'm using a fresh install of CentOS Stream 8 on a Dell PowerEdge R730xd.
Also, FWIW, I'm using a Quantum Ultrium LTO 4 (Model B) SAS Tape Drive attached to a LSI SAS9200-8e. I'm using a fresh install of CentOS Stream 8 on a Dell PowerEdge R730xd.
 
==LSI SAS3008 / Dell 12Gbps HBA==
 
I have since switched to a LSI SAS3008 PCI-Express Fusion-MPT SAS-3 (branded as a Dell 0T93GD 12G SAS HBA Low Profile Dual Port Host Bus Adapter) and the card just worked out of the box with RHEL 9.3. I'm still using the Quantum Ultrium LTO 4 (Model B) SAS Tape Drive, mounted in a 2U Dell PowerVault 114X enclosure.


=Using The Tape Drive In Linux=
=Using The Tape Drive In Linux=

Revision as of 21:52, 1 June 2024

Linux Drivers

LSI SAS2008

My first obstacle was getting the drive to show up in Linux. Apparently RHEL/CentOS decided to stop putting LSI SAS2008 (SAS9200-8e) drivers in the distro, starting with RHEL/CentOS8. Here's some more info: https://access.redhat.com/discussions/3722151 Also a helpful vid: https://www.youtube.com/watch?v=4fOAuXiynYM

I was able to get the correct drivers for my LSI SAS9200-8e using the driver that matched my kernel (CentOS Stream 8/4.18.0-448.el8.x86_6) here: http://mirror.centos.org/centos/8-stream/kmods/x86_64/packages-rebuild/Packages/k/ (I used kmod-mlx4-4.18.0~448-1.el8s.x86_64.rpm).

Also, FWIW, I'm using a Quantum Ultrium LTO 4 (Model B) SAS Tape Drive attached to a LSI SAS9200-8e. I'm using a fresh install of CentOS Stream 8 on a Dell PowerEdge R730xd.

LSI SAS3008 / Dell 12Gbps HBA

I have since switched to a LSI SAS3008 PCI-Express Fusion-MPT SAS-3 (branded as a Dell 0T93GD 12G SAS HBA Low Profile Dual Port Host Bus Adapter) and the card just worked out of the box with RHEL 9.3. I'm still using the Quantum Ultrium LTO 4 (Model B) SAS Tape Drive, mounted in a 2U Dell PowerVault 114X enclosure.

Using The Tape Drive In Linux

The main program you will use is call "mt". You can install it by running sudo yum install mt-st.

/dev/st0 rewinds tape after being written to

/dev/nst0 don't rewind tape after being written to

Check if tape is online

mt -f /dev/st0 status

A cartdrige is inserted and ready to write. Because we used /dev/st0, the tape is now positioned at the beginning.

List The First file

file - < /dev/nst0

Example Output: blah

Forward Tape To Next File

mt -f /dev/nst0 fsf 1

Seek To A File On The Tape

mt -f /dev/nst0 asf {file_number}

File numbers start at zero (0).

Write Directory To Tape, At Current Position

tar cvf /dev/nst0 {directory}

or, you can also write the file list to a file so you have a record of files:

tar cvf /dev/nst0 {directory} | tee {listing.txt}

Rewind The Tape

mt -f /dev/nst0 rewind

List The Files In The Current Tar File

Make sure you move to the tar file you want, first

tar tf /dev/nst0

or, you can also write the file list to a file so you have a record of files:

tar tf /dev/nst0 | tee {listing.txt}