testing SG-1100 MMC - badblocks?
-
TLDR question: Is there an easy way to install/run badblocks or a similar disk check software on the SG-1100?
Longer story:
One of my SG-1100's failed after a few years in the field. I was able to successfully reinstall the OS image (thanks Netgate support).
I'd like to thoroughly test the MMC before sending the machine back into the field where console debugging is impractical.
I'd normally use a badblocks read test for this, but the e2fsprogs pkg containing badblocks doesn't seem to be part of the pfsense repository. Is the path forward to manually download the armv7 pkg of e2fsprogs from https://pkg.freebsd.org/FreeBSD:12:armv7/latest/ and 'pkg add' it?
Other suggestions? -
@gzorn We're not going to suggest you side-load any software that isn't already part of the package tree for pfSense.
Did you reinstall the 1100 with ZFS?
Also are you running anything on it that would induce a short lifespan of the eMMC? If you want to protect against premature 'death' you can disable log writing but I would recommend having a SysLog server running to collect those logs.
-
@rcoleman-netgate
Re: ZFS - It was previously running UFS, but I've switched it to a ZFS install. The unit was about 3 years old, so hopefully the MMC has some life left in it.Re: packages - I had pfblocker installed, but set the updates to daily in an effort to reduce disk load. It also had openvpn running. Otherwise, the system was stock.
I'll think about a syslog server for the future.
Thanks! -
@gzorn check this doc out:
https://docs.netgate.com/pfsense/en/latest/troubleshooting/disk-lifetime.html#install-mmc-utilities
That will help you with determining what might be left on your eMMC.
-
@rcoleman-netgate
Thanks for this pointer.
This works nicely for one of my SG-1100's, purchased about a year ago. The older one, (closer to 3 years old) seems to have older MMC that doesn't expose the eMMC attributes, including lifetime.
Here's a snippet from the beginning of the 'mmc extcsd read' output of the older one.============================================= Extended CSD rev 1.6 (MMC 4.5) ============================================= Card Supported Command sets [S_CMD_SET: 0x01] HPI Features [HPI_FEATURE: 0x01]: implementation based on CMD13 Background operations support [BKOPS_SUPPORT: 0x01] Max Packet Read Cmd [MAX_PACKED_READS: 0x3f] Max Packet Write Cmd [MAX_PACKED_WRITES: 0x3f] Data TAG support [DATA_TAG_SUPPORT: 0x01] Data TAG Unit Size [TAG_UNIT_SIZE: 0x03] Tag Resources Size [TAG_RES_SIZE: 0x03] Context Management Capabilities [CONTEXT_CAPABILITIES: 0x05] Large Unit Size [LARGE_UNIT_SIZE_M1: 0x00] Extended partition attribute support [EXT_SUPPORT: 0x00] Generic CMD6 Timer [GENERIC_CMD6_TIME: 0x19] Power off notification [POWER_OFF_LONG_TIME: 0x64] Cache Size [CACHE_SIZE] is 0 KiB
The newer unit starts with:
============================================= Extended CSD rev 1.8 (MMC 5.1) =============================================
and has an additional section of:
eMMC Firmware Version: 73103517 eMMC Life Time Estimation A [EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_A]: 0x01 eMMC Life Time Estimation B [EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_B]: 0x04 eMMC Pre EOL information [EXT_CSD_PRE_EOL_INFO]: 0x01
among other differences. Is this a dead end? I may just test out the entire drive with dd to /dev/null.
-
The older eMMC type cannot bye read by the utility if that's what you're asking. There is no way to allow it.
Steve