ish-app / ish

Linux shell for iOS
https://ish.app
Other
17.13k stars 907 forks source link

rsyncing into mount point from fileprovider doesn't quite work after iSH restart #1581

Open arminus opened 3 years ago

arminus commented 3 years ago

My usecase is like this:

This does not happen if I unmount /root/Obsidian on every iSH exit (using a `trap umount /root/Obsidian EXIT' command in my .profile) and mount it again every time I start iSH. -t ios / -t ios-unsafe doesn't seem to make any difference

pulsovi commented 2 years ago

I have the same problem, but it also seems to me that just running rsync twice in a row is enough to crash it ...

kik4444 commented 2 years ago

This does not happen if I unmount /root/Obsidian on every iSH exit (using a `trap umount /root/Obsidian EXIT' command in my .profile)

Hi, I'd just like to say thank you. I was just pulling my hair over this exact problem and I had resolved to just rsyncing to iSH's own storage and then moving the files manually to where they needed to be until I saw your suggestion above.

For anyone encountering rsync hanging up after the first file, to mitigate this issue, you must use the mount option "ios-unsafe" when mounting a directory instead of just "ios". Afterwards you must unmount the external directory you were in before you exit. For example, if you do mount -t ios-unsafe . /mnt, you must then umount /mnt before exiting iSH and then mount it again on the next startup. To automate this, place trap "cd; umount /mnt" EXIT in your ~/.profile file.

kotatsuyaki commented 1 year ago

Though it's only tangentially related, in addition to unmounting the provider, I also had to exclude the .git subdirectory when running rsync. Not excluding .git causes a hang when syncing to, but not from, the provider mount point.

For rsync, I used the --cvs-exclude argument to ignore the git directory.