Skip to content

Instantly share code, notes, and snippets.

@johndavisnz
Last active April 27, 2022 21:38
Show Gist options
  • Save johndavisnz/d4d8cf1304ebade08f924411d2c83327 to your computer and use it in GitHub Desktop.
Save johndavisnz/d4d8cf1304ebade08f924411d2c83327 to your computer and use it in GitHub Desktop.
installing debian 11 on Nimbustor 2/4 - step 5 : setting up other network serivces and miscellaneous additional packages

enable non-free and contrib repositories

nano /etc/apt/sources.list

for each line, after main add contrib non-free

save/exit and rellad the new repositories ( apt update )

install the rtl812e 2.5gbe firmware

apt install firmware-realtek

install the i915 graphics firmware

apt install firmware-linux 
apt install firmware-linux-nonfree

reboot to load the updated firmware

install OMV6 to enable a web-based (NAS) management interface

https://forum.openmediavault.org/index.php?thread/39490-install-omv6-on-debian-11-bullseye/

first setup the OMV6 repository

cat <<EOF >> /etc/apt/sources.list.d/openmediavault.list
deb http://packages.openmediavault.org/public shaitan main
# deb http://downloads.sourceforge.net/project/openmediavault/packages shaitan main
## Uncomment the following line to add software from the proposed repository.
# deb http://packages.openmediavault.org/public shaitan-proposed main
# deb http://downloads.sourceforge.net/project/openmediavault/packages shaitan-proposed main
## This software is not part of OpenMediaVault, but is offered by third-party
## developers as a service to OpenMediaVault users.
# deb http://packages.openmediavault.org/public shaitan partner
# deb http://downloads.sourceforge.net/project/openmediavault/packages shaitan partner
EOF

next install OMV6

export LANG=C.UTF-8
export DEBIAN_FRONTEND=noninteractive
export APT_LISTCHANGES_FRONTEND=none
apt-get install --yes gnupg
wget -O "/etc/apt/trusted.gpg.d/openmediavault-archive-keyring.asc" https://packages.openmediavault.org/public/archive.key
apt-key add "/etc/apt/trusted.gpg.d/openmediavault-archive-keyring.asc"
apt-get update
apt-get --yes --auto-remove --show-upgraded \
    --allow-downgrades --allow-change-held-packages \
    --no-install-recommends \
    --option DPkg::Options::="--force-confdef" \
    --option DPkg::Options::="--force-confold" \
    install openmediavault-keyring openmediavault

# Populate the database.
omv-confdbadm populate

# Display the login information.
cat /etc/issue

reboot - once restarted OMV6 should now be running - open a web-browser to your lockerstor and you should get the login page - login using the default admin account ( username admin password openmediavault) then refer to the OMV docs for how to proceed for setting up the RAID array on the lockerstor HDDs, creating users and shares etc

install Plex media server

don't do this UNTIL AFTER you have OMV6 installed, raid arrays and shares configured etc

apt install apt-transport-https curl
curl https://downloads.plex.tv/plex-keys/PlexSign.key | apt-key add -
echo deb https://downloads.plex.tv/repo/deb public main >/etc/apt/sources.list.d/plexmediaserver.list
apt update
apt install plexmediaserver
systemctl status plexmediaserver

reboot - you should be able to log in to Plex on port 32400 ( https://<hostname>:32400 ) - refer to the Plex docs for how to proceed to configure it

fixing intermittent ICRC errors on /dev/sdb

in the system logs could see intemittent issues on /dev/sdb ( ICRC errors - which are a link crc error ) when running 'sudo dmesg | grep -i sata'.

Seemed specific to the 2nd bay (sdb) ONLY, bay 1 ( sda ) was fine

I went into BIOS setup and under 'chipset SATA' tried changing

'agressive LPM mode' from 'enabled' (default) to 'disabled'
for each drive:
'SATA hot plug' from 'enabled' to 'disabled' 
'mechanical presence' from 'enabled' to 'disabled'

Unfortunately on reboot this causes the 2nd drive to DISAPPEAR in the bios - so had to turn back on hot plug and presnce, leaving ONLY agressive LPM disabled

However whilst on that BIOS page I noticed the BIOS itself claims each port is only 3gbps sata - however linux is negotiating 6gbps. The chipset itself is good for 6gbps - but it's quite likely there's a design issue with the drive backplane (noise) that caused them to limit speed to 3gbps to get rid of errors!!!

to force 3gbps need to edit the kernel boot options :

sudo nano /etc/default/grub

find the line: GRUB_CMDLINE_LINUX_DEFAULT="quiet"

change it to: GRUB_CMDLINE_LINUX_DEFAULT="libata.force=3.0"

if you want to disable spectre/meltdown mitigations at the same time ( decreases security, but improves performance )

instead change it to: GRUB_CMDLINE_LINUX_DEFAULT="libata.force=3.0 mitigations=off"

and then update grub via 'sudo update-grub'

after rebooting 'sudo dmesg | grep -i sata' should show link is now 3gbps

[    1.984659] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 320)
[    1.988644] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 320)

there is a tiny impact on raid0 speed at the lower link speed ( r/w speed drops from 400mb/s to about 370mb/s ) - however this is still MUCH faster than the 2.5gbe port can deliver data so it's not really an issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment