Unable to check FARM

Hello Guys,

So, went ahead and plugged in all my drives and thought to check FARM before testing the drives but i see an error:

root@Storage[~]# smartctl -l farm /dev/da8
smartctl 7.2 2021-09-14 r5236 [FreeBSD 13.1-RELEASE-p9 amd64] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=======> INVALID ARGUMENT TO -l: farm
=======> VALID ARGUMENTS ARE: er

I’m using TrueNAS Core, latest version. Any help would be appreciated. Thanks

Take a look at the manual (man) pages. That should give you info on the version on your system.
man smartctl

I believe you need smartmontools v7.4 or later…

Correct. I tried to update (aka manually installing smartmontools) but no luck yet on truenas core. How can i update and check FARM data?

hate to post this but regarding updating smartmontools:

2 Likes

Dang. How sad is that.

If this is a one-time thing, just boot from a current LiveCD Linux.

Don’t have a USB and only have Mac machines and the Java crashes so cannot boot via IPMI ;(

You can do it if you know how to compile smartmontools.

But you are in luck, here are my instructions on how to do it. Be warned, you take your life into your own hands. I can’t or really “will not” help beyond posting this.

EDIT: This does survive reboot, but not an upgrade, for obvious reasons.

1. Bootstrap flavor of TrueNAS.
2. Create Clone of Boot Environment and set Active, Reboot.  This will allow you to play with the boot code and roll back if things fail.
3. For CORE:
	a. Create a jail for FreeBSD 13.2 (13.1 ports are no longer supported)
	b. portsnap fetch extract (installs the current ports)
	c. If portsnap is already installed, run portsnap fetch update
	d. (installs the source code)
	e. (builds the new files)
	f. Go to step 5 below to test and collect the files you need to retain.
	g. Cleanup by deleting the jail.

4. For SCALE:
	a. install-dev-tools (Note: if install-dev-tools does not work, enter: mount -o remount,rw '/usr' and romount="true")
	b. Get a copy of the current software package (smartmontools-7.4.tar.gz) at: https://sourceforge.net/projects/smartmontools/files/
	c. Or a copy of development software package (smartmontools-7.5-r5554.src.tar.gz) at https://builds.smartmontools.org/
	d. Copy the new tar.gz file to a directory (/root/)  Note: Everything is built in root due to permissions issues.
	e. cd /root
	f. tar xf smartmontools-7.5-r5554.src.tar.gz
	g. cd smartmontools-7.5
	h. Disable smartd in Services (no reboot required after this, I hope)
	i. rm -R /var/lib/smartmontools/drivedb
	j. rm /usr/sbin/smartctl
	k. rm /usr/sbin/smartd
	l. rm /usr/sbin/update-smart-drivedb
	m. May not be required if smartd was deleted without issue, otherwise reboot to restart without smartd)
	n. cd /root/smartmontools-7.5
	o. ./configure
	p. make
	q. make install
	r. reboot
	s. update-smart-drivedb --no-verify (This may not result is an update)
	t. Cleanup the files we just created, rm -R /root/smartmontools-7.5

5. Type smartctl and see if it works.
	These files are to be collected for upgrades:
	a. /usr/local/share/smartmontools/drivedb.h
	b. /usr/local/sbin/smartctl
	c. /usr/local/sbin/smartd
	d. /usr/local/sbin/update-smart-drivedb

6. In order to update a virgin system...
	Original File Locations - Replace with new files...

	a. Turn off smartd in Services if it is running or you will not be able to replace smartd with the new version.
	b. (For SCALE 24.x or higher) mount -o remount,rw '/usr'
	c. (For SCALE 24.x or higher) romount="true"
	d. Copy new smartd file to /usr/sbin/smartd
	e. Copy new smartctl file to/usr/sbin/smartctl
	f. Copy new update-smart-drivedb file to /usr/sbin/update-smart-drivedb
	g. Copy new drivesdb.h file to /usr/share/smartmontools/drivedb.h
	h. reboot

Thank you so much for your help. I already used SCALE and was able to dig the farm check+firmware update. Now, the drives are put onto long SMART test.

Have not changed the sector size yet and i think i should leave it to 512. Once the tests are done, i’ll have to check on the head flying/parking thingy and then modify EPC related settings.

Given the price of the technology you tinker with, having a USB-stick is an essential tool, and it costs next to nothing, sometimes it’s even given away for free (but be careful with those).

1 Like

The error likely indicates the system can’t properly initialize or read the connected drives before testing begins. This can happen if the drives aren’t fully seated, the controller/RAID mode doesn’t match the previous configuration, or one drive is causing the startup check to fail. Try powering down, reseating all cables, and testing drives one at a time to isolate the faulty unit. Also confirm BIOS/storage settings and whether FARM requires a specific array state before running.

No it doesn’t. It indicates that the version of smartmontools in TrueNAS does not support querying FARM data. As has already been stated in this thread.

3 Likes

Nah, it was because smartmontools was outdated and newer version of smartmontools support FRAM check.