ZFS replication between FreeNAS and Ubuntu

PUSH side: FreeNAS 9.10.2-U2
PULL side: Ubuntu Xenial

I have set up the ssh keys, so that root from PUSH can log into PULL without a password but the replication kept failing because of unknown reasons. The documentation is not so long-winded about this, and how to debug. On the PULL side I could see successful but short logins from root in the auth.log. The debug.log on the PUSH side held the key information:

Replication result: /usr/bin/env: �lz4c�: Nincs ilyen fájl vagy könyvtár
cannot receive: failed to read from stream
Failed to write to stdout: Broken pipe
Error 35 : Write error : cannot write compressed block

To solve the replication problem I had to install liblz4-tool on Ubuntu. I enabled Replication Stream Compression, and the tools on Ubuntu were missing. 😦

I am still waiting for compressed zfs replication to be a thing.


Replacing a dying HDD on FreeNAS

I had a degrading HDD, but the LSI Megaraid SAS card was keeping it alive, till its last breath. The HDD is PD 01 and presented to the OS as /dev/mfid1. This can be checked using the mfiutil:

# mfiutil show drives
mfi0 Physical Drives:
 0 (  699G) ONLINE <WDC WD7502ABYS-1 0C06 serial=WD-WMAU00124313> SATA E1:S0
 1 (  699G) ONLINE <WDC WD7502ABYS-1 0C06 serial=WD-WMAU00124517> SATA E1:S1
 2 (  699G) ONLINE <WDC WD7502ABYS-1 0C06 serial=WD-WMAU00124488> SATA E1:S2
 3 (  699G) ONLINE <WDC WD7502ABYS-1 0C06 serial=WD-WMAU00120759> SATA E1:S3
 4 (  699G) ONLINE <WDC WD7502ABYS-1 0C06 serial=WD-WMAU00124038> SATA E1:S4
 5 (  699G) ONLINE <WDC WD7502ABYS-1 0C06 serial=WD-WMAU00124851> SATA E1:S5

Continue reading “Replacing a dying HDD on FreeNAS”

Can’t reconnect to the smb share?

After an upgrade I could not connect to my samba shares on a FreeNAS-9.10.2-U2. Just the following appeared in my syslog:

CIFS VFS: Send error in SessSetup = -13
Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE
CIFS VFS: Send error in SessSetup = -13
[CIFS VFS: Unable to select appropriate authentication method!
CIFS VFS: Send error in SessSetup = -22
Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE
CIFS VFS: Send error in SessSetup = -13
Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE
CIFS VFS: Send error in SessSetup = -13

The FreeNAS-9.10.2-U2 upgrade bumped the samba version number from 4.4.5 to 4.5.5 so something might got deprecated and I could not connect via fstab:

//IP/SHARE /home/USER/share cifs credentials=/home/USER/.smbcred,iocharset=utf8,sec=ntlm 0 0

Solving this problem was easy. The “security=ntlm” part had to be removed. Yaaaay!!!

Flash Archer C20i from factory to OpenWRT/LEDE

I had a lot of success changing the firmware to OpenWRT on multiple TP-Link devices (TL-WR941ND, TL-WR841N, TL-WR740N). With original firmware these devices are only good for home use, but are not capable of supporting 10-20 users (or even more) for example in a dormitory. They just freeze, or drop wireless users randomly. But with an OpenWRT firmware they are rock stable, even under high load. Because these devices have only 4Mb of flash and 32Mb RAM they “just work” and don’t leave any opportunity for adding extra functionality (maybe a little muninlite or tinyproxy). With lede-17.01 you even have to disable some package feeds in opkg to install packages because opkg eats too much RAM. So it was time for a hardware upgrade…

Continue reading “Flash Archer C20i from factory to OpenWRT/LEDE”

ESP8266 won’t respond to AT commands

Recently I was playing with an ESP8266-01 module, and could not communicate with it over serial using an FT232RL-M board @3.3V. These were the symptoms:

  • It booted, I could read the serial output on 115200 baud.
  • If I sent any AT command, it just echoed the command back.

My first setup did not work because the power supplied from the FTDI board was not enough. So my second attempt I added a 3.3V power supply to the setup and ran the ESP board from it. Now everything was working, except the serial commands. After changing the wiring again I created common 3.3V and GND to sync the voltage levels. This way the problem was solved.

I have seen many people running into this problem over the internet, but with no clear solutions.


FreeNAS smartctl disks behind RAID controller

Captain’s Log:
Recently I got strange error messages in dmesg on my FreeNAS 9.10.2 (Dell PowerEdge 2950):

mfi0: 26208 (536790704s/0x0020/info) - Patrol Read started
mfi0: 26261 (536801289s/0x0002/info) - Unexpected sense: PD 01(e0x20/s1) Path 1221000001000000, CDB: 2f 00 34 8c 00 00 00 10 00 00, Sense: 3/11/00
mfi0: 26267 (536802664s/0x0002/info) - Unexpected sense: PD 01(e0x20/s1) Path 1221000001000000, CDB: 2f 00 36 33 68 99 00 10 00 00, Sense: 3/11/00

… and around 50 more. That is definitely not fun. But what is the problem?

Continue reading “FreeNAS smartctl disks behind RAID controller”