Installing a Virtual Tape Library: Difference between revisions
A.lauterer (talk | contribs) (update to latest VTL version which works on Debian 11 without downgrading libssl) |
(Add a VTL/Debian update section) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
== Introduction == | == Introduction == | ||
Proxmox Backup Server | Proxmox Backup Server includes support for tape backup, allowing you to save 'Datastores' to tape, and manage tape libraries and tape pools. | ||
Since testing backup and restore with real tape hardware takes a lot of time, it can be a good idea to use a faster Virtual Tape Library (VTL) for evaluation and for testing | Since testing backup and restore with real tape hardware takes a lot of time, it can be a good idea to use a faster Virtual Tape Library (VTL) for evaluation and for testing | ||
of the correct allocation and retention policies | of the correct allocation and retention policies matching your use case. | ||
One example of such a VTL is the [https://www.quadstor.com/virtual-tape-library.html | One example of such a VTL is the [https://www.quadstor.com/virtual-tape-library.html QUADStor VTL]. | ||
This tutorial will guide you through the installation and configuration of a | This tutorial will guide you through the installation and configuration of a QUADStor VTL, and also show you how to integrate it into Proxmox Backup Server. | ||
== Installing the | == Installing the QUADStor VTL == | ||
This tutorial assumes the use of an offical [https://www.debian.org/ Debian] 12 (Bookworm), for example, running as a virtual machine on a Proxmox VE host. | |||
Two disks are needed. One for the Debian OS installation (for example 16 GiB), and a larger one to store virtual tapes on it. A disk of at least 220 GiB allows you to fully utilize the capacity of two LTO-1 (100 GB) tapes. While real LTO-1 is not [https://pbs.proxmox.com/docs/tape-backup.html#supported-hardware supported hardware] by Proxmox Backup Server, it is still convenient for testing purposes due to its low capacity, compared to modern types like LTO-8 with 12 TB. | |||
The | For our example, Debian has the static IP address '10.20.1.59'. | ||
The following instructions are performed in the Debian VM and are based on the [https://www.quadstor.com/vtlsupport/145-installation-on-rhel-centos-sles-debian.html official QUADStor documentation]. | |||
# Install supporting packages: | # Install supporting packages: | ||
#:<pre> | #:<pre> | ||
#::apt update | #::apt update | ||
#::apt install uuid-runtime build-essential sg3-utils apache2 psmisc linux-headers-`uname -r` | #::apt install uuid-runtime build-essential sg3-utils apache2 gzip xz-utils postgresql libpq-dev psmisc linux-headers-`uname -r` | ||
#::a2enmod cgi | #::a2enmod cgi | ||
#::systemctl restart apache2</pre> | #::systemctl restart apache2</pre> | ||
# | # Look up the current Debian package version number on the [https://www.quadstor.com/vtl-extended-edition-downloads.html QUADStor website] and set it as a variable. For example: | ||
#:<pre> | #:<pre> | ||
#::wget -c https://www.quadstor.com/vtldownloads/quadstor-vtl-ext- | #::version=3.0.79.15</pre> | ||
#::apt install ./quadstor-vtl-ext- | # Download and install the package, this may take a while: | ||
# | #:<pre> | ||
#::wget -c https://www.quadstor.com/vtldownloads/quadstor-vtl-ext-$version-debian12-x86_64.deb | |||
# Finally, the VM | #::apt install ./quadstor-vtl-ext-$version-debian12-x86_64.deb</pre> | ||
# Run <code>systemctl enable --now quadstorvtl.service</code> and wait for its completion to verify that no errors occur. | |||
# Finally, reboot the VM: <code>reboot</code> | |||
You can now access the VTL configuration interface over HTTP using your web browser. In our example, we visit http://10.20.1.59. | |||
== Updating the QUADStor VTL and Debian == | |||
If the VTL is used for a longer period of time, we recommend installing available updates on a regular basis. | |||
''' Updating Debian ''' | |||
: For example, run <code>apt update</code>, <code>apt full-upgrade</code> and <code>reboot</code>. If your Debian major version will not receive any more updates in the future, we recommend setting up a new VM and VTL for the sake of simplicity. | |||
''' Updating QUADStor VTL ''' | |||
: Run <code>apt remove quadstor-vtl-ext</code> and follow the [[#Installing_the_QUADStor_VTL|installation section]] above, starting with step 2. | |||
== Configuring the VTL == | == Configuring the VTL == | ||
The following configurations are performed in the QUADStor web interface and are the minimum required ones. Details can be found in the [https://www.quadstor.com/vtl-documentation.html official QUADStor documentation]. | |||
:1. Go to the tab 'Physical Storage' | |||
::The table should show the empty disk, click on 'Add' and submit the 'Default' 'Storage Pool'. | |||
:2. Go to 'Device Definitions' | |||
::You need a 'Changer' and 'Drive' definition. Their exact properties should not be that important for our virtualization purpose. If in doubt, you can also download and import the templates [https://www.quadstor.com/uscripts/changer-definitions.txt changer-definitions.txt] and [https://www.quadstor.com/uscripts/drive-definitions.txt drive-definitions.txt] from https://www.quadstor.com/uscripts/. | |||
:3. Go to 'Virtual Libraries' | |||
::Add a Virtual Tape Library (VTL) by setting your desired properties. For example: | |||
{| class="wikitable" style="margin-left: 80px" | |||
! Field !! Value !! Note | |||
|- | |||
| VTL Name || style="text-align:right" | my-tape-lib || | |||
|- | |||
| Changer Definition || style="text-align:right" | IBM_3584 || | |||
|- | |||
| Drive Definition || style="text-align:right" | IBM_LTO1 || for example LTO1 to virtualize a capacity of 100 GB | |||
|- | |||
| Number of VDrives || style="text-align:right" | 2 || concurrently usable tapes | |||
|- | |||
| Number of VSlots || style="text-align:right" | 20 || to park tapes | |||
|- | |||
| Number of IE Ports || style="text-align:right" | 4 || for tape import/export | |||
|} | |||
:4. Finally, click 'Add VCartridge' | |||
::Specify how many tapes should be inserted into the VSlots now (for example, 2). The 'Label/Prefix' (for example, tape00) must have 6 characters, including a zero for the auto-numbering scheme. | |||
The newly created VTL can now be added to a Proxmox Backup Server instance. | |||
== Adding the VTL to Proxmox Backup Server == | == Adding the VTL to Proxmox Backup Server == | ||
The following commands must all be executed on the Proxmox Backup Server | The following commands must all be executed on the Proxmox Backup Server. | ||
=== Making devices available over iSCSI === | === Making devices available over iSCSI === | ||
# | # Since the VTL will be added to Proxmox Backup Server via iSCSI, make sure that the open-iscsi package is installed: | ||
#:<pre>apt install open-iscsi</pre> | #:<pre>apt install open-iscsi</pre> | ||
# To automatically log in to the iSCSI targets on boot, | # To automatically log in to the iSCSI targets on boot, carry out the following steps: | ||
## | ## open the iSCSI config (<code>editor /etc/iscsi/iscsid.conf</code>) and change <code>node.startup = manual</code> to <code>node.startup = automatic</code> | ||
## then restart <code>iscsid</code> by executing <code>systemctl restart open-iscsi.service</code> | ## then restart <code>iscsid</code> by executing <code>systemctl restart open-iscsi.service</code> | ||
# Now | # Now discover the changer and drive iSCSI targets via <code>iscsiadm</code>. Please do not forget to adapt the IP address if you chose a different one for your QUADStor VTL VM. | ||
#:<pre>iscsiadm -m discovery -t st -p 10.20.1.59</pre> | #:<pre>iscsiadm -m discovery -t st -p 10.20.1.59</pre> | ||
#:The resulting output should look like this: | #:The resulting output should look like this: | ||
#::<pre> | #::<pre> | ||
#:::10.20.1.59:3260,1 iqn.2006-06.com.quadstor.vtl. | #:::10.20.1.59:3260,1 iqn.2006-06.com.quadstor.vtl.my-tape-lib.autoloader | ||
#:::10.20.1.59:3260,1 iqn.2006-06.com.quadstor.vtl. | #:::10.20.1.59:3260,1 iqn.2006-06.com.quadstor.vtl.my-tape-lib.drive1 | ||
#:::10.20.1.59:3260,1 iqn.2006-06.com.quadstor.vtl. | #:::10.20.1.59:3260,1 iqn.2006-06.com.quadstor.vtl.my-tape-lib.drive2</pre> | ||
# | # To populate <code>/dev/tape/</code> with all discovered devices, run <code>iscsiadm -m discovery -l -p 10.20.1.59</code>. Alternatively, you can also log in manually: | ||
#:<pre> | #:<pre> | ||
#::iscsiadm -m node --targetname iqn.2006-06.com.quadstor.vtl. | #::iscsiadm -m node -l --targetname iqn.2006-06.com.quadstor.vtl.my-tape-lib.autoloader | ||
#::iscsiadm -m node --targetname iqn.2006-06.com.quadstor.vtl. | #::iscsiadm -m node -l --targetname iqn.2006-06.com.quadstor.vtl.my-tape-lib.drive1 | ||
#::iscsiadm -m node --targetname iqn.2006-06.com.quadstor.vtl. | #::iscsiadm -m node -l --targetname iqn.2006-06.com.quadstor.vtl.my-tape-lib.drive2</pre> | ||
=== Adding the Changer and Drives to Proxmox Backup Server === | === Adding the Changer and Drives to Proxmox Backup Server === | ||
In the web interface of your Proxmox Backup Server: | |||
# Go to 'Tape Backup' -> 'Changers' | # Go to 'Tape Backup' -> 'Changers' | ||
# Click on 'Add', give the changer a name, and select the | #: Click on 'Add', give the changer a name (for example, autoloader), and select its path in the drop-down list. | ||
# | # Go to 'Tape Backup' -> 'Drives' | ||
# | ## Click on 'Add', give the drive a name (for example, drive1), select the changer and keep the 'Drive Number' '0'. The correct 'Path' can be chosen by comparing the serial numbers with those in the QUADStor web interface, under 'Virtual Libraries'. | ||
## When adding a second drive, proceed with 'Drive Number' '1'. | |||
The VTL can now be used like a normal library in Proxmox Backup Server. | |||
[[Category:HOW-TO]] | [[Category:HOW-TO]] |
Latest revision as of 13:38, 13 August 2024
Introduction
Proxmox Backup Server includes support for tape backup, allowing you to save 'Datastores' to tape, and manage tape libraries and tape pools.
Since testing backup and restore with real tape hardware takes a lot of time, it can be a good idea to use a faster Virtual Tape Library (VTL) for evaluation and for testing of the correct allocation and retention policies matching your use case.
One example of such a VTL is the QUADStor VTL. This tutorial will guide you through the installation and configuration of a QUADStor VTL, and also show you how to integrate it into Proxmox Backup Server.
Installing the QUADStor VTL
This tutorial assumes the use of an offical Debian 12 (Bookworm), for example, running as a virtual machine on a Proxmox VE host.
Two disks are needed. One for the Debian OS installation (for example 16 GiB), and a larger one to store virtual tapes on it. A disk of at least 220 GiB allows you to fully utilize the capacity of two LTO-1 (100 GB) tapes. While real LTO-1 is not supported hardware by Proxmox Backup Server, it is still convenient for testing purposes due to its low capacity, compared to modern types like LTO-8 with 12 TB.
For our example, Debian has the static IP address '10.20.1.59'.
The following instructions are performed in the Debian VM and are based on the official QUADStor documentation.
- Install supporting packages:
- apt update
- apt install uuid-runtime build-essential sg3-utils apache2 gzip xz-utils postgresql libpq-dev psmisc linux-headers-`uname -r`
- a2enmod cgi
- systemctl restart apache2
- Look up the current Debian package version number on the QUADStor website and set it as a variable. For example:
- version=3.0.79.15
- Download and install the package, this may take a while:
- wget -c https://www.quadstor.com/vtldownloads/quadstor-vtl-ext-$version-debian12-x86_64.deb
- apt install ./quadstor-vtl-ext-$version-debian12-x86_64.deb
- Run
systemctl enable --now quadstorvtl.service
and wait for its completion to verify that no errors occur. - Finally, reboot the VM:
reboot
You can now access the VTL configuration interface over HTTP using your web browser. In our example, we visit http://10.20.1.59.
Updating the QUADStor VTL and Debian
If the VTL is used for a longer period of time, we recommend installing available updates on a regular basis.
Updating Debian
- For example, run
apt update
,apt full-upgrade
andreboot
. If your Debian major version will not receive any more updates in the future, we recommend setting up a new VM and VTL for the sake of simplicity.
Updating QUADStor VTL
- Run
apt remove quadstor-vtl-ext
and follow the installation section above, starting with step 2.
Configuring the VTL
The following configurations are performed in the QUADStor web interface and are the minimum required ones. Details can be found in the official QUADStor documentation.
- 1. Go to the tab 'Physical Storage'
- The table should show the empty disk, click on 'Add' and submit the 'Default' 'Storage Pool'.
- 2. Go to 'Device Definitions'
- You need a 'Changer' and 'Drive' definition. Their exact properties should not be that important for our virtualization purpose. If in doubt, you can also download and import the templates changer-definitions.txt and drive-definitions.txt from https://www.quadstor.com/uscripts/.
- 3. Go to 'Virtual Libraries'
- Add a Virtual Tape Library (VTL) by setting your desired properties. For example:
Field | Value | Note |
---|---|---|
VTL Name | my-tape-lib | |
Changer Definition | IBM_3584 | |
Drive Definition | IBM_LTO1 | for example LTO1 to virtualize a capacity of 100 GB |
Number of VDrives | 2 | concurrently usable tapes |
Number of VSlots | 20 | to park tapes |
Number of IE Ports | 4 | for tape import/export |
- 4. Finally, click 'Add VCartridge'
- Specify how many tapes should be inserted into the VSlots now (for example, 2). The 'Label/Prefix' (for example, tape00) must have 6 characters, including a zero for the auto-numbering scheme.
The newly created VTL can now be added to a Proxmox Backup Server instance.
Adding the VTL to Proxmox Backup Server
The following commands must all be executed on the Proxmox Backup Server.
Making devices available over iSCSI
- Since the VTL will be added to Proxmox Backup Server via iSCSI, make sure that the open-iscsi package is installed:
apt install open-iscsi
- To automatically log in to the iSCSI targets on boot, carry out the following steps:
- open the iSCSI config (
editor /etc/iscsi/iscsid.conf
) and changenode.startup = manual
tonode.startup = automatic
- then restart
iscsid
by executingsystemctl restart open-iscsi.service
- open the iSCSI config (
- Now discover the changer and drive iSCSI targets via
iscsiadm
. Please do not forget to adapt the IP address if you chose a different one for your QUADStor VTL VM.iscsiadm -m discovery -t st -p 10.20.1.59
- The resulting output should look like this:
- 10.20.1.59:3260,1 iqn.2006-06.com.quadstor.vtl.my-tape-lib.autoloader
- 10.20.1.59:3260,1 iqn.2006-06.com.quadstor.vtl.my-tape-lib.drive1
- 10.20.1.59:3260,1 iqn.2006-06.com.quadstor.vtl.my-tape-lib.drive2
- To populate
/dev/tape/
with all discovered devices, runiscsiadm -m discovery -l -p 10.20.1.59
. Alternatively, you can also log in manually:- iscsiadm -m node -l --targetname iqn.2006-06.com.quadstor.vtl.my-tape-lib.autoloader
- iscsiadm -m node -l --targetname iqn.2006-06.com.quadstor.vtl.my-tape-lib.drive1
- iscsiadm -m node -l --targetname iqn.2006-06.com.quadstor.vtl.my-tape-lib.drive2
Adding the Changer and Drives to Proxmox Backup Server
In the web interface of your Proxmox Backup Server:
- Go to 'Tape Backup' -> 'Changers'
- Click on 'Add', give the changer a name (for example, autoloader), and select its path in the drop-down list.
- Go to 'Tape Backup' -> 'Drives'
- Click on 'Add', give the drive a name (for example, drive1), select the changer and keep the 'Drive Number' '0'. The correct 'Path' can be chosen by comparing the serial numbers with those in the QUADStor web interface, under 'Virtual Libraries'.
- When adding a second drive, proceed with 'Drive Number' '1'.
The VTL can now be used like a normal library in Proxmox Backup Server.