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

Fallback for O_TMPFILE (under kernel 3.1.1) #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jclab-joseph
Copy link

See #11 and #13

@ayufan
Copy link
Owner

ayufan commented Feb 12, 2022

@jclab-joseph Why this is needed? The 3.1.1 is pretty ancient at this point.

@jclab-joseph
Copy link
Author

As the author of the related issue says, Make it runnable in Synology docker.

@ayufan
Copy link
Owner

ayufan commented Feb 12, 2022

Oh. Nice. Would you consider sending this patch upstream to Proxmox? I think they might be better suited to support this.

@pagalba-com
Copy link

+1! There are MANY NAS, especially Synology users, and NAS vendors keep quite old software versions, as main need to be stable and do the job.

@pagalba-com
Copy link

can someone please accept MR? Synology is very popular and strong solution.

@vyalyh-oleg
Copy link

vyalyh-oleg commented Oct 3, 2023

I also stuck with this problem. Could you please pay attention to it.
Event the latest Synology kernels is based on 3.10.x.
Or maybe it is possible to mount that patched file directly inside the container?

@ayufan
Copy link
Owner

ayufan commented Oct 3, 2023

@vyalyh-oleg OK, but 3.10 is "ANCIENT", unsafe, etc.

@vyalyh-oleg
Copy link

vyalyh-oleg commented Oct 3, 2023

@ayufan I know this. But the maintainer of the Synology OS is the Synology company. Even the latest 7.1.x Synology OS is based on that kernel version, and users can't do anything about it.
It also depends on devices, how old they are. But the 3-4 years isn't so old as for me.

@pagalba-com
Copy link

Yes, indeed. If you look at NAS market share, I found that this is leader. And YES, they still use 3.10 kernel on non bleeding edge devices, which are still very performant and what to say about green planet?

Synology marketshare

@ayufan
Copy link
Owner

ayufan commented Oct 19, 2023

@pagalba-com Fine, but what does it change? :)

I cannot and have no way to validate or support the fix - as I wary of using devices with ancient kernels for many reasons (including security). And this is shameful for company as large as Synology to depend on unsupported software.

If you want this supported by this project someone has to push the patch upstream to be pulled by the PBS maintainers. Then it will automatically be included in this rebuild.

Here is the guide: https://pve.proxmox.com/wiki/Developer_Documentation#Mailing_List

@alexanderharm
Copy link

I did not manage to build this. Is there a version that works on the current version?

Support kernel under 3.1.1.
@vyalyh-oleg
Copy link

@ayufan
Copy link
Owner

ayufan commented Dec 11, 2023

Thanks @vyalyh-oleg, but it is hard to disagree with the feedback. For this to work it would actually have to be tested (by them) to support 3.10 kernel which is non trivial those days.

How many places would has to be fixed? Since the PBS is also a moving target.

@ayufan
Copy link
Owner

ayufan commented Dec 11, 2023

@vyalyh-oleg What we could do is that I would release Synology (3.10 compatible) version once, and ask you to test that all features work. However, I do not plan to keep supporting it except this one off situation.

@pagalba-com
Copy link

I think many NAS users would be very happy, and even from green planet perspective, this makes big sense. Why we should follow big corp waste politics, while we can support sustainable way of living.

@vyalyh-oleg
Copy link

and ask you to test that all features work.

Yes, I can test it on my Synology device (DS916+).

@alexanderharm
Copy link

I can also test on a DS1517+

@ayufan
Copy link
Owner

ayufan commented Dec 25, 2023

@alexanderharm @jclab-joseph @pagalba-com @vyalyh-oleg As expected the usage of O_TMPFILE is wider than this patch only. For example it is used in pbs-client. Could someone of you look at and update the patch to cover all cases?

@oleg-vyalyh
Copy link

@ayufan, am I understood correctly, that you are talking about upgrading ProxmoxVE itself?
If so, this will be more complicated task as it requires firstly install/setup PVE on Synology (in my case) device. Because all my PVE installation reside on a separate, real hardware.

@oleg-vyalyh
Copy link

oleg-vyalyh commented Jan 1, 2024

I also consider installing proxmox backup on a low-power device (or as a virtual machine inside PVE) and use synology only as a remote disk. It's a more tangly approach, but it worth attention. Maybe it will be helpful for someone else.

@ayufan ayufan force-pushed the master branch 5 times, most recently from a99291b to aec4cc9 Compare February 5, 2024 16:25
@nexces
Copy link

nexces commented Feb 26, 2024

Hi there,

I'm in a same spot as few other people - stuck on kernel 3.10 with no option for update - as far as i see it is related to CPU Synology used.
I tried two other PBS deployment options:

  1. as a VM inside PVE HA cluster - storage attached via NFS (1gbit network)
  2. as a VM directly on Synology - storage attached via NFS (same device)

Both solutions are using NFS which gives too much overhead and PBS is simply way too slow as PBS relies heavily on IOPS performance.
Whenever there is something more intensive than just a backup retrieval (verify, GC) those solutions are simply not enough.
My last GC (solution 2) took 40days and didn't even complete because Synology was overwhelmed and became unresponsive.

So the only viable solution is to have "direct" storage access without network overhead, whether real or virtualized.

So my question is: Will it be possible to prepare a flavored build of PBS docker image and include that kernel 3.1* patch?

@pagalba-com
Copy link

Main use case is Proxmox cluster on bare metal, and PBS server on NAS device. Does it require pbs-client to be patched in this case?

@pagalba-com
Copy link

Brute search through the code base gave me 3 files https://github.com/search?q=repo%3Aproxmox%2Fproxmox-backup%20O_TMPFILE&type=code

@nexces
Copy link

nexces commented Feb 27, 2024

Probably yes, but i lack knowledge on how to do it and even where to look.

Citing one of Proxmox Staff Member from linked topic:

the patch looks ok (although we would like to avoid introducing a new crate), the problem is that we use the O_TMPFILE flag multiple times, not only in the shared_memory crate. For example also in the backup_writer and backup_reader, which are essential to using PBS. There could also be many more issues (not only the O_TMPFILE), because the oldest officially supported kernel is somewhere around 5.15.

As far as i can understand the source code - everything related to shared memory is extracted into single library which is patched by @jclab-joseph

Therefore it might just work - however for me it's black magic, I know that Rust exists and thats it 😅

@nexces
Copy link

nexces commented Feb 27, 2024

Brute search through the code base gave me 3 files https://github.com/search?q=repo%3Aproxmox%2Fproxmox-backup%20O_TMPFILE&type=code

That looks similar to what is proposed in patch. 🤔

@pagalba-com
Copy link

so may be you can publish some beta build image, with tag something like 3.1-synorc ? So I can test it, and remove if it will fail..

@nativeit
Copy link

It also depends on devices, how old they are. But the 3-4 years isn't so old as for me.

I believe 3.1.1 is nearly 13-years old. Honestly, if someone is using a Synology NAS, and doesn't have the experience/skill to apply this patch to their own fork, I don't think I'd recommend their attempting to run PBS in a container at all.

I certainly don't recommend merging it into this branch; As @ayufan has made abundantly clear, they have no method with which to test and maintain such an implementation. Even if it functions in the short-term, there are no guarantees that it will continue to function with future updates to this Dockerfile, or PBS, or Synology (if they ever bother), or Docker.

To @ayufan - Sincerely, thank you for your work on this, you have saved me a ton of time and effort! I really respect your response to this request, and I believe you've gone over and above to make a good faith effort to satisfy the folks who have pushed for it to be merged. As I said before, I agree with your first sentiment, and I think it's just generally a bad idea. They can always fork this branch and carry on themselves.

To everyone who's asking for this to be merged: No responsible company should be releasing contemporary software using 3.1.1, and it isn't reasonable to ask anyone else to support such an antiquated platform. Even if it is wildly popular (a questionable assertion anyway, see below), its users are, by default, a cohort who either didn't know any better, or otherwise didn't care, and that's an inherently problematic group to provide support for an unofficial and experimental endeavor such as this. You might get through the initial setup using this patch, but I'd expect additional issues to arise sooner or later, simply because this is a highly unorthodox approach to PBS, and your systems are all based on a kernel that predates Docker itself by 2-years.

@pagalba-com - how are 2017 stats for NAS popularity relevant? There are loads of newer options that didn't exist when that chart was made. For the record, you can update the kernel on lots of old devices. I'm running the latest kernel right now on a Dell Optiplex with a Windows 7 sticker on the front. The fact that you can't upgrade the kernel on a Synology device is not a good reason to push the responsibility to support an obsolete kernel on other developers--it's a good reason to protest Synology's negligence, and avoid products that aren't capable of being kept up-to-date to begin with. It's Synology's irresponsible firmware that is generating excess e-waste, not software devs who choose not to support an inherently unsafe system.

If I were a Synology customer, I would be hounding them for an update or, better yet, actively seeking a replacement solution for my NAS¹ that won't leave you exposed to exploits and vulnerabilities that were patched more than a decade ago.


  1. With a cheap-ish (~$150-$200) refurb business desktop PC, 16GB-32GB RAM, whatever storage you can cobble together, a 10Gb NIC, and a copy of Unraid, you can achieve a similarly streamlined and intuitive NAS+Apps+Docker user experience, with none of the shite, dangerously outdated Synology firmware, and significantly better performance across the board.

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

Successfully merging this pull request may close these issues.

None yet

8 participants