Never though I'm going to dive so deep in this Win32 rabbit hole.

I was originally thinking just wrote a simple wrapper of win32's tape API, but then I realized that the encryption is missing. With Win32's tape api, you can basically implement something like `/dev/st0` (simple read and write) amd `mt` command (rewind, seek, set compression, etc.). I was thinking just use LTOEnc for encryption control.

But that software can only read the encryption key from a file, which, to me, is a big security hole: I can do that in memory, why write to the disk temporarily?

So I start reading LTOEnc's code. I found Microsoft really don't want you to directly talk to SCSI. I read their documents, they never said about IOCTL_SCSI_PASS_THROUGH_DIRECT. They are recommending something like IOCTL_CDROM or something that is not so lower level.

Anyway, thanks to LTOEnc, and Oracle's helpdesk generously providing HPE product's tech ref manual, I now can implement the encryption control in my win32 lib. And soon I can do that in Java.

@skyblond Are you working with LTO-related APIs at work or for fun? If I had some spare money, I'd love to get my hands on an LTO (maybe 4~5 gen) device.

Follow

@overflowcat 失业人士自娱自乐罢了(

我的磁带机是咸鱼买的。因为我的是笔记本,没有pcie插槽,咸鱼上正好有个大哥把雷电拓展坞和sas卡还有半高磁带机做成了一体的,用3d打印整了个盒子,我觉得挺简洁的。如果想自己搞的话,淘宝上有卖雷电转pcie和SAS/FC卡,根据需要自己拼就行了。

磁带机的话咸鱼上也有二手,如果资金充足(有三五万的预算)可以直接京东找HPE客服聊。我看他们说不要买IBM的磁带机,固件有计划报废而且毛病贼多。

@overflowcat 我买的是LTO 6,因为想一步到位。不然过几年换代的时候还要处理电子垃圾。不过LTO本身换代挺勤的,现在已经LTO 9了,而且向下兼容也缩减了。说好的30年存储,如果30年后没有能用的设备来读这些陈年磁带,那还不如不搞。

企业那边经常需要随着LTO标准更新换代,这样就有二手的廉价LTO磁带机。听说再过个两三年LTO 7的磁带机就该被换下来了。目前主流还是LTO 6,5代尚可接受(加密压缩全都有,还有LTFS),4代的话就只能用tar那种,没有LTFS支持。

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.