Tape Drives: Difference between revisions
(First page) |
mNo edit summary |
||
Line 56: | Line 56: | ||
=Using Tape Drives via PCI pass through with extra SCSI controller= | =Using Tape Drives via PCI pass through with extra SCSI controller= | ||
not implemented yet. | not implemented yet. | ||
[[Category: HOWTO]] | [[Category: HOWTO]][[Category: Hardware]] |
Revision as of 16:55, 31 March 2010
Introduction
In some situations its needed to have access to a directly attached tape drive in a KVM guest. Main reason is to run a backup software in a KVM guest using the tape drive physically connected to the Proxmox VE host.
Note: you need to run the latest Proxmox VE 1.4 to use tape drives
Using Tape Drives as iSCSI target (for Windows KVM guests)
For this article we tested with Symantec Backup Exec 12.5, running in a Win2008 R2 guest and a HP Ultrium 3 drive. We suggest to setup an iSCSI target which exports the tape drive (on the Proxmox VE host). That way you can access the tape inside the VM with the standard iSCSI initiator (already included in Windows 2008). The Proxmox kernel already includes all needed iSCSI target modules. You just need to install 2 additional packages:
# apt-get install iscsi-scst scstadmin
The following command should list the scsi address of your tape drive
# cat /proc/scsi_tgt/scsi_tgt |grep tape 0:0:3:0 dev_tape
Then edit the SCST configuration file /etc/scst.conf to export above address:
[HANDLER tape] DEVICE 0:0:3:0 [ASSIGNMENT Default] DEVICE 0:0:3:0,0
After that you need to reload the configuration:
/etc/init.d/scst reload
Now the tape is exported and accessible via iSCSI. You may also want to setup access control with /etc/initiators.allow or /etc/initiators.deny, or add additional target setting in /etc/iscsi-scstd.conf. For details see http://scst.sourceforge.net/
The directory /proc/scsi_tgt/ contains the scsi target status (useful for debugging). Also check the output of 'dmesg'.
Windows iSCSI initiator
For Windows XP/2003, Microsoft offers a free software initiator. Just install and connect as usual and you will see the tape drive in the device manager. Win2008/Vista/Win7 already includes the iSCSI initiator software. We noticed a quite unstable iSCSI in Windows 2003 but very stable iSCSI in Windows 2008 R2.
Linux iSCSI initiator
On Linux, use the open-iscsi initiator.
Using Tape Drives as SCSI pass through (for Linux KVM guests)
Above method also works with Linux using the open-iscsi initiator.
Another way it to use SCSI pass-through. You first need to find out which (generic) scsi device is assigned to your tape. On my system this is 'sg0'
# cat /sys/class/scsi_generic/sg0/device/model Ultrium 3-SCSI
Now edit the VM config file directly (/etc/qemu-server/XXX.conf) and add a line
scsi0: /dev/sg0
Then stop and start the VM again (a simple reboot is not enough).
Using Tape Drives via PCI pass through with extra SCSI controller
not implemented yet.