Dumbledore: Difference between revisions

From miki
Jump to navigation Jump to search
Line 80: Line 80:
:* Samsung SSD 840 and <code>Samsung SSD 850</code> are blacklisted in [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/ata/libata-core.c#n4519 libata-core.c].
:* Samsung SSD 840 and <code>Samsung SSD 850</code> are blacklisted in [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/ata/libata-core.c#n4519 libata-core.c].
:* However, there are patches telling that Queued TRIM is fully supported on Linux... or not [https://lore.kernel.org/stable/yq1h87du82d.fsf@oracle.com/T/], [https://lore.kernel.org/patchwork/patch/892380/], [https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg2234835.html], [https://bugzilla.kernel.org/show_bug.cgi?id=203475]
:* However, there are patches telling that Queued TRIM is fully supported on Linux... or not [https://lore.kernel.org/stable/yq1h87du82d.fsf@oracle.com/T/], [https://lore.kernel.org/patchwork/patch/892380/], [https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg2234835.html], [https://bugzilla.kernel.org/show_bug.cgi?id=203475]
* Enabled TRIM with
sudo systemctl enable fstrim.timer
sudo systemctl start fstrim.timer

Revision as of 22:51, 3 December 2020

Dumbledore is the Raspberry Pi 4 that we use as backup server. See also Voldemort.

Information

  • CPU is a armv8, but as raspbian is 32-bit, it is reported as a 32-bit armv7l [1].
We need usual Debian ARM to get 64-bit apps running. But this may also not be as optimized as Raspbian.
lscpu
# Architecture:        armv7l
# Byte Order:          Little Endian
# CPU(s):              4
  • Ethernet: IP 192.168.1.94, link/ether dc:a6:32:69:da:4e
  • WiFi: IP DHCP, link/ether dc:a6:32:69:da:4f

Configuration

  • Install Raspbian Buster 32-bit (2020-08-20-raspios-buster-armhf-full.zip) using imager_1.4_amd64.deb.
  • Install NoMachine server (armv7 because 32-bit OS, also 64-bit is reported as not being optimized).
  • Enable hardware acceleration in server settings.
  • Add to /etc/NX/server/localhost/server.cfg [2]:
AvailableSessionTypes unix-remote,unix-console,unix-default,unix-application,shadow,unix-xsession-default,unix-gnome,unix-xdm,windows,physical-desktop
  • Restart the server /etc/NX/nxserver --restart.
  • Use static IP by editing /etc/dhcpcd.conf [3]:
+interface wlan0
+static ip_address=192.168.1.94/24
+#static ip6_address=fd51:42f8:caae:d92e::ff/64
+static routers=192.168.1.1
+static domain_name_servers=192.168.1.1 8.8.8.8 fd51:42f8:caae:d92e::1
  • Enable ssh server. The simplest is to [4]:
# Either touch a file and reboot the device
sudo touch /boot/ssh
sudo reboot
# Or enable through systemd
sudo systemctl enable ssh
sudo systemctl start ssh
  • Add to ~/.config/autostart/set_belgian_kbd.desktop:
[Desktop Entry]
Type=Application
Name=Set Belgian autostart
Comment=Set keyboard to Belgian layout
NoDisplay=true
Exec=sh -c '/usr/bin/setxkbmap be'
This should fix the wrong keyboard layout issue.

Borg server

We will use this pi4 as our main borg server.

  • Remove pi from sudo group.
  • Disable no password sudo rule (/etc/sudoers.d/010_pi-nopasswd).
  • Install borg:
sudo apt install cython cython3
sudo apt-get install python3 python3-dev python3-pip python-virtualenv \
    libssl-dev openssl \
    libacl1-dev libacl1 \
    build-essential
sudo pip3 install borgbackup
  • Add a user borg.
  • Mount borg share as separate autofs host (/smb/borg/borg), restricted to borg user:
borg       -fstype=cifs,vers=1.0,_netdev,perm,iocharset=utf8,sec=ntlm,uid=borg,forceuid,gid=borg, \
    forcegid,file_mode=660,dir_mode=770,credentials=/etc/auto.master.d/smb.borg.borg.cred      ://wolverine/homes/borg

Issues

  • When booting headless, the session is not the same as the one we get when we boot with hdmi connected.

Samsung SSD 860 EVO through USB 3

  • There are problem around NCQ, queued TRIM...
  • Samsung SSD 840 and Samsung SSD 850 are blacklisted in libata-core.c.
  • However, there are patches telling that Queued TRIM is fully supported on Linux... or not [5], [6], [7], [8]
  • Enabled TRIM with
sudo systemctl enable fstrim.timer
sudo systemctl start fstrim.timer