Add a tape drive to a vm

fxandrei

Renowned Member
Jan 10, 2013
154
14
83
So i have a tape drive, connected to LSI sas controller.
The controller has 4 ports.
2 of them are used for some external enclosure, and 2 of them for this tape drive.

So what i need to do is somehow pass the tape drive to a VM.
I cannot pass the whole pci device because of the external enclosures.

I can see the tapedrive if i run:
tapeinfo -f /dev/st0

Its a IBM ULT3580-HH9

So is it possible to somehow pass this device to a vm ?

If not, what alternative to i have to use the tape drive ? Maybe directly on the pve host ?
 
If there is physical space, then you could add another SAS controller just for the tape-lib and pass through that one.

Maybe directly on the pve host ?
You are dealing with a Debian based system here. So you can modify it quite a bit if you want.

But without knowing what you want to achieve, it is hard to say. :)
 
If there is physical space, then you could add another SAS controller just for the tape-lib and pass through that one.


You are dealing with a Debian based system here. So you can modify it quite a bit if you want.

But without knowing what you want to achieve, it is hard to say. :)
Thanks for the reply.
Yes, im aware that i could add another sas controller, and pass that to the VM.
Im trying to see if there is a alternative solution to this.

So yes, im using debian as its a proxmox host.

I dont actually know what options i have on debian in order to use this tape drive. I just want to write some backup on it from time to time.
 
I dont actually know what options i have on debian in order to use this tape drive. I just want to write some backup on it from time to time.
Well, how would you use it in the VM and where does the data come from? If you use some CLI tools to write to tape and the PVE host can access the data, it might work to run it directly on the host.
 
  • Like
Reactions: Kingneutron
Yes, I think the right question here is " why do you think you need to virtualize a tape drive, and specifically to 1 VM? "

A tape drive is typically host-level hardware so all the things on the server can benefit from it.


> I dont actually know what options i have on debian in order to use this tape drive. I just want to write some backup on it from time to time.

https://unix.stackexchange.com/questions/611559/using-tandberg-lto5-and-debian-10-buster


I suggest you start with a search on " linux tape drive howto " and look into front-end backup software.

https://wiki.debian.org/BackupAndRecovery
 
Well, how would you use it in the VM and where does the data come from? If you use some CLI tools to write to tape and the PVE host can access the data, it might work to run it directly on the host.
The plan was to use PBS as a container or vm, in inside it i would have access to all the backups (via ceph). I would then use the tape device to write backup to it.
 
Yes, I think the right question here is " why do you think you need to virtualize a tape drive, and specifically to 1 VM? "

A tape drive is typically host-level hardware so all the things on the server can benefit from it.


> I dont actually know what options i have on debian in order to use this tape drive. I just want to write some backup on it from time to time.

https://unix.stackexchange.com/questions/611559/using-tandberg-lto5-and-debian-10-buster


I suggest you start with a search on " linux tape drive howto " and look into front-end backup software.

https://wiki.debian.org/BackupAndRecovery
I would like to use in a vm in order to use proxmox backup server.
 
  • Like
Reactions: Kingneutron
Yes, i saw that, i also understand that its not recommended. But on this point. Is the recommendation related to the fact the if the node fails you cand access the backup ? Or some other problems ? Like package conflicts, etc ?
The site is pretty self-explanatory:
Caution: Installing the backup server directly on the hypervisor is not recommended. It is safer to use a separate physical server to store backups. Should the hypervisor server fail, you can still access the backups.
 
The site is pretty self-explanatory:
Hmm. I dont think this would be a problem. So the datastore would be in a directory in cephfs, so it would be available on the other nodes as well.
So in the event of a complete failure of the node running pbs, i could install it on another node, point it to the same data store, and i could use the backups.

At least that what i think could be done :)
 
The main point obviously is where your backups are stored by PBS & they should be readily & perfectly restorable. Having a readily available independent PBS is a plus, but sometimes rebuilding/reconfiguring a PBS that created its backup datasets can be a complex/difficult procedure.
 
Last edited:
  • Like
Reactions: Kingneutron
The main point obviously is where your backups are stored by PBS & they should be readily & perfectly restorable. Having a readily available independent PBS is a plus, but sometimes rebuilding/reconfiguring a PBS that created its backup datasets can be a complex/difficult procedure.
So if i have a folder, that has backups from another pbs instance, i cannot just used in a new pbs instance ?
I mean, cant i just point the second instance to the same directory ?
 
it "should" work, but don't forget to copy also the hidden file/directories like the ".chunks" directory
 
it "should" work, but don't forget to copy also the hidden file/directories like the ".chunks" directory
I wont copy anything. The folder will stay in the same place, in cepfs, and i would just mount it to another ct\vm
 
I wont copy anything. The folder will stay in the same place, in cepfs, and i would just mount it to another ct\vm
This will probably work. But be aware that having 2 instances of PBS manipulating files in the same location may prove problematic with the snapshots/deduplication etc.
 
  • Like
Reactions: fxandrei

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!