Operating System - Linux
1827876 Members
1744 Online
109969 Solutions
New Discussion

Re: Shared Tape Issue in Linux

 
SOLVED
Go to solution
Alan Hatch
Advisor

Shared Tape Issue in Linux

Folks,

We are trying to use tape drives via a tape SAN with Linux (DP media server). We are encountering the same issue on Linux that we do on other operating systems where the OS from one host tries to access the tape device for some reason (mt command, scsi probe etc) and it causes the tape to rewind resulting in serious issues for the backup software.

With HP-UX we use a st_san_safe switch in the kernel to avoid this behavior. With windows, we ensure that the SAN connected servers cannot see SAN tape drives from the OS.

Has anyone been succesful with Linux hosts connected to SAN based tape devices in a heterogenous environment?

Thanks.

HW - HP DL385 (AMD 64 bit)
OS - Linux (RHEL4.2)
HBAs- HP FCA2214 (Qlogic)
Drives - IBM LTO2, HPLTO1
Application - Data Protector 5.5
5 REPLIES 5
Mancboy
Valued Contributor

Re: Shared Tape Issue in Linux

1) check your fibre card firware revisions and all drivers

2) in DP ensure that all servers see the same device under the same serial number. Make sure the lock name is the same and also the Multipath device and Automatically discover changed SCSI address check boxes are checked.
You can always force a reload of the serial number too in DP.
Alan_152
Honored Contributor

Re: Shared Tape Issue in Linux

The last I checked, Linux had problems with multi-initiator tape access in general, and in particular with DP5.5. HP doesn't support it in the Linux environment.

What I would recommend to have the best shot at this is the following:

1) upgrade to rhel4u4
2) use the qlogic version of the hba drivers and firmware, not the redhat or hp versions.
3) do a good reading of the man files for the mt/mtx command series. There are several switches and raw device variants that may help run things slightly better.
Kodjo Agbenu
Honored Contributor
Solution

Re: Shared Tape Issue in Linux

Hi,

As far as I know, DP configures Unix/Linux tape devices using the "no rewind" device file (ex : /dev/nst0 instead of /dev/st0).

Check this and change your configuration if needed.

Tip : delete the "rewind" device file (rm /dev/st0) to avoid other programs trying to access it.

Good lcuk.
Kodjo
Learn and explain...
Alan Hatch
Advisor

Re: Shared Tape Issue in Linux

Thanks for all the feedback. I currently have a call escalated with both HP and Red Hat.

Red Hat recommeded that I change the default perms that the rewind devices were created with:

The easiest way should be to edit the:
/etc/udev/permissions.d/50-udev.permissions
Please make a backup of this file before editing.
Then remove the "st*:root:disk:0660" line.

But root can still issue commands against those devices. Also, when we reboot the Linux media server, it appears that we are hitting the rewind devices and corrupting backup jobs from other attached hosts.

I'll post an update should a solution become available.
Alan Hatch
Advisor

Re: Shared Tape Issue in Linux

Folks,

I've been up and running for a couple of days now and hope we found a solution. Based on this experience, here are the lessons learned about running a Data Protector media server on Red Hat linux:

1) Don't use 64 bit Linux. This required a special dvbra to run sanconf.
2) If you're on a heterogeneous tape SAN, remove access to the rewind devices. This is how I approached it (based on suggestions from Red Hat support):

Rename rewind devices:
edit-> /etc/udev/rules.d/50-udev.rules
add-> KERNEL="st[0-9]*", BUS="scsi", NAME="xst%n"

Change default perms on rewind devices:
edit-> /etc/udev/permissions.d/50-udev.permissions
change st perms line to-> xst*:root:disk:0000

Of course, your mileage may vary, but this seems to be working well in our environment.