USB boot device has corrupted sectors - what's the best way to replace it with new USB and upgrade

macosxgeek

Dabbler
Joined
Jul 20, 2018
Messages
11
Hi,

I'm running FreeNAS server which basically boots from USB stick. Here are some details on the server itself:

FreeBSD <my_hostname_here> 9.3-RELEASE-p13 FreeBSD 9.3-RELEASE-p13 #4 r281084+c7bb047: Wed Apr 15 15:03:01 PDT 2015 root@build3.ixsystems.com:/tank/home/jkh/build/FN/objs/os-base/amd64/tank/home/jkh/build/FN/FreeBSD/src/sys/FREENAS.amd64 amd64


CPU: Intel(R) Xeon(R) CPU E5-2603 v3 @ 1.60GHz (1600.03-MHz K8-class CPU)
FreeBSD/SMP: Multiprocessor System Detected: 12 CPUs

hw.physmem: 34222850048 (32GB)



Code:
[root@mynas] ~# zpool status
  pool: freenas-boot
 state: DEGRADED
status: One or more devices has experienced an error resulting in data
		corruption.  Applications may be affected.
action: Restore the file in question if possible.  Otherwise restore the
		entire pool from backup.
   see: http://illumos.org/msg/ZFS-8000-8A
  scan: scrub repaired 0 in 0h1m with 8 errors on Fri May  4 03:46:10 2018
config:

		NAME										  STATE	 READ WRITE CKSUM
		freenas-boot								  DEGRADED	 0	 0	 0
		  gptid/0a2caa32-ed03-11e4-a358-0cc47a34217e  DEGRADED	 0	 0	 0  too many errors

errors: 9 data errors, use '-v' for a list

  pool: raid10
 state: ONLINE
  scan: scrub repaired 0 in 213h56m with 0 errors on Mon Jul  9 21:56:39 2018
config:

		NAME											STATE	 READ WRITE CKSUM
		raid10										  ONLINE	   0	 0	 0
		  mirror-0									  ONLINE	   0	 0	 0
			gptid/764d8d5d-ed0a-11e4-8e51-0cc47a34217e  ONLINE	   0	 0	 0
			gptid/76c063b4-ed0a-11e4-8e51-0cc47a34217e  ONLINE	   0	 0	 0
		  mirror-1									  ONLINE	   0	 0	 0
			gptid/772993dc-ed0a-11e4-8e51-0cc47a34217e  ONLINE	   0	 0	 0
			gptid/77a3311a-ed0a-11e4-8e51-0cc47a34217e  ONLINE	   0	 0	 0
		  mirror-2									  ONLINE	   0	 0	 0
			gptid/7813e5d8-ed0a-11e4-8e51-0cc47a34217e  ONLINE	   0	 0	 0
			gptid/a2ce2508-954b-11e7-a444-0cc47a34217e  ONLINE	   0	 0	 0
		  mirror-3									  ONLINE	   0	 0	 0
			gptid/78ee89a5-ed0a-11e4-8e51-0cc47a34217e  ONLINE	   0	 0	 0
			gptid/cd459747-9544-11e7-a444-0cc47a34217e  ONLINE	   0	 0	 0

errors: No known data errors



Basically system is working fine for most of the time (it reboots occasionally without a reason - but I guess that's related to the USB stick being corrupted).
Can I ask what's the best way for replacing the USB stick to a new one without loosing any data? Also I wanted to put the latest STABLE FreeNAS on the new USB stick - but I guess that won't be a big problem.. :smile:

Any help would be appreciated.

--
Best regards
macosxgeek
 

macosxgeek

Dabbler
Joined
Jul 20, 2018
Messages
11
Sorry - forgot to mention corrupted files:

Code:
errors: Permanent errors have been detected in the following files:

		freenas-boot/ROOT/FreeNAS-f6fe96f39c77c8db48c23815e290c103@2016-09-09-13:32:41:/usr/local/lib/perl5/5.16/perl/man/whatis
		//usr/local/lib/libsmbconf.so.0
		freenas-boot/ROOT/FreeNAS-f6fe96f39c77c8db48c23815e290c103@2015-04-27-10:54:08:/usr/local/lib/libnetsnmpmibs.a
		freenas-boot/ROOT/FreeNAS-f6fe96f39c77c8db48c23815e290c103@2015-04-27-10:54:08:/usr/local/lib/libxml2.a
		freenas-boot/ROOT/FreeNAS-f6fe96f39c77c8db48c23815e290c103@2015-04-27-10:54:08:/usr/local/lib/libsmbconf.so.0
		freenas-boot/ROOT/FreeNAS-f6fe96f39c77c8db48c23815e290c103@2015-04-27-10:54:08:/usr/local/lib/libssl.a
		freenas-boot/ROOT/FreeNAS-f6fe96f39c77c8db48c23815e290c103@2015-04-27-10:54:08:/usr/local/lib/libnetsnmp.a
		freenas-boot/ROOT/FreeNAS-f6fe96f39c77c8db48c23815e290c103:/bin/chio
		freenas-boot/ROOT/FreeNAS-f6fe96f39c77c8db48c23815e290c103:/usr/local/lib/python2.7/lib-dynload/_codecs_cn.so
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Download your config and do a fresh install and restore.

It's probably worth noting that USB sticks are starting to be seen as problematic from version 9.10 up, so you should consider your options to use an SSD (a cheap one is usually fine) instead.
 

macosxgeek

Dabbler
Joined
Jul 20, 2018
Messages
11
Download your config and do a fresh install and restore.

It's probably worth noting that USB sticks are starting to be seen as problematic from version 9.10 up, so you should consider your options to use an SSD (a cheap one is usually fine) instead.


@sretalla Thank you! I will try to do backup/restore.. Also I did find an old spare SSD drive I could use:

dDjMaYW.jpg


I will try to use it as a boot drive instead of USB stick. Just need to schedule some maintenance/downtime window first.. And do it during the weekend.. My biggest fear was not to loose any data.. I just wonder how the installer will pick up the storage array (drives with an actual data..)..

--
Best regards
macosxgeek
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Looks like a good option for a boot drive.

Ignore the installer (well, obviously use it to install), exit the wizard and just restore your config.

All your pools and settings will be as you left them before the operation.

Best of luck with it. Here to help if it doesn't go to plan.
 

WW1 Flying Ace

Dabbler
Joined
Jul 17, 2018
Messages
10
Looks like a good option for a boot drive.

Ignore the installer (well, obviously use it to install), exit the wizard and just restore your config.

All your pools and settings will be as you left them before the operation.

Best of luck with it. Here to help if it doesn't go to plan.

This is an excellent thread.

I am in the situation of having installed my primary NAS about two months before this thread started. In researching best practices for installation I too installed two mirrored 16GB Sandisk Cruisers. I had also installed a couple of others using this boot setup, one being my home NAS.

Fast forward to a couple of months ago. I ran an upgrade from 11.1-U? to 11.2 on my home NAS. The upgrade processed fine until the restart where I was greeted with a boot drive error. I was able to start FreeNAS by removing the offending stick. I "fixed" it by reinstalling the same version to a SSD I had lying around, and viola, no problems.

I purchased a couple of 256GB Samsung 860 Pro SSDs for my Primary NAS which is currently:
Code:
Build:    FreeNAS-11.1-U7
Platform:    Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz
Memory:    65384MB

My Question: Can I install the latest version onto the SSD's and then upload my configuration from the 11.1 version? Or, should I install 11.1 first then upgrade later?

TIA
 

ThreeDee

Guru
Joined
Jun 13, 2013
Messages
700

Constantin

Vampire Pig
Joined
May 19, 2017
Messages
1,829
This might also be a good time to take advantage of FreeNAS' ability to rely on boot pools, i.e. use multiple boot drives that are configured in a mirror 1 config. They all clone automatically, when one fails, the next one takes over. I find the current way to add additional boot drives a bit obtuse, but that's just my opinion.

See System ---> Boot Environments ---> Boot Pool Status and then select the triple dot on the top line ('Freenas boot') to attach another drive to the boot pool.

I'm also a fan of using SSDs or SATADOMS with 32+GB of space, which obviates the need to erase previous system images as often as I had to with the FreeNAS-supplied 16GB SATADOM stick.
 

WW1 Flying Ace

Dabbler
Joined
Jul 17, 2018
Messages
10
Top