Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please replace self.input_path.move(self.archive_path) by copying and deleting #29

Open
noseshimself opened this issue Dec 18, 2022 · 0 comments

Comments

@noseshimself
Copy link

noseshimself commented Dec 18, 2022

I tried putting the archives into another location outside the container to get them into an archive but this is resulting in

2022-12-18 22:06:53 [ThreadPoolExecutor-0_2] - Error in OcrTask.process: Traceback (most recent call last):
  File "/usr/lib/python3.8/shutil.py", line 788, in move
     os.rename(src, real_dst)
     OSError: [Errno 18] Invalid cross-device link: '/input/standard/MFC-L8650cdw_003873.pdf' -> '/archive/standard/MFC-L8650cdw_003873.pdf'

Could this be turned into copy+unlink?

move() in shutil.py should detect the cross-fs move (see

    If the destination is on our current filesystem, then rename() is used.
    Otherwise, src is copied to the destination and then removed. Symlinks are
    recreated under the new name if os.rename() fails because of cross
    filesystem renames.

but something seems to have gone wrong although mount shows

/dev/nvme0n1p4 on /archive type btrfs (rw,noatime,ssd,space_cache,subvolid=262,subvol=/opt)
/dev/nvme0n1p4 on /config type btrfs (rw,noatime,ssd,space_cache,subvolid=262,subvol=/opt)
/dev/nvme0n1p4 on /input type btrfs (rw,noatime,ssd,space_cache,subvolid=262,subvol=/opt)
/dev/nvme0n1p4 on /output type btrfs (rw,noatime,ssd,space_cache,subvolid=262,subvol=/opt)
/dev/nvme0n1p4 on /ocrtemp type btrfs (rw,noatime,ssd,space_cache,subvolid=262,subvol=/opt)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant