Install FreeNAS 11.1

 

Machine

As Is

* HP Z400
* Drives:
– USB: 2 x 8 GB
– 2 x (2 x 2TB mirror) Hitachi
– Toshiba DT01ACA100: 1TB
– Barracuda ST3000DM001

To Be


* Drives
– OS: 32 USB
– SLOG: 2 x 32 GB USB

Install FreeNAS

Setup BIOS to Boot from CDROM

* Download FreeNAS 11.1 ISO image
* Burn ISO image onto CD
* Power up Z400
* Hit F10 to go into setup
* Select Storage > Boot Order: Optical Drive/USB Device/Hard Drive Disabled/Embedded Ethernet controller Disabled
* Select Storage > Storage Options > SATA Emulation: IDE

Initial Install

* Place FreeNAS CD into CDROM
* Restart Z400
* Select: FreeNAS Installer
* Select: Install/Upgrade
* Destination media: USB
* Setup password or select: No password
* Select: Boot via BIOS
* Remove boot CD and reboot Network > Global Configuration > IPv4 default Gateway: 192.168.2.1 Nameserver 1: 8.8.8.8 Nameserver 1: 4.4.4.4

Setup FreeNAS

* Point browser to IP: 192.168.2.90
* Enter password for admin account
* Login: admin/nx1

Enabled Powerd

* Go to: System > Advanced
* Enabled powerd (Power Saving Daemon): checked

Create Volume

* Go to: Storage
* Click Volume Manager
– Volume Name: vol1
– Available disks: click button ‘+’1
– 2.0 TB (2 drives, show)
– Volume layout: Mirror
* Click Add Volume

Initial Wizard

* Follow Initial Wizard:
– Language: English
– Console key map: United States of America ISO-8859-1
– Timezone: America/New_York
– Volume name: vol1
– Purpose: Automatic
– Share name: win1
– Purpose: Windows (SMB) Allow Guest
– Console messages: check

Mirror Boot Device

* Login admin UI
* Go to: System > Boot > Status > stripe
* Click Attach button
* Select member disk to point to second USB boot device
* Click Attach Disk

Add Shared Folder

Add User and Group

* Go to: Account > Groups
* Add group:
– Group Name: users
* Add group:
– Group Name: shared
* Add user:
– User name: user1
– Primary group: users
– Full name: User1 Users
– Password: nx1
– Auxiliary groups: shared

Add Shared Folder

* Go to: Storage
* Click vol1 > vol1
* Add dataset in vol1:
– Dataset name: shared
– Share type: Windows
* Dataset permission:
– Owner (user): nobody
– Owner (group): shared
– Permission Type: Windows
* Add a new Windows (SMB) share
– Path: /mnt/vol1/shared
– Name: shared
– Apply Default permissions: checked
– Allow Guest Access: Not checked Map network \\192.168.2.90\shared Connect using different credentials user1/nx1

Add Disks

* Install two 2 TB disks.
* Power up and login
* Go to: Storage
* Click Volume Manager:
– Volume Name: blank
– Volume to extend: vol1
– Click ‘+’ button to add both disks (they should show up in volume layout)
* Click Add Volume
* Select first vol1 and then click Volume Status icon
* Check that two new disks have been added to vol1 under mirror-1

Replace Failed Disk

* See 8.1.10. Replacing a Failed Drive: https://doc.freenas.org/11/storage.html#replacing-a-failed-drive

Find Failed Disk

* Login FreeNAS admin site
* Go to: Storage > Volumes
* Select a volume, e.g. vol1
* Click Volume Status icon at the bottom of the page
– Find disk name with status DEGRADED or OFFLINE, e.g. ada3p2
* Go to: Storage > Volumes > View Disks
– Find Serial number, e.g. YGGU0D6A, for the degraded disk name, e.g. ada3 (drop p2 from ada3p2)
* Match serial number with that on physical disk

Replace Failed Disk

* Go to: Storage > Volumes
* Select a volume, e.g. vol1
* Click Volume Status icon at the bottom of the page
– Select disk with status DEGRADED or OFFLINE
– If there is an Offline button at the end of the page, click it (if not skip this step)
* Shutdown machine and replace the disk
* Start machine
* Go to volume status and select new drive
– Click Replace button at the bottom of the page
* Check resilver status from shell command:
zpool status vol1

Find Failed Disk with Command Line

* Login FreeNAS admin site
* Open shell command window
* Run: zpool status
– Find disk with failed state, e.g. REMOVED
– Take a note of the gptid, e.g. gptid/d1d3b422-125d-11e8-a10f-2c4138ab8e32
* Run: glabel status
– Find component name, e.g. ada3 that is missing!
* Exit shell
* Go to: Storage > View Disks
– Find serial number, e.g. YGGU0D6A, for the failed disk, e.g. ada3
[root@freenas ~]# zpool status                                                 
 
 0                                                                              
          mirror-0                                      ONLINE       0     0    
 0                                                                              
            gptid/7bec2c8c-0de1-11e8-b0ed-2c4138ab8e32  ONLINE       0     0    
 0                                                                              
            gptid/7cd747b5-0de1-11e8-b0ed-2c4138ab8e32  ONLINE       0     0    
 0                                                                              
          mirror-1                                      DEGRADED     0     0    
 0                                                                              
            gptid/d0fdb01c-125d-11e8-a10f-2c4138ab8e32  ONLINE       0     0    
 0                                                                              
            gptid/d1d3b422-125d-11e8-a10f-2c4138ab8e32  DEGRADED     0     0   8
84  too many errors                                                             
 
errors: No known data errors                                                    
[root@freenas ~]# glabel status                                                 
                                      Name  Status  Components                  
gptid/0650ffa7-0d49-11e8-a001-2c4138ab8e32     N/A  da0p1                       
gptid/0664c4c0-0d49-11e8-a001-2c4138ab8e32     N/A  da1p1                       
gptid/7bec2c8c-0de1-11e8-b0ed-2c4138ab8e32     N/A  ada0p2                      
gptid/7cd747b5-0de1-11e8-b0ed-2c4138ab8e32     N/A  ada1p2                      
gptid/d0fdb01c-125d-11e8-a10f-2c4138ab8e32     N/A  ada2p2                      
gptid/d1d3b422-125d-11e8-a10f-2c4138ab8e32     N/A  ada3p2

Setup iSCSI

* Go to: Services
– iSCSI: Start Now
– Also check: Start on boot
* Go to: Sharing > Block (iSCSI) > Portals > Add Portal
– Comment: For Lenovo.
– IP Address: 192.168.2.90 -Port: 3260
* Go to: Sharing > Block (iSCSI) > Targets > Add Target
– Target Name: LenovoTarget
– Portal Group ID: 1 (For Lenovo.)
* Go to: Sharing > Block (iSCSI) > Extent > Add Extent
– Extent Name: LenovoExtent
– Extent Type: File
– Path to the extent: /mnt/vol1/jimmy/extent
– Extent size: 50GB

Change IP Address


* For example, change from 192.168.2.90 to 192.168.1.90

Change Machine IP Address

* Attach keyboard and monitor to machine
* Bootup machine
* Change network IP to new IP using FreeNAS text menu

Change Plex IP Address


* Login FreeNAS
* Go to: Jails / plexmediaserver_1 / Edit
* Change IPv4 address to new IP, e.g. 192.168.1.90

Issues

[WARN] agent: Check ‘freenas_health’ is now warning

* Fix
cd /usr/local/etc/consul-checks/
rm freenas*
wget https://raw.githubusercontent.com/freenas/freenas/8175ddd35c189c43c47a51e42a1353e96d9ac2cb/src/freenas/usr/local/etc/consul-checks/freenas_health.sh
chmod a+x freenas_health.sh

References

* How-To: Set up a home file server using FreeNAS
* FreeNASĀ® 11.1-U1 User Guide
* https://support.plex.tv/articles/201105343-advanced-hidden-server-settings/
This entry was posted in nas, Uncategorized and tagged , . Bookmark the permalink.