======Fix pending sectors FreeNAS====== =====Cause===== Device: /dev/da7, 2 Currently unreadable (pending) sectors =====Smartctl===== smartctl -t short /dev/daX After the test has finished (It might take a few hours) view the results. smartctl -a /dev/daX From the results remember the sector size and the location of the faulty sector (LBA_of_first_error). In my case my sector size was 512 and LBA_of_first_error was 2540039416. =====Mark bad sector with dd===== To correct the SMART error we will zero out the bad sector(s) on the drive, but first we need to permit access to drive. sysctl kern.geom.debugflags=16 Now zero the sector stated in self-test results out. Replace of=/dev/adaX, bs=512, seek=2540039416 with values relevant to your drive. dd if=/dev/zero of=/dev/daX bs=512 count=1 seek=2540039416 =====Check with smartctl===== Re-run the SMART report command to check if the ‘Current_Pending_Sector’ is now showing 0. smartctl -a /dev/da7 =====ZFS scrub===== To check the ZFS file system integrity run a scrub of the pool, replace poolX with the pool name the drive is under (list pools with ‘zpool list’). zpool scrub poolX Finally check the output of the scrub to ensure there are no known data errors. zpool status -v poolX {{tag>other}}