Re: Deprecating NBD in favor of squashfs-over-NFS

Maxime Accadia <[email protected]> Fri, 17 May 2019 10:16:45 +0200 (CEST)
Newsgroups gmane.linux.terminal-server.general
Message-ID <1740741699.554182.1558081005694.JavaMail.zimbra@univ-grenoble-alpes.fr>
Very good news ; I think it's a sensible choice as NFS is a standard.

Thanks a lot for your work Alkis.

--
Maxime

----- Mail original -----
De: "Alkis Georgopoulos" <[email protected]>
À: "ltsp-discuss" <[email protected]>
Envoyé: Vendredi 17 Mai 2019 09:52:46
Objet: [Ltsp-discuss] Deprecating NBD in favor of squashfs-over-NFS

NBD is used for the LTSP client root file system, /. 
SSHFS is used for /home and is unrelated to this discussion. 

NBD has some issues; instability; no reconnections; can't survive server 
reboots; difficult configuration; etc. 

In the past, NBD replaced NFS in LTSP because the squashfs image has 
less metadata and is compressed, so it's a lot faster than an 
uncompressed directory. 

The best of both worlds is to export the squashfs image over NFS. 
So, the server will export /opt/ltsp/images via NFS, 
and the clients will connect to /opt/ltsp/images/amd64.img, 
and "loop-mount" it as their root file system. 
To be clear: you'll still need to run `ltsp-update-image` like before. 

LTSP5 already supports this; we just haven't tried it in production a 
lot. For the new LTSP, we'll probably default to that and stop using NBD 
completely, unless you report issues. 

So, if anyone wants to switch NBD to NFS now, aiming for better 
performance and stability, he'd need to do these: 

sudo apt install --yes nfs-kernel-server 
sudo ltsp-config nfs 
sudo gedit /var/lib/tftpboot/ltsp/amd64/pxelinux.cfg/default 

and in that file, replace lines 13-14 from something like this: 
kernel vmlinuz-4.15.0-45-generic 
append ro initrd=initrd.img-4.15.0-45-generic init=/sbin/init-ltsp 
forcepae root=/dev/nbd0 

to something like this: 
kernel vmlinuz-generic 
append ro initrd=initrd.img-generic init=/sbin/init-ltsp forcepae 
root=/dev/nfs nfsroot=/opt/ltsp/images ltsploop=amd64.img 

The change will be overwritten the next time you run ltsp-update-image; 
so if you're happy with the change and you want to make it stick, 
the "default" file there is a symlink to "ltsp"; 
remove the default symlink and run `cp ltsp default`. 

(longer explanation: ltsp-update-kernels creates symlinks for the latest 
kernel, so "vmlinuz-generic" is a symlink to the latest kernel, 
and it only updates the pxelinux.cfg/ltsp file, not the "default", 
so this allows us to maintain pxelinux.cfg/default manually without LTSP 
overwriting it) 

Btw, status update for the next LTSP: it's being developed in a rapid 
pace and will see its first release in September, so it will be called 
ltsp 19.09. 

Cheers, 
Alkis 


_____________________________________________________________________ 
Ltsp-discuss mailing list. To un-subscribe, or change prefs, goto: 
https://lists.sourceforge.net/lists/listinfo/ltsp-discuss 
For additional LTSP help, try #ltsp channel on irc.freenode.net 



_____________________________________________________________________
Ltsp-discuss mailing list.   To un-subscribe, or change prefs, goto:
      https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
For additional LTSP help,   try #ltsp channel on irc.freenode.net