←back to thread

163 points rbanffy | 6 comments | | HN request time: 0.674s | source | bottom
1. yjftsjthsd-h ◴[] No.42144002[source]
> The other problem we need to solve is swap. Linux, or at least not this Linux, won't let you use a swapfile hosted over NFS; swapon will give you an illegal argument error and refuse to enable it.

To my shock, https://en.wikipedia.org/wiki/Network_block_device says

> The protocol was originally developed for Linux 2.1.55 and released in 1997.

so I wonder if you could use that? It's better suited to swap anyways.

replies(3): >>42144625 #>>42144847 #>>42154552 #
2. undersuit ◴[] No.42144625[source]
Yes, NBD works. I use it to give my 256Mb Pi a swap off the sdcard. You could also use iSCSI now.
replies(1): >>42148539 #
3. rusk ◴[] No.42144847[source]
Hold on now. Swap over NFS? I’m amazed this is viable. I guess the difference between line and device speed wasn’t as vast as it is now.

Having read the article it makes more sense. They need additional capacity for the RAM disk.

replies(1): >>42153977 #
4. yjftsjthsd-h ◴[] No.42148539[source]
Oh, I know it works today; I was just surprised that it might possibly be an option on a 2.4-6 kernel, as I had assumed that Linux didn't get NBD until... I dunno, I would have guessed late aughts?
5. ssl-3 ◴[] No.42153977[source]
In this context, it is less about viability and more about just getting things to work at even the slowest of speeds.

Nobody does swap over things like NFS or NBD unless they have to.

(Even in the Dreamcast days, common home networks were vastly slower than local disk.)

6. somat ◴[] No.42154552[source]
No swap on nfs is strange. Mainly because as far as I can tell swap over nfs has always been a thing on bsd.

here is the openbsd manual on setting up a diskless system(note the bootparams swap line), however it picked up it's netbooting sequence from bsd which if I had to guess picked it up from sun who invented nfs. I was curious if sunos also has it and it does. I choose sunos as a sort of early snapshot of a commercial bsd system. As netbooting was an important thing to Sun I would guess swap over nfs was a day one thing. Anyone know where to go for very early manuals to confirm this?

http://man.openbsd.org/diskless