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”

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”

pv – monitor the progress of data through a pipe

Today I found a very useful tool. You can monitor the bandwidth of a pipe. For example you copy your raspbian image to the raspberry pi sd card, you can check the write speed.

NAME: pv – monitor the progress of data through a pipe

INSTALL (WITH APT): sudo apt-get install pv

EXAMPLE: dd if=/dev/zero | pv | dd of=/dev/null

OUTPUT: 274MB 0:00:03 [78,6MB/s] [        <=>

WOW FACTOR: 100%