Export disk volume from TrueNas via iSCSI protocol

We can export an virtual volume (zvol) on TrueNas, thanks to the iSCSI protocol.

Storage

Create a pool

Create a zvol from the pool

Sharing / Block/Shars (iscsi)

Target Global Configuration: Modify iqn if necessary

Portals: Add a portal with IP 0.0.0.0

Initiators Groups: Add a initiator with feature of “Allow All initiators”

Authorized Access: No modification

Targets: Add a target with the above portal id, initiator id

Extents: Add a extent with created pool/zvol

Associated Targets: Add an associated target with created target and extent

Services

Launch iscsi service, and start it automaticlly

NAS DIY: HP ML310e Gen8 V2 + TrueNas v13

Hardware:

HP ML310e Gen8 V2

Update system software with SPP gen8.1

Update iLO4 to v2.8.1

CPU:

E3-1220L V3 @1.10GHz

RAM:

32G ECC DDR3 @1.35V / 1066MHz

System Disk:

32G T-Flash Card + 32G USB Disk

Hrad disk drivers

6 LFF SATA

Software:

TruenNAS – Core – 13.0 – U2

Power Consumption

28W ( Without hard driver )

TCO: RMB 1326.8

HP ML310e Gen8 V2 X1 638

Samsung 8G 2RX8 PC3-12800E X4 397

Intel E3-1220L V3 X1 130

SanDisk 32GB USB3.1 CZ430 X1 35.9

SanDisk Ultra 64GB Micro SD X1 35.9

Toolfree MRA190 5.25=>3.5 X2 90

Config NUT for CyberPower VAL600 UPS with TrueNAS Core 12.0-U6

     Master NAS,   PC/TrueNAS Core attached with UPS USB Cable

  • Step 1:   Power on the Cyberpower VAL600 & plug the USB cable into TrueNas system

  • Step 2:   Find out UPS port information, say ugen3.0

TrueNAS Web Gui / System/Advance/Show Console Message

  • Step 3:   Config with the UPS

TrueNAS Web Gui / Services/UPS

UPS Mode:  Master

Remote Monitor:    Enable

Monitor User:      upsmon

Monitor Password:   Your Passwrod

Driver:  Cyber Power System ups2 Value 600E USB

Port or Hostname:   /dev/ugen0.3auto

Shutdown Command:  shutdown -h now

  • Step 4:  Check with command upsc ups@localhost

TrueNAS Web Gui / Shell

  • Step 5:   Verify shutdown command is working by turn off the AC power supplier of UPS

     Slave NAS:    PC/TrueNAS Core not  attached with UPS USB Cable

  • Step 6:Config TrueNAS PC as NUT Salve

UPS Mode:     Slave

Remote Host:   IP of Master NAS

Remote Port:    3493

Port or Hostname:  auto

Monitor User:     upsmon

Monitor Password:    Same as Master UPS

Shutdown command:     shutdown -h now

     Slave Linux:    PC/Linux not  attached with UPS USB Cable

  • Step 7: Config Linux PC as NUT slave

Install NUT

Config upsmon as following

POWERDOWNFLAG /etc/nut/killpower
               MONITOR ups@MASTER_UPS_IP 1  upsmon YOUR_PASSWORD  slave
               MINSUPPLIES 1
               SHUTDOWNCMD “/sbin/shutdown -h +0”

               POLLFREQ 5
               POLLFREQALERT 5
               HOSTSYNC 15
               DEADTIME 15
               RBWARNTIME 43200
               NOCOMMWARNTIME 300
               FINALDELAY 5

Launch upsmon service

Note:

TrueNAS Core only support  UPS On Battery Action

FreeNAS

 Two TrueNAS (FreeNAS)  NAS system are setup for the purpose of data backup, including the resumed blog running on ESXi virtual machine, replaced the Buffalo lS-WXL and WdMycloud.

The benefit of FreeNAS:

  • Based on Freebsd OS, stable
  • Native support ZFS, and snapshot
  • Other professional feature ready

 

The blog data is backup into the 1st FreeNAS, manually after updating the blog.

The 1st FreeNas will generate a snapshot every day, thanks to the Periodic Snapshot Task provided by FreeNAS system, and them replicate the snapshot to the 2nd FreeNas machine, also thanks to the Replication Task of freeNas system.

 

Hardware spec of 1st NAS:

  1. HP T610 plus thin client  ( AMD (G-T56N) 1.65GHz dual core / E350 )
  2. 16GB DDR3  (2 X 8GB)
  3. 32GB Flash driver  for FreeNAS system + 4TB 3.5 HD for data
  4. 10/100/1000  Ethernet

 

    Cost: without Data Disk:

             AMD T610 Plus                               RMB 185
             Power:19V4.74  7.4*5.0mm         RMB 30
             SATA2 32G SSD                            RMB 45
             DDR3L 8G/1600  X2                       RMB 398
———————————————————————–
                 Total                                            RMB 658      

 

 

Hardware spec of 2st NAS:

  1. HP Z220 MT workstation
  2. 32GB DRR3 ECC RAM
  3. Intel G3250T CPU
  4. One USB key for FreeNAS system + 10T HD for data

 

The Raid sub-system is not a best choice.

As Home User, we don’t care about the data lost, or data server down in a short period of time.  That’s way we two NAS system / Data replication instead of raid sub-system.