ltfs icon indicating copy to clipboard operation
ltfs copied to clipboard

ltfs_ordered_copy support for freebsd

Open ia2115 opened this issue 4 years ago • 5 comments

When trying to run ltfs_ordered_copy on my FreeBSD 12.2 it says unsupported platform 'FreeBSD'..

I would love that tool to work here, as python is well supported and has been forever.

Thanks for all the hard work, hope this will be possible in the future.

ia2115 avatar May 20 '21 08:05 ia2115

Sorry, I can't have enough time to confirm the code on other platforms. But it shall work fine if the platform supports extended attribute correctly.

Please try to change the block below

https://github.com/LinearTapeFileSystem/ltfs/blob/b2a5b50666213dcf7b91750b7da9a2e19d9c370a/src/utils/ltfs_ordered_copy#L251-L258

to

plat = platform.system()
if plat == 'Linux':
    VEA_PREFIX='user.'
elif plat == 'Darwin':
    VEA_PREFIX=''
elif plat == 'FreeBSD'
    VEA_PREFIX=''
else:
    sys.stderr.write("unsupported platform '{0}'\n".format(plat))
    exit(1)

You might need to modify VEA_PREFIX if FreeBSD has it. (But I assume it is as same as Darwin ay this time.)

piste-jp avatar May 21 '21 02:05 piste-jp

no more errors, when i run the tool on freebsd.. due to other issues with freebsd 12.2 and ltfs i cant really try using it with a tapedrive.

ia2115 avatar May 23 '21 20:05 ia2115

finally got to get on with this... seems freebsd also have some issues with xattr even so i even tried with this project https://github.com/xattr vs py39-xattr same errors:

# /usr/local/bin/ltfs_ordered_copy /tmp/ltfs/A* /tmp/test/
Tape order aware copy for LTFS
Check destination:module 'xattr' has no attribute 'get'
same with 'set'

ia2115 avatar Apr 06 '23 20:04 ia2115

i can get the attributes with these commands from commandline: xattr -p ltfs.volumeUUID /ltfs/mydir/myfile.rar 0eff3704-7089-4c2b-8fa7-a5a1203cc7b0 xattr -p ltfs.partition /ltfs/mydir/myfile.rar b xattr -p ltfs.startblock /ltfs/mydir/myfile.rar 6120 but not with anything else i tried, from python the getxattr( and listxattr( doent give any results aka empty. got no clue how im going to fix this to work on freebsd 13.2 where ive been trying to see what i could do with this. latest python 3.9 and xattr from pip install. latest git ltfs pull

ia2115 avatar Apr 09 '23 22:04 ia2115

xattr -l /ltfs/mydir/myfile.rar empty same with xattr -l /ltfs/mydir

its mounted /ltfs tape lto6 tapedrive hp 6250 .. anything else is working perfectly

ia2115 avatar Apr 09 '23 22:04 ia2115