This repository was archived by the owner on Dec 19, 2023. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork0
Expose a tape drive as a block device.
License
NotificationsYou must be signed in to change notification settings
pojntfx/tapisk
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Expose a tape drive as a block device.
🚧 This project is a work-in-progress! Instructions will be added as soon as it is usable. 🚧
To contribute, please use theGitHub flow and follow ourCode of Conduct.
To build and start a development version of tapisk locally, run the following:
# (Optional) install the MHVTL virtual tape library to test tapisk without having to use a physical tape drivegit clone https://github.com/markh794/mhvtl.git /tmp/mhvtlcd /tmp/mhvtlcd kernelmakesudo make installsudo modprobe mhvtlcd ..makesudo make installsudo systemctl daemon-reloadsudo systemctlenable --now mhvtl.targetsudo usermod -a -G tape${USER}newgrp tape# Install tapisk$ git clone https://github.com/pojntfx/tapisk.git$cd tapisk# If you have a tape library$ lsscsi -g# Find your tape library (`/dev/sgX`)$ mtx -f /dev/sg1 status$ mtx -f /dev/sg1 load 1# Load a tape into your drive$ lsscsi -g# Find your tape drive (`/dev/nstX`)$ mt -f /dev/nst1 status$ sudo mt -f /dev/nst1 stsetoptions scsi2logical# Enable the `tell` syscall on your tape drive$ mt -f /dev/nst1 setblk 4096# Set the block size$ mt -f /dev/nst1 rewind$ mt -f /dev/nst1 weof# Erase the tape$ mt -f /dev/nst1 rewind$ make$ sudo make install$ sudo rm -f /tmp/tapisk.db&& sudo tapisk --drive /dev/nst1 --index /tmp/tapisk.db# Start the block device; the block device path (/dev/nbdX) will be logged to stdout# In another terminal$ sudo mkfs.ext4 /dev/nbd0# Format the tape$ sudotime sync -f~/Downloads/mnt; sudo umount~/Downloads/mnt; sudo rm -rf~/Downloads/mnt&& sudo mkdir -p~/Downloads/mnt&& sudo mount /dev/nbd0~/Downloads/mnt&& sudo chown -R"${USER}"~/Downloads/mnt# Mount the tape to ~/Downloads/mnt$ cat~/Downloads/mnt/test;echo"Current date:$(date)"| tee~/Downloads/mnt/test&& cat~/Downloads/mnt/test; sync -f~/Downloads/mnt/test# Test the filesystem by reading & writing the current date to a file
Have any questions or need help? Chat with uson Matrix!
tapisk (c) 2023 Felicitas Pojtinger and contributors
SPDX-License-Identifier: AGPL-3.0
About
Expose a tape drive as a block device.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.