Hacker News new | ask | show | jobs
by theden 47 days ago
SMB improvements (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...), I've moved to borg, but depending on how this goes may give time machine another try:

   - Add opt-in Apple Time Machine support

     Implement the AAPL negotiation and related Finder, stream,
     COPYCHUNK, sparse-file, CHANGE_NOTIFY, and RPC compatibility
     required for Time Machine shares, allowing macOS backupd to use
     ksmbd for backups
https://www.phoronix.com/news/Linux-7.3-KSMBD

Still sucks that it has to be reverse-engineered

10 comments

I'm not sure if ksmbd still makes all that much sense. A user-space daemon can saturate almost any network link using a single CPU core. And the attack surface... if you control ksmbd, you immediately own the machine.
Even if I did have a requirement that SMB saturate a network, I would probably still not want it to be implemented in the kernel.
> A user-space daemon can saturate almost any network link using a single CPU core.

Not 200Gbps of 16kB block writes, that's for sure.

Agree with you on the rest about kernel vs userspace, just taking issue with the bit about a single CPU core.

In context of time machine backups...

The link will be whatever the fastest network port you can get on an apple machine is. Its not 200Gbps - the apple end will be the limiting factor. A single core can probably fill that just fine.

And being pedantic - 200Gbps links are not a significant percentage of installed network ports in the computers in the world... so "almost any" is pretty accurate.

> A user-space daemon can saturate almost any network link using a single CPU core.

Certainly not a guarantee at today's link speeds. We're increasingly leaning into RDMA and other forms of offloading for a reason.

Over my life I have found that with any Apple technology it may work great with anything outside Apple's control... Until it doesn't, usually out of nowhere.

My father is mostly on Apple and tries to use his iPad as a PC, ie with files and "the filesystem", he tries to get out of using extra iCloud for pictures (using Proton, or he asks me about Immich, or he wants to use an external HDD, or use Synology Photos and backup). He's mostly on the iPad + keyboard because it's a nicely managed device update-wise and "what I can install"-wise, virus-wise.

But I recent told him: Just give up. Buy (rent!) the storage, you are too depended on me, there is always something with the non-Apple solutions. Yes, your iTunes library is a mess on the filesystem, just don't look at it through anything else than "Music". Yes, Proton Drive eats 400 GB of your iPad storage now, I don't know how to trim that regularly. I'm sorry, it's either Linux and I can help set some things up, or full Apple. Choose. His current mixed, "trying to get best-of-both-worlds", approach is just pure unexpected pain, every time again.

Edit: I also have an iPad, it does work for me, but where my father is trying to use his iPad as a central, primary device (the hub), for me it is a client (spoke) of my own infra. Apps get access to information and I never use Apple services for anything. So indeed, Immich, Proton, Home Assistant, government and banking apps, etc. My iPad is throw-away: If it dies, it dies... I buy a new one, log into all (self-hosed) services and I'm 100% back up and running. Doing the same for my father is also pain, because his Home Assistant will have issues, or his Immich instance, and it's real work to fix, and he won't tell me for months if it does not work and work piles up. So, I tell him to surrender to Apple... It die a little inside.

>My father (...) tries to use his iPad as a PC (...) He's mostly on the iPad + keyboard because it's a nicely managed device update-wise and "what I can install"-wise, virus-wise. (...) But I recent told him: Just give up

Since he apparently wants a PC, isn't the logical conclusion the opposite? "Just give up. Buy a Windows/Linux laptop, you are too dependent on Apple, there is always something with the Apple solutions."

We made the call to go Apple years and years ago when he was always fighting viruses and virus scanners on Windows. His Macbook was still (hardware-wise) perfectly functional, but does not receive security updates anymore, so he went iPad. Indeed there are more problems than expected. I expected even less IT support from me was needed. Instead he now complains about the lack of control (which I am certainly ok with btw, the complaining I mean.)

The current plan is to put Ubuntu on the Macbook, not sure what to do with the iPad but make it less "primary computer" will be one of the policies to implement indeed. Maybe he will be happy with an external disk and f-spot, and his music nicely sorted into files. Then some generic backup solution to a Synology NAS or something...

Macbooks are great devices, but Linux is a great "fire-and-forget" OS for situations tech-illiterate loved ones. I've done it many times, with much succes and satisfaction (on both ends) without barely any aftercare. All you really need to do is teach them to install those updates and install a major upgrade every few years (or not, Ubuntu will run fine for a decade).
I beg to differ, I tried that approach a few years back with my folks, only to discover on my next visit a few months later that they went down to a local PC store and got Windows re-installed.

They never managed to get it working for their liking, it wasn't able to run the stuff their friends used to talk about or share via CD/DVD/USB sticks, and they did not wanted to bother me with "dumb" questions.

So I rather that they have Windows, go down to the local PC store when something isn't working as it should.

I do the same with acquaintances whom I sometimes sell secondhand gear, I don't want to do any support so they get Windows. For my father it's different, I can do support, plus he really appreciates and is willing to make sacrifices for, the privacy angle.
Of course you need to help them to alternatives, if they are not that tech-illiterate that they have very specific wishes for software.

It's been a while since I experienced people sharing software one discs by the way, it's been a while since I saw discs at all ;)

I can confirm. That is basically what I did for my father-in-law. The laptop is quite ancient by now (more than 10 years old) but still good enough for running current version of Ubuntu.
> Linux is a great "fire-and-forget" OS for situations tech-illiterate loved ones.

Only if the device is truly 'forgotten'. As in, it is an appliance that's going to do that task forever and ever. Be it web browsing or what have you.

If requirements change, it becomes a problem. If they have to do work on them and interact with companies, you may need either Windows or Linux. Thankfully online Office365 removed a big use-case. But there are others. It is very likely that whatever package you need will be available on Windows or OSX.

Linux is the opposite of fire-and-forget. Eventually a papercut always turns up that will require the terminal.

macOS also has (well, had) extreme UI stability. You could transport someone from 2003 used to Mac OS X 10.0 two decades into the future and they would be able to use macOS Ventura (and all previous versions) purely by muscle memory. Good luck doing that with Windows and Linux with their constant UI churn.

Interestingly enough, by iOS-ifying macOS, they've made it much easier to shift someone using an iPhone from Windows to macOS, because they already recognize many of the UI and UX paradigms.

Linux is not fire and forget for people who use technology without really understanding it, but for people who don't use technology and just need to check their mails and connect to government website to pay their taxes, it is the best.

Once it's configured for these kind of people, it's really fire and forget, and it was already that in 2016.

> Linux is the opposite of fire-and-forget. Eventually a papercut always turns up that will require the terminal.

When I say it's been fire-and-forget, I mean that for at least two decades.

If papercuts turn up, you are running the wrong distro or secretly a power user that naturally causes problems for themselves every now and then. This won't happen with normal users on a long term stable distro.

My daughter has Kinoite set up for her boyfriend's grandparents. It's immutable, so there's not much damage they can do without admin access, and she made it look much like Windows. They were already doing everything with Firefox as it was, so it wasn't a huge transition for them.

She did go back to fix things because the grandma managed to delete the printer, and she said that the downloads folder was full of exe files with sketchy names.

I'm with you on the macOS stability in the past. The thing that gets me is that Windows somehow gets a pass in this regard, but there have been some pretty big changes over the years.

When did you last evaluate a system like Ubuntu? I'd have agreed with you 10, perhaps 5 years ago. But things have changed.
Have you considered open core legacy? I am running macOS Sonoma nearly perfectly on a 2010 iMac.
Viruses were a problem and you're suggesting an old unpatched system.
Viruses are not a problem on macos and have never been. Unless we dive into purely theoretical scenarios.
This is why I direct most family to Apple devices. Otherwise it’s constant tech support.
Yes, did the same more than 10 years ago.

My mother wanted a device to just access internet banking. Gave her a netbook (remember those?). Only successful Linux use-case for non techies I've succeeded at.

I gave a normal notebook. The browser is the OS, it might as well run in TempleOS, it doesn't matter except for vulnerabilities in the browser.
This is why I don't do tech support for family. I just say "I work with servers, I don't know anything about [phones|iPads|laptops]." And indeed, I try to keep my own phone and laptop utterly bone stock or "as configured by employer."

Same philosophy as doctors who don't provide medical care for their family.

>Just give up. Buy a Windows/Linux laptop

I can't fathom using Windows voluntarily these days. Even for gaming, Bazzite is janky but it's serviceable, and anything is better than Windows. It's almost shocking how much worse things are than Windows 10, which itself was a major victory in Microsoft's war against its own users.

> Yes, Proton Drive eats 400 GB of your iPad storage now, I don't know how to trim that regularly.

I love Proton services and have been a subscriber for years. I do not understand what is going on with this. I have proton drive on my iPhone, I manually open it monthly to let my photos sync. I pay for the storage on proton drive to _save_ space locally, but whenever I sync to proton drive the storage space used locally by the app is almost equal to a local photo library! Yes I can delete the app, re-install it monthly to sync my library once, but it quickly balloons to dozens of gigabytes when I start to sync my local photos.

Can anyone at proton explain what is going on here?

I haven't used Proton, but based on my experience with other cloud storage products and seeing other people's reports thereon, it looks to me like you are running into the problem that there are two different use cases for them with opposite requirements:

1. Local storage is cheap, I have lots of it. I want multiple copies of my data so that they will serve as backups. I want everything in the cloud to be copied locally. (I'm in this category.)

2. Local storage is cheap if you look at the price of external hard disks, but my phone or tablet only has a limited amount of it, and no way to upgrade without buying a whole new device, so it is scarce for me. I want nothing in the cloud to be copied locally, unless I am specifically using it on this device. (Sounds like you're in this category.)

Half the people think the first use case is the obvious one. Half the people think the second is the obvious one. And that includes developers, who will design the product accordingly without giving it much thought. So either half the users get a nasty surprise in the form of running out of disk space, or the other half risk an even nastier surprise in the form of data loss.

Obviously, computers pester us with too many questions these days, but I think this is one case where the software really does need to ask the user which behavior they want. Perhaps with a hint based on how much local disk space seems to be available.

Same here. I setup a few Macs for my family to use LDAP and NFS. Gave up after some time due to Apple changing things at will.
Gotta say, using SMB with Apple clients is a massive pain in the ass. I imagine a large part of that is just Microsoft cruft, leaving you to deal with limitations designed around Windows. And you don't really have another option after Apple deprecated AFP.
Apple refuse to pay Microsoft the license for their SMB stack and have dropped open source Samba due to license conflicts with GPL, and so have developed their own implementation (SMBX). This is the reason it is so buggy, and there are loads of articles and posts all over the internet about it. Heres one example from the top of google.

https://www.reddit.com/r/MacOS/comments/18sjnwb/state_of_mac...

Sometimes I wish Apple had gone-head-to-head with Samba and forked v4 and kept it GPL-2 - they might have had enough power to force the issue.
It’s the insane having these discussions in 2026 given samba issues have been a thing as long I’ve been using OSX/macOS. Mixed windows/mac network shares have always been a PITA.
I feel the same about Linux clients. I wish there was some focus there.
Time Machine support has been working on TrueNAS Scale, just via one checkbox on a SMB share config, for years. I thought it was just something in a share config that was always there. Now I wonder how did they do it.
It has been working on upstream Samba for years too, and it is just a couple of lines in smb.conf [1]

If Samba is built with mDNS support, that’s all you need, but it typically isn’t, so you also need to advertise the share using avahi-daemon or systemd-resolved on their respective configurations.

[1]: https://www.samba.org/samba/docs/4.9/man-html/vfs_fruit.8.ht...

This never really worked for me. It would start a backup, very slowly send over a tiny amount of preliminary data, and then fail after several hours. I'm hoping the in-kernel support will get this working for me, but who knows...
I think this is in-kernel smb?
Correct. TrueNAS uses Samba, which has supported this for a while. On TrueNAS it also creates a ZFS snapshot after a successful TimeMachine backup which is really nice for the times MacOS decides to corrupt a TimeMachine volume for no apparent reason.
Wait ... the linux kernel has an SMB server?
And basically only used by those allergic to Samba's GPLv3.
Is that the reason? In the past, a kernel webserver called tux (IIRC) was removed because it was just rediculous and the performance gap was considered a solved problem, not worth keeping an in-kernel server around.
I don't think tux was ever included in the mainline kernel. It was closer to a proof-of-concept than a serious http server alternative.
It also supports RDMA (sometimes called "SMB Direct").
Hmmm...this is separate from using SAMBA?

I tried setting up SAMBA by itself (on Debian) for Time Machine, but for it to work it seems to want Avahi running for mDNS; the problem is there is some weird bug or maybe user-related blooper where it collides with itself from time to time, leading to local DNS weirdness

> Still sucks that it has to be reverse-engineered

With AI and stuff like rea.tools does that really matter anymore?

Let's just accept that this is the new norm: Giant companies who had over 20 years to open their shit up, chose to be ass about it and refused, and now we can just take it. Screw them.

It does. It's the difference between "be my guest" and "catch me if you can". Currently we have better luck catching, but there's no promise that it should stay this way.
This really makes me sad. They devoted time and effort to support something as locked and as broken as Apple Time Machine. That thing is a bad choice even within a 100% Apple ecosystem.
Wait so Time Machine works over SMB? Huh
Works might be a stretch. Every time I hear someone complaining about Time Machine it turns out they are trying to do it over SMB.
Apple have dropped support for AFP, so SMB is the only game in town.
What are the alternatives to SMB for time machine?
A locally attached drive.
Is this the recommended way to use time machine then, as opposed to over a network?
> If you have a USB drive or other external storage device, you can use Time Machine to automatically back up your files, including apps, music, photos, email, and documents.

* https://support.apple.com/en-ca/104984

The "3-2-1" strategy is even possible if you rotate drives between locations:

> For extra security and convenience, you can back up to multiple disks. If you work in two locations, you may want to keep backup disks in both places.

* https://support.apple.com/en-ca/guide/mac-help/mh40739/mac

Since macOS 26, it’s SMB only. Time Machine over AFP is no longer supported.
Yep. My household backs up to a Synology NAS via Time Machine: https://kb.synology.com/en-global/DSM/tutorial/How_to_back_u...
For like 15 years.
I’ve been using Time Machine with my synology nas for ~5 years. Works pretty well. I’d say once every 2 months it looses connection but seems to re-connect itself after a few minutes.
It doesn’t have to be reverse engineered. Apple publishes the source of its SMB client licensed as BSD-4 on GitHub.

https://github.com/apple-oss-distributions/SMBClient

I’m not sure where Phoronix/the author got the information that this was reverse-engineered, because the patch doesn’t say that either.