amiaopensource / ltopers

Bash scripts to manage LTO cartridges with LTFS
https://github.com/amiaopensource/ltopers
MIT License
39 stars 8 forks source link

optimize naming of mountpoint #76

Closed dericed closed 7 months ago

dericed commented 7 years ago

Currently mountlto uses /Volumes/${BARCODE} as a default mount point but if it can not determine that then it uses /Volumes/${DECK_SERIAL}. The process of getting these values involves running an lfts command without a mountpoint, which the intent that it fails but provides deck and tape metadata along the way to use in a second correct lfts command to do the mount.

This process requires a lot of time since it has to wait for an ltfs command to fail until running it correctly. I've been considering have the mountpoint always be /Volumes/${DECK_SERIAL} and to skip the first ltfs command (the one that gathers data) and do the second one directly. However I'm finding that it's not easy to make a quick request of the attached LTO deck's serial.

So far I have this command:

ioreg -c IOSCSITargetDevice | grep "INQUIRY Unit Serial Number" | cut -d"=" -f2

This is close but grabs a bunch of other serial numbers that aren't needed. Any better way to gather some form of deck specific identifier?

retokromer commented 7 years ago

We do work internally with the tape ID which for us is the same than the barcode, and for some of our clients the same than the six first chars of the barcode.

dericed commented 7 years ago

We have some setups with LTO-5 Tandberg decks running http://www.tandbergdata.com/default/assets/File/Downloads/ltfs300/LTFS_3.0.0_Mac_OEM.zip and with this version of the utility there appears to be no means to query the barcode/tape_id which is why we fall back to the deck serial.

retokromer commented 7 years ago

Thank you! I’ll check tomorrow or on Friday this – and how we do it. We have a Tandberg LTO-5 deck.

dericed commented 7 years ago

OK, I'd be curious what utility source you use with it and if ltfs -o devname=0 on it gives you back a tape id.

retokromer commented 7 years ago

The utility is derived from HP’s. It works for all decks we have in production (except Tandberg’s 24-slot which crashes when mixing up LTO-4 cartridges with LTO-5 and/or LTO-6, i.e. LTFS with pre-LTFS proprietary solutions).

dericed commented 7 years ago

link?

retokromer commented 6 years ago

Do you still have this issue, @dericed?

retokromer commented 6 years ago

The Virtual Extended Attributes may possibly be of interest.

dericed commented 7 months ago

closing as ltfs -o device_list and mountlto -n now list device serials.