User Tools

Site Tools


misc:homezfsnas

Home ZFS NAS Project

Background

Hard Drive Choice

  • HGST Deskstar 7K2000 HDS722020ALA330 (Ebay $50)(Amazon $70) (Newegg $140) (Power Idle 7.5W)

Raid Levels

  • Raid 5 - 3 Drives → 4TB → 22.5W
  • Raid 5 - 4 Drives → 6TB → 30W

Questions

  1. are iSCSI targets connected on bootup (Windows):
    **yes**
  2. are iSCSI targets connected on bootup (Ubuntu): yes, is seems initiator is able to reconnect even after a target restart
  3. Does iSCSI reattach quickly after suspend: Linux yes with some work, Windows: yes
  4. can you grow iSCSI targets as normal files
  5. can you grow iSCSI targets as ZFS volumes: yes, (zfs set volsize=2g <POOL>/<DATASET>)
  6. Is there a write gain for 4 drive raid 5: yes
  7. What is the performance hit for parity calculations: very small, active cpu usage is less than 2%, local throughput at 4 drives is 200MB/s, iSCSI access is at 125MB/s or 1000mb/s
  8. what is the added latency of ethernet/tcp transmissions: 0.1ms - 0.2ms

NFS Automounter Homes

On Server

/etc/rc.conf

  • NFS locking must be turned on otherwise NFS exports will not work as home directories
...
rpcbind_enable="YES"
nfs_server_enable="YES"
mountd_flags="-r"
rpc_lockd_enable="YES"
rpc_statd_enable="YES"
...

Disable ZLI on nfs dataset

zfs set sync=disabled <DATASET>

Share Dataset

zfs set sharenfs="-maproot=root,-alldirs" <DATASET>

On Client

Install autofs

apt-get install autofs

/etc/default/autofs

...
BROWSE_MODE="yes"
LOGGING="debug"
MOUNT_NFS_DEFAULT_PROTOCOL=3
...
  • Autofs sends logging to syslog, on 14.10 logging showed up in /var/log/syslog

/etc/auto.master

/netHomes /etc/auto.home --timeout=300

/etc/auto.homes

  • There must be a leading “/” between the NFS server and the export e.g. 192.168.0.1:/export
<SERVERNAME> -rw,soft,timeo=5,intr <IP/HOSTNAME>:/<DATASET>
  • This will mount <IP/HOSTNAME>:/<DATASET> on /netHomes/<SERVERNAME>
misc/homezfsnas.txt · Last modified: 2015/01/31 21:36 by tschulz