Activity › Forums › Storage & Archiving › LTFS writing XML to index partition
-
LTFS writing XML to index partition
Posted by Ashley Lynch on May 30, 2013 at 8:41 pmThe network for one of our shows has mandated that all media be backed up to LTO5 in LTFS format and that a custom formatted metadata.xml file be written to the index partition.
This is where my life has begun to unravel.
I’ve managed everything to do with backing up our media to the LTFS, but I haven’t successfully gotten this file into the index partition. Our HP LTO deck is hooked up to a OSX 10.6 tower.
Through research, I managed to put together the following code to format the tape.
mkltfs -d 0 -f –rules=”size=1m/name=metadata.xml”
The metadata.xml file is currently sitting in C:\
The network said the tape didn’t have the metadata.xml file and didn’t pass QC.
Does anyone have any experience with this and is able to give me some help?
Ashley Lynch
Vincent Lavares replied 11 years, 5 months ago 9 Members · 19 Replies -
19 Replies
-
Kevin Francis
May 31, 2013 at 1:33 pmCan someone at the network point you to a resource that details how to do this? Is this an industry standard practice?
-
Ashley Lynch
May 31, 2013 at 9:41 pmIt’s part of Discovery’s new LTO specs for digital media storage. They’ve basically pointed me to HP’s manuals which list all of the options, but I’m unclear on the exact syntax to get the xml file to the index partition of the LTO. Unfortunately it doesn’t seem to give me any verification that’s it’s written the file I want there and there doesn’t seem to be any way to check afterwards (at least not on our end.)
-
Tom Goldberg
June 2, 2013 at 3:40 amHi Ashley,
If you want to take an easy way out, use a Cache-A appliance – we have built the Discovery requirement into our products with an option to automatically put that metadata.xml file into the index partition.
If you want to check if your implementation was able to do that, here is how you can look at which partition a file is on:
getfattr -n user.ltfs.partition pathname_to_file
Where pathname_to_file is the full pathname of the file in question.Partition “a” is the index partition and “b” is the data partition.
Good luck!
Tom Goldberg
Cache-A Corporation
433 Park Point Drive #285
Golden, CO 80401
mailto:tom.goldberg@cache-a.com
https://cache-a.com -
Jonathan Applebaum
July 9, 2013 at 2:20 pmTom,
Can you provide the command equivalent for Mac OS? I’ve tried xattr, but am not receiving what I believe is the proper information.
-
Tom Goldberg
July 9, 2013 at 4:02 pmJonathan,
When mounted to a Mac, the partition is invisible, thus there is no attribute that can be seen by the MacOS.
I would note further that even using getfattr under Linux can give you misleading results as LTFS automatically puts copies of anything written to the Index partition also onto the Data partition.
If anyone out there knows of a better way to do this, please post on this thread!
Tom Goldberg
Cache-A Corporation
433 Park Point Drive #285
Golden, CO 80401
mailto:tom.goldberg@cache-a.com
https://cache-a.com -
Jonathan Applebaum
July 9, 2013 at 4:20 pmActually, just learned how to do this from the folks at Discovery. On Mac OSX one would use the xattr command, along with an extended attribute. So, for example, if you have an LTFS volume mounted as “ltfs”, the command to check to see which partition the metadata.xml file is in would be:
xattr -p ltfs.partition /volumes/ltfs/metadata.xml
The command will return either an “a” or a “b”, where “a” is the index partition and “b” is the data partition. So if you receive an “a”, the metadata file is correctly placed in the index partition.
Important note: The index partition is typically not updated immediately, so don’t run this command until you’re sure that has occurred (though a more frequent interval can be specified, the index is always written when a tape is unmounted).
– Jonathan
-
Hans Hoffman
July 19, 2013 at 8:19 pmThanks for this. Did anyone ever get back to you about how to actually place the metadata.xml file into the index partition in the first place using OSX?
-
Kevin Francis
July 24, 2013 at 12:46 amImagine Products PreRollPost now has an option to archive LTFS in the format specified by Discovery as well.
-
Ashley Lynch
July 24, 2013 at 1:44 amHere’s what we were able to solve with help from Discovery. We’re on Mac systems.
mkltfs -d 0 -f -r size=10k/name=metadata.xml
mkdir /mnt/[LTO NAME]
ltfs /mnt/[LTO NAME]This prepares the LTO to look for metadata.xml and put it in the index partition. You just copy the metadata.xml file along with all the other data and it will parse that one out. A good poor-man’s test to see if it’s in the index partition is to write it last. Then load the LTO and open the xml file. If it’s in the index, it will load right away. If it’s not, the tape will have to hunt for awhile to find it.
-
Jon Berry
August 19, 2013 at 11:12 pmAshley-
Tried that on our systems here, we’re still running Snow Leopard, and I had to interchange the mnt command with Volumes. Everything looked fine until I double checked that the metadata file was on the index partition, but I came up with it being on the data partition instead. Here’s the sequence of events I took:
1. Loaded up the LTO into the tape drive.
2. mkltfs -d 0 -f -r size=200k/name=metadata.xml
3. Shows the data partition being written on b, while the index partition on a.
4. mkdir /Volumes/MM_LTFS_01
5. ltfs /Volumes/MM_LTFS_01
6. Copy the metadata file onto the drive.
7. xattr -p ltfs.partition /Volumes/MM_LTFS_01
8. Thats when the metadata file shows up as being on partition b instead of a.Any ideas? Using a HP LTO5. Thanks!
Reply to this Discussion! Login or Sign Up