在龙芯mips电脑,使用lto磁带机

闲鱼二手 lto5内置磁带机,带卡带线800左右,lto5磁带1.5T 30元一盘, 用来做离线备份不错,

可以用fuse跑ltfs文件系统,在bjlx的软件源,刚刚增加了ltfs的包, 包括debian9/10/11版本,  mips64el/amd64 2种cpu架构,其它架构应该可以直接编译成deb包, 不会啥问题。

编译过程解决了2个问题,提交到ltfs官方,居然被接受了。

https://github.com/LinearTapeFileSystem/ltfs/commit/d8d72a7954551bc40515...

https://github.com/LinearTapeFileSystem/ltfs/commit/2db929b5fc641fbeccb0...

首先添加bjlx软件源:

 wget https://mirrors.tuna.tsinghua.edu.cn/bjlx/bjlx.key -O - |apt-key add

echo deb http://mirrors.cloud.tencent.com/bjlx [stretch|buster|bullseye] main > /etc/apt/sources.list.d/bjlx.list

echo deb-src http://mirrors.cloud.tencent.com/bjlx [stretch|buster|bullseye] main >> /etc/apt/sources.list.d/bjlx.list

echo deb http://mirrors.cloud.tencent.com/bjlx [stretch|buster|bullseye] main > /etc/apt/sources.list.d/bjlx.listecho deb http://mirrors.cloud.tencent.com/bjlx [stretch|buster|bullseye] main > /etc/apt/sources.list.d/bjlx.listapt update

安装ltfs:

apt install ltfs

列出磁带机设备:

ltfs -o device_list

Tape Device list:.

Device Name = /dev/sg6 (0.0.0.0), Vendor ID = HP      , Product ID = Ultrium 5-SCSI  , Serial Number = HU1228P9W4, Product Name =[Ultrium 5-SCSI].
 
mount ltfs:
mkfs -p /ltfs
ltfs  /ltfs -o devname=HU1228P9W4

安装磁带机管理软件:

apt install  sg3-utils

看磁带机信息:

sginfo /dev/sg7

INQUIRY response (cmd: 0x12)

----------------------------

Device Type                        1

Vendor:                    HP

Product:                   Ultrium 5-SCSI

Revision level:            Y5AB

 
 
注意问题: 磁带机瞬间功率很大, +5V的电源要4A,  一般的电脑电源,+5V的输出是15A, 如果多几个硬盘, 需要同时启动,就很容易电源不够用, 故障现象就是,led灯全亮, 磁带机没有动静,  我用一个降压电源板, 从12V降压到5V, 让磁带机的5V电源走12V供电, 效果不错。
 
hp固件升级说明:
https://www.mail-archive.com/linux-scsi@vger.kernel.org/msg69571.html
windows升级程序(linux下可以zip解压, 用sg3-utils进行升级):
https://downloads.hpe.com/pub/softlib2/software1/sc-windows/p368283668/v124587/cp031432.exe
 

 

https://www.mail-archive.com/linux-scsi@vger.kernel.org/msg84912.html
Linux Firmware Update of a HPE Ultrium 5 Tape Drive
Marcel Ziswiler Sat, 19 Oct 2019 06:07:49 -0700
 
Hi
 
Since quite a while I wanted to update the firmware on my good olde
tape drive. However, I do not have any contract all newer HPE downloads
require. Searching the web I stumbled over some old messages [1] and
[2] from Doug Gilbert which paved the way to easily do such firmware
update.
 
I have an EH957A/EH957B HP StoreEver LTO-5 Ultrium 3000 SAS internal
half-height tape drive which had the standalone Z64D firmware e.g.
reporting the following upon boot (dmesg):
 
[10062376.346530] scsi 0:0:1:0: Sequential-Access HP       Ultrium 5-
SCSI   Z64D PQ: 0 ANSI: 6
...
[10062376.378197] st 0:0:1:0: Attached scsi generic sg3 type 1
 
The later message reporting sg3 is important to know for the commands
below.
 
The non-paywalled firmware is actually available within some EXE file
[3] which may be easily unzipped.
 
Pages 228 and 229 of the HP LTO Ultrium Tape Drives Technical Reference
Manual Volume 3: Host Interface Guide, LTO 5 drives [4] talks about how
the WRITE BUFFER 3Bh command may be used to update the firmware by
first sending it using mode 4 and then initiating the update using mode
5. Luckily, the sg3_utils come with some convenience tools easily
allowing to do just that:
 
sudo sg_write_buffer -b 4k -I Z6ED_019_233.E -m 4 /dev/sg3
sudo sg_write_buffer -m 5 /dev/sg3
 
And - TADA - my drive is updated:
 
[10067140.872255] scsi 0:0:2:0: Sequential-Access HP       Ultrium 5-
SCSI   Z6ED PQ: 0 ANSI: 6
 
Thanks Doug Gilbert for the usefull insights into SCSI tape drive
operation details. Keep up the good work!
 
[1] 
https://www.mail-archive.com/linux-scsi@vger.kernel.org/msg69571.html
 
[2] https://patchwork.kernel.org/patch/7946871/#17063991
 
[3] 
https://downloads.hpe.com/pub/softlib2/software1/sc-windows/p368283668/v124587/cp031432.exe
 
[4] 
https://docs.oracle.com/cd/E21419_04/en/LTO5_Vol3_E5b/LTO5_Vol3_E5b.pdf
 
附件大小
cp031432.tar.xz 固件升级9.77 兆字节