Design RottLAN 2018

Nytt av året er permanent fiber til Sagå, i portchannel (LACP). Ingen IPv6 i år, ihvertfall ikke ut ifra start.

Posted in Nettverk | Tagged , | Leave a comment

Upgrades for Lenovo W500

For anyone interested. It is possible to upgrade your aging Lenovo W500 to 802.11ac wifi, if you have flashed your BIOS without the whitelist. Upgrades I’ve done.

– WWAN F5521GW (Still 3G, but supposedly a bit faster than the original F3507g).
– WiFi Intel 7260 (this is a half hight mini-pcie card, so you need a extension plate).

Posted in Data, Linux | Tagged , , , , , , , , | Leave a comment

intel amt/me debian

Endel Intel systemer idag kommer med vPro. Dette vil si at det er en slags billig iLO/iDRAC løsning integrert. Systemet jeg konfigurerte hadde en eldre versjon, som kun gir mulighet for å styre power samt konsoll over seriell. For oss er det mer enn godt nok for breakfix ved feil.

I korte trekk hva som må konfigureres.

1. IP på Intel ME firmware. Trykk F9? rett etter BIOS. I utgangspunktet kan Intel ME ligge på samme IP som host, og ta over trafikk på vei inn på maskinen. Av gammel vane liker jeg helst å separere denne trafikken helt.
2. Konfigurer grub

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'

GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet elevator=deadline console=ttyS2,115200n8"

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)

# Uncomment to disable graphical terminal (grub-pc only)
GRUB_TERMINAL="console serial"
GRUB_SERIAL_COMMAND="serial --port=0xc000 --speed=115200 --word=8 --parity=no --stop=1"

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux

# Uncomment to disable generation of recovery mode menu entries

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

Kort forklaring på “–port=0xc000”. Denne finner du ved å kjøre:

# dmesg |grep ttyS2 |grep irq
[ 0.527818] 0000:00:03.3: ttyS2 at I/O 0xc000 (irq = 17, base_baud = 115200) is a 16550A

Ser at det stemmer med

# lspci |grep KT
00:03.3 Serial controller: Intel Corporation 82Q35 Express Serial KT Controller (rev 02)

3. Konfigurer systemd med getty.

# systemctl enable serial-getty@ttyS2.service
# systemctl start serial-getty@ttyS2.service

4. Koble til med amttool / amtterm

# export AMT_PASSWORD=passw0rd
# amttool hostname
### AMT info on machine 'hostname' ###
AMT version: 3.2.3
Use of uninitialized value $domainname in printf at /bin/amttool line 244.
Hostname: hostname.
Powerstate: S0
Remote Control Capabilities:
IanaOemNumber 0
OemDefinedCapabilities IDER SOL BiosSetup
SpecialCommandsSupported PXE-boot HD-boot cd-boot
SystemCapabilitiesSupported powercycle powerdown powerup reset
SystemFirmwareCapabilities 0
# amtterm hostname
amtterm: NONE -> CONNECT (connection to host)
ipv4 hostname [] 16994 open
amtterm: CONNECT -> INIT (redirection initialization)
amtterm: INIT -> AUTH (session authentication)
amtterm: AUTH -> INIT_SOL (serial-over-lan initialization)
amtterm: INIT_SOL -> RUN_SOL (serial-over-lan active)
serial-over-lan redirection ok
connected now, use ^] to escape

Debian GNU/Linux 8 hostname ttyS2

hostname login:

Kan også nå web interface for å styre power, se på events osv på port 16992. eks


Posted in Data, Linux | Tagged , , , , , | 1 Comment

Design RottLAN 2017

Nytt av året blir IPv6 only subnet. Dette vil bli tilgjengelig på egen SSID + utvalgte porter i core+edge switch (forbeholdt vlan støtte).

Posted in Data, Nettverk | Tagged , | Leave a comment

Utvide ZFS pool med ny RAIDZ VDEV

Rimelig rett frem, det vil riktignok ikke være noen rebalansering av data, så dette må en ta seg av selv. Fordelen er jo at kommandoen er ferdig på sekunder og plassen kan utnyttes umiddelbart.

Først kjørte jeg kommandoen med oppsjonen “-n” for å være sikker på at den var korrekt.

# zpool add -n tank raidz ata-HGST_HDN724040ALE640_PK1381PCJSZ50S-part4 ata-HGST_HDN724040ALE640_PK1381PCJT6EWS-part4 ata-HGST_HDN724040ALE640_PK1381PCK3N9DS-part4 ata-HGST_HDN724040ALE640_PK1381PCKZ840S-part4
would update 'tank' to the following configuration:

Ser riktig ut, så da kjører vi kommandoen.

# zpool add tank raidz ata-HGST_HDN724040ALE640_PK1381PCJSZ50S-part4 ata-HGST_HDN724040ALE640_PK1381PCJT6EWS-part4 ata-HGST_HDN724040ALE640_PK1381PCK3N9DS-part4 ata-HGST_HDN724040ALE640_PK1381PCKZ840S-part4
# zpool status
pool: tank
state: ONLINE
scan: scrub repaired 0 in 21h19m with 0 errors on Sat Aug 15 01:49:26 2015

tank ONLINE 0 0 0
raidz1-0 ONLINE 0 0 0
ata-HGST_HDS724040ALE640_PK1334PBGX5SJS-part4 ONLINE 0 0 0
ata-HGST_HDS724040ALE640_PK1334PBGY417S-part4 ONLINE 0 0 0
ata-HGST_HDS724040ALE640_PK1334PBHJT8NP-part4 ONLINE 0 0 0
ata-HGST_HDS724040ALE640_PK1334PBHJT9UP-part4 ONLINE 0 0 0
raidz1-2 ONLINE 0 0 0
ata-HGST_HDN724040ALE640_PK1381PCJSZ50S-part4 ONLINE 0 0 0
ata-HGST_HDN724040ALE640_PK1381PCJT6EWS-part4 ONLINE 0 0 0
ata-HGST_HDN724040ALE640_PK1381PCK3N9DS-part4 ONLINE 0 0 0
ata-HGST_HDN724040ALE640_PK1381PCKZ840S-part4 ONLINE 0 0 0
mirror-1 ONLINE 0 0 0
ata-Samsung_SSD_840_EVO_250GB_S1DBNSBF485213N-part5 ONLINE 0 0 0
ata-Samsung_SSD_840_EVO_250GB_S1DBNSBF485216D-part5 ONLINE 0 0 0
ata-Samsung_SSD_840_EVO_250GB_S1DBNSBF485213N-part6 ONLINE 0 0 0
ata-Samsung_SSD_840_EVO_250GB_S1DBNSBF485216D-part6 ONLINE 0 0 0

errors: No known data errors
# zpool list tank
tank 28.2T 11.8T 16.4T - 9% 41% 1.00x ONLINE -

Posted in Linux | Tagged , , , , , | Leave a comment

Utvide mdadm RAID10

Det var litt lite informasjon via google om dette var støttet. Men det viser seg etter litt graving at dette går fint så lenge RAID10 settet er opprettet via mdadm 3.3

Selve utvidelsen er rimelig rett frem.

# cat /proc/mdstat
md1 : active raid10 sda3[0] sdc3[2] sdd3[3] sdb3[1]
195179520 blocks super 1.2 512K chunks 2 near-copies [4/4] [UUUU]

# mdadm --manage /dev/md1 --add /dev/sde3 /dev/sdf3 /dev/sdg3 /dev/sdh3
# mdadm --grow --raid-devices=8 /dev/md1
# cat /proc/mdstat
md1 : active raid10 sdh3[7] sdg3[6] sdf3[5] sde3[4] sda3[0] sdc3[2] sdd3[3] sdb3[1]
195179520 blocks super 1.2 512K chunks 2 near-copies [8/8] [UUUUUUUU]
[>....................] reshape = 0.1% (339584/195179520) finish=9.5min speed=339584K/sec

Posted in Data, Linux | Tagged , , , , | Leave a comment


odroidc1-gpsBased on the gps receiver from hab supplies, the work of jgilje and debian jessie I have been able to compile a minimal image which can work as a Stratum-1 ntp server.

The image itself is ~90MB compressed, and contains a minimal installation of debian jessie, kernel from hardkernel with the pps-gpio patch from jgilje. ntp package was recompiled and is held from future updates. ntpd is preconfigured to use NMEA( driver with PPS sync. And udev rules to create the apropriate devices for ntpd to use. I also removed all of the dvb drivers in the kernel provided by hardkernel.

odroidc1-gps1If you want to relocate the PPS signal to a different gpio pin, this can be done by altering the meson8b_odroidc.dts file and compiling it to an apropriate .dtb file.

Image can be written to memory card using win32diskimager or dd, it will use dhcp for network configuration. Only user enabled is root with the password root. Framebuffer should also work, so you can connect it to a screen and configure it locally.

Things to do at first boot. Use fdisk to delete partition 2, and recreate the partition with the same size as the sd-card. Then resize the root partition.

Please note that on cold boot, it will take some time to lock onto the PPS.



Some ntpd output.

root@odroid-c1:~# ntpq -p
remote refid st t when poll reach delay offset jitter
============================================================================== 2 u 5 64 377 11.512 0.230 0.812
+2.81-166-42.cus 2 u 36 64 377 4.607 -0.430 0.612
+langbein.monslo 2 u 40 64 377 15.449 -1.063 0.953
-ntp-ext.cosng.n 2 u 24 64 377 14.528 1.604 1.253
oGPS_NMEA(0) .GPS. 0 l 12 16 377 0.000 -0.001 0.001

root@odroid-c1:~# ntpq -c rl
associd=0 status=0415 leap_none, sync_uhf_radio, 1 event, clock_sync,
version="ntpd 4.2.6p5@1.2349-o Mon May 25 18:52:44 UTC 2015 (1)",
processor="armv7l", system="Linux/3.10.75", leap=00, stratum=1,
precision=-20, rootdelay=0.000, rootdisp=0.354, refid=GPS,
reftime=d90ed892.9bbc5b1d Tue, May 26 2015 11:33:38.608,
clock=d90ed89b.4cfcafe8 Tue, May 26 2015 11:33:47.300, peer=59860, tc=4,
mintc=3, offset=-0.001, frequency=9.542, sys_jitter=0.001,
clk_jitter=0.001, clk_wander=0.000

Posted in Data, Linux, Nettverk | Tagged , , , , , | 2 Comments

Design RottLAN 2015

Ikke veldig mye har forandret seg siden 2012, men noen nye ting er det.

  • Alle får dualstack (IPv4 / IPv6 ) addresser. IPv6 addressene er _helt_ åpne fra utsiden, mens IPv4 addressene er NATet.
  • TV VLAN fra Risnes er tatt ut over trådløs link til RIX. Kan hvis ønskelig dras ned til “rix-s03”



Posted in Data, Nettverk | Tagged , , , , , , , | 4 Comments

CactiEZ tom for plass.

Innimellom så begynner CactiEZ å logge masse, og da går en tom for plass. For å ikke ødelegge grafene er trikset å restore en gammel backup. Også sørge for at poller_output cachen blir opprettet på ny i mysql.

# /etc/init.d/httpd stop
# cd /
# tar zxvf /var/www/backups/cacti-backup-2015-03-08.tar.gz
# mysql -ppassord cacti < /var/www/html/cacti-backup.sql # mysql -ppassord syslog < /var/www/html/syslog.sql # cd /var/www/html/cli/ # php repair_database.php

Så for å gjenskape mysql output tabellen.

use cacti;
truncate poller_output;

Denne bruker typisk hvis du ser

03/10/2015 02:29:07 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1017', SQL:"select poller_output.output, poller_output.time, UNIX_TIMESTAMP(poller_output.time) as unix_time, poller_output.local_data_id, poller_item.rrd_path, poller_item.rrd_name, poller_item.rrd_num from (poller_output,poller_item) where (poller_output.local_data_id=poller_item.local_data_id and poller_output.rrd_name=poller_item.rrd_name) LIMIT 10000"

i loggene.

Posted in Data, Linux | Tagged , , | Leave a comment

bad-block-list i mdadm

For fremtidige mdadm raid(Blir mest sannsynligvis ZoL uansett), så kan det aktiveres bad-block-list. Dette skal visstnok kunne gjøre at man får lest ut ett mdadm raid selv om det skulle være noen bad-blocks.

Gjelder mdadm 3.3 og kernel 3.1

To add a bbl to a pre-existing array you need to assemble with “–update=bbl”. You cannot hot-add a BBL at present. <-- scroll ned til Neil Brown sitt innlegg (Aug 20, 2014 1:44 UTC).

Posted in Data, Linux | Tagged , , , , | Leave a comment