277 lines
4.7 KiB
Markdown
277 lines
4.7 KiB
Markdown
# VTL Linux - Installation Guide
|
|
|
|
## Prerequisites
|
|
|
|
- x86_64 compatible hardware
|
|
- Minimum 2GB RAM (4GB+ recommended)
|
|
- 50GB+ storage for tape media
|
|
- Network interface card
|
|
- USB drive or CD/DVD for installation media
|
|
|
|
## Installation Methods
|
|
|
|
### Method 1: Live Boot (Testing)
|
|
|
|
1. Write ISO to USB drive:
|
|
```bash
|
|
dd if=VTL-Linux-1.0-x86_64.iso of=/dev/sdX bs=4M status=progress
|
|
sync
|
|
```
|
|
|
|
2. Boot from USB drive
|
|
|
|
3. System will boot into live environment with VTL services
|
|
|
|
### Method 2: Full Installation
|
|
|
|
1. Boot from ISO
|
|
|
|
2. Select "Install VTL Linux to Disk" from boot menu
|
|
|
|
3. Follow installation prompts:
|
|
- Select target disk
|
|
- Configure network
|
|
- Set hostname
|
|
- Create user account
|
|
|
|
4. Reboot after installation
|
|
|
|
## Post-Installation Configuration
|
|
|
|
### 1. Network Setup
|
|
|
|
Configure static IP (recommended for iSCSI):
|
|
|
|
```bash
|
|
sudo nmcli con mod "Wired connection 1" \
|
|
ipv4.addresses 192.168.1.100/24 \
|
|
ipv4.gateway 192.168.1.1 \
|
|
ipv4.dns "8.8.8.8 8.8.4.4" \
|
|
ipv4.method manual
|
|
|
|
sudo nmcli con up "Wired connection 1"
|
|
```
|
|
|
|
### 2. Change Default Passwords
|
|
|
|
```bash
|
|
sudo passwd root
|
|
sudo passwd vtladmin
|
|
```
|
|
|
|
### 3. Configure mhvtl
|
|
|
|
Edit device configuration:
|
|
```bash
|
|
sudo vim /etc/mhvtl/device.conf
|
|
```
|
|
|
|
Restart mhvtl service:
|
|
```bash
|
|
sudo systemctl restart mhvtl
|
|
```
|
|
|
|
### 4. Configure iSCSI Targets
|
|
|
|
Edit target configuration:
|
|
```bash
|
|
sudo vim /etc/tgt/conf.d/vtl-targets.conf
|
|
```
|
|
|
|
Update credentials:
|
|
```bash
|
|
incominguser <username> <password>
|
|
```
|
|
|
|
Restart tgt service:
|
|
```bash
|
|
sudo systemctl restart tgt
|
|
```
|
|
|
|
### 5. Verify Installation
|
|
|
|
Check system status:
|
|
```bash
|
|
vtl-status
|
|
```
|
|
|
|
List SCSI devices:
|
|
```bash
|
|
lsscsi -g
|
|
```
|
|
|
|
Check library status:
|
|
```bash
|
|
mtx -f /dev/sg0 status
|
|
```
|
|
|
|
View iSCSI targets:
|
|
```bash
|
|
tgt-admin --show
|
|
```
|
|
|
|
## Client Configuration
|
|
|
|
### Linux Client
|
|
|
|
1. Install iSCSI initiator:
|
|
```bash
|
|
sudo apt-get install open-iscsi
|
|
```
|
|
|
|
2. Discover targets:
|
|
```bash
|
|
sudo iscsiadm -m discovery -t st -p <VTL_IP>:3260
|
|
```
|
|
|
|
3. Login to target:
|
|
```bash
|
|
sudo iscsiadm -m node --login
|
|
```
|
|
|
|
4. Configure CHAP authentication (if required):
|
|
```bash
|
|
sudo iscsiadm -m node -T <target_iqn> -p <VTL_IP>:3260 \
|
|
--op=update --name node.session.auth.authmethod --value=CHAP
|
|
|
|
sudo iscsiadm -m node -T <target_iqn> -p <VTL_IP>:3260 \
|
|
--op=update --name node.session.auth.username --value=vtl-user
|
|
|
|
sudo iscsiadm -m node -T <target_iqn> -p <VTL_IP>:3260 \
|
|
--op=update --name node.session.auth.password --value=vtl-password
|
|
```
|
|
|
|
5. Verify connection:
|
|
```bash
|
|
lsscsi
|
|
```
|
|
|
|
### Windows Client
|
|
|
|
1. Open iSCSI Initiator (Control Panel → Administrative Tools)
|
|
|
|
2. Go to Discovery tab, click "Discover Portal"
|
|
|
|
3. Enter VTL server IP address and port 3260
|
|
|
|
4. Go to Targets tab, select discovered target
|
|
|
|
5. Click "Connect"
|
|
|
|
6. For CHAP authentication:
|
|
- Click "Advanced"
|
|
- Enable CHAP login
|
|
- Enter username: vtl-user
|
|
- Enter password: vtl-password
|
|
|
|
7. Verify in Device Manager under "Tape drives"
|
|
|
|
## Backup Software Configuration
|
|
|
|
### Bacula
|
|
|
|
```bash
|
|
Device {
|
|
Name = VTL-Drive-0
|
|
Media Type = LTO-5
|
|
Archive Device = /dev/nst0
|
|
AutomaticMount = yes
|
|
AlwaysOpen = yes
|
|
RemovableMedia = yes
|
|
RandomAccess = no
|
|
AutoChanger = yes
|
|
}
|
|
|
|
Autochanger {
|
|
Name = VTL-Library
|
|
Device = VTL-Drive-0, VTL-Drive-1, VTL-Drive-2, VTL-Drive-3
|
|
Changer Command = "/usr/lib/bacula/scripts/mtx-changer %c %o %S %a %d"
|
|
Changer Device = /dev/sg0
|
|
}
|
|
```
|
|
|
|
### Amanda
|
|
|
|
```bash
|
|
tapedev "chg-robot:/dev/sg0"
|
|
tpchanger "chg-robot"
|
|
changerfile "/var/lib/amanda/vtl/changer"
|
|
```
|
|
|
|
### Veeam (Windows)
|
|
|
|
1. Add tape server in Veeam console
|
|
2. Rescan tape infrastructure
|
|
3. VTL devices should appear automatically
|
|
4. Configure media pools and backup jobs
|
|
|
|
## Troubleshooting
|
|
|
|
### mhvtl not starting
|
|
|
|
```bash
|
|
sudo modprobe mhvtl
|
|
sudo systemctl status mhvtl
|
|
sudo journalctl -u mhvtl -n 50
|
|
```
|
|
|
|
### iSCSI connection issues
|
|
|
|
```bash
|
|
sudo systemctl status tgt
|
|
sudo tgt-admin --show
|
|
sudo netstat -tlnp | grep 3260
|
|
```
|
|
|
|
### SCSI devices not visible
|
|
|
|
```bash
|
|
sudo modprobe sg
|
|
lsmod | grep mhvtl
|
|
dmesg | grep -i scsi
|
|
```
|
|
|
|
### Performance issues
|
|
|
|
Check system resources:
|
|
```bash
|
|
htop
|
|
iostat -x 1
|
|
iotop
|
|
```
|
|
|
|
Adjust kernel parameters in `/etc/sysctl.d/99-vtl.conf`
|
|
|
|
## Maintenance
|
|
|
|
### Adding tape media
|
|
|
|
```bash
|
|
sudo /usr/bin/mktape -l 10 -s 100 -m /opt/mhvtl -t LTO5 -d 10
|
|
sudo systemctl restart mhvtl
|
|
```
|
|
|
|
### Backup configuration
|
|
|
|
```bash
|
|
sudo tar -czf vtl-config-backup.tar.gz \
|
|
/etc/mhvtl/ \
|
|
/etc/tgt/conf.d/ \
|
|
/etc/sysctl.d/99-vtl.conf
|
|
```
|
|
|
|
### Update system
|
|
|
|
```bash
|
|
sudo apt-get update
|
|
sudo apt-get upgrade
|
|
sudo reboot
|
|
```
|
|
|
|
## Support
|
|
|
|
For issues and questions:
|
|
- Check logs: `journalctl -xe`
|
|
- Review documentation in `/vtl/docs/`
|
|
- mhvtl documentation: https://github.com/markh794/mhvtl
|