LinearTapeFileSystem / ltfs

Reference implementation of the LTFS format Spec for stand alone tape drive
BSD 3-Clause "New" or "Revised" License
257 stars 76 forks source link

Creating hard link: OSError: [Errno 38] Function not implemented #397

Closed simonwaid closed 1 year ago

simonwaid commented 1 year ago

Describe the bug Trying to create a hard link on a mounted ltfs system fails with OSError: [Errno 38] Function not implemented

To Reproduce Steps to reproduce the behavior: We first mount the tape, then create a file and try to create a hard link to it.

sudo ltfs -o devname=/dev/sg0 /media/tape/
cd /media/tape
touch test
ln test test2

Expected behavior I'd expect that a hard link is being created.

Desktop: OS: Ubuntu Linux 22.04, Kernel 6.0.7

piste-jp commented 1 year ago

It is as designed.

simonwaid commented 1 year ago

As designed, really? A POSIX file system without support for hard links? I know the standard does not mention hard links, but it seems rather silly!

piste-jp commented 1 year ago

Please refer the document published from IBM in detail.

https://www.ibm.com/docs/en/spectrum-archive-sde/2.4.5?topic=reference-system-calls-linux-macos-systems

I believe it is not possible to support hard link under the LTFS format spec. Please refer it also.

https://www.snia.org/sites/default/files/technical_work/LTFS/LTFS_Format_v2.5_Technical_Position.pdf

I hope you can find a good solution and contribute the code about hard link implementation.

piste-jp commented 1 year ago

Close this at this time. Please feel free to reopen if someone have a good idea how to support hard link under LTFS format.