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

Syncthing problem #998

Open
jiakai1000 opened this issue Dec 20, 2021 · 5 comments
Open

Syncthing problem #998

jiakai1000 opened this issue Dec 20, 2021 · 5 comments

Comments

@jiakai1000
Copy link

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is.
I have 2 hard drives, mounted at /mnt/a and /mnt/b, and mounted at /var/lib/backup with mergerfs. I ran Syncthing to backup all data in /var/lib/backup to another NAS. Syncthing created a folder named .stfolder, if this folder lost(maybe drive fails), Syncthing will stop sync and report error. The problem is: if .stfolder is in /mnt/a, but drive /mnt/b fails, Syncthing think some data is removed(files in /mnt/b) normally and it will remove remote backup !
Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@trapexit
Copy link
Owner

I don't understand what you're reporting / asking.

@jiakai1000
Copy link
Author

I am very sorry that my English is not good, so I can only use translation software to describe my problem.
I have two hard disks in my NAS, mount to /mnt/a and /mnt/b, and then mount them to /var/lib/backup using mergerfs. I use Syncthing to automatically synchronize my data on it to another NAS. Syncthing will create a directory called .stfolder, If hard drive fails, the .stfolder will be missing, and Syncthing will stop synchronizing.
My question is: If the .stfolder is saved in /mnt/a, but /mnt/b mount fails due to disk corruption, mergerfs will still run normally, but the files in /mnt/b have been lost and the .stfolder is still there, so Syncthing will not notice anything unusual. These files are considered to be deleted on purpose and are automatically synchronized to the remote NAS. As a result, the backup files on the remote are also deleted. I would like to ask if there is a way to solve this problem, thank you very much!

@trapexit
Copy link
Owner

trapexit commented Dec 21, 2021

Use backups? Use snapraid? Don't use mergerfs? Use RAID5 or 6?

mergerfs doesnt provide redundancy. The whole point of the software is to combine entirely separate filesystems. With that comes the possibility of logically split failure like you described.

@jiakai1000
Copy link
Author

I don't want to use RAID, I just want to maximize space usage, and I don't worry about losing data because I have multiple backups, and this is just one of them. I also don't want to use LVM, because any disk failure will result in the loss of all data. So mergerfs is a great choice.
Could you add an option to force all branches to be mount points instead of a normal directory? If the /mnt/b mount fails, mergerfs also fails. That way Syncthing will know about the error.

@trapexit
Copy link
Owner

trapexit commented Dec 21, 2021

It's not that simple. mounts can disappear at any time so it would have to actively monitor the branch to see if it changes. And it isn't free to monitor the filesystem at runtime. In the least it would cause the filesystem to be constantly accessed which could be a concern with network filesystems or spindown of harddrives. Also, what is to be done when it is noticed? Exit? That could cause data loss or programs to behave poorly.

I certainly could add a feature to check if branches are the same as the parent path and fail to mount. Though it wouldn't be foolproof given the main identifiers for a filesystem aren't always unique. Particularly with FUSE filesystems. Also it wouldn't be a comprehensive solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants