How to run bad block scan on External USB drive

Questions about SNMP, Power, System, Logs, disk, & RAID.
datorexpert
Been there, done that
Posts: 778
Joined: Mon Nov 16, 2009 4:14 pm
Contact:

Re: How to run bad block scan on External USB drive

Post by datorexpert »

Is no one able to tell the right command with parameters how to run a badblock scan on an external USB-disk connected to a QNAP NAS?
QTS 4.1.n/4.2.n/4.3.n/4.4.n MANUAL
Submit QNAP Support Ticket - QNAP Tutorials, Wiki - Product Support Status - Moogle's QNAP FAQ help V2 - QNAP Security Advisory
When you ask a question, please include the following:
Data md_checker nasreport (release 20180525)
=
Model: TVS-873e -- RAM: 20G -- FW: QTS 5.1.1.2491 build 20230815 (used as main storage + applications)
WD60EFRX-68L0BN1(x6) / WD80EFAX-68LHPN0(x1) Red HDDs -- RAID5: 8x6TB -- Cold spare: None
=
Model: TS-453B -- RAM: 8G -- FW: QTS 4.4.1.0978 build 20190626 -- BROKEN
=
Model: SS-839 -- SOLD after 12 years use! Never lost ANY data!
=
13 years of QNAP experience + Asustor and WD!
User avatar
MrVideo
Experience counts
Posts: 4742
Joined: Fri May 03, 2013 2:26 pm

Re: How to run bad block scan on External USB drive

Post by MrVideo »

Install entware-ng (http://forum.qnap.com/viewtopic.php?f=351&t=116737) then install: smartmontools

The list of supported devices is here: https://www.smartmontools.org/wiki/Supp ... SB-Devices

Then run:

Code: Select all

smartctl -h
for the list of commandline options. Hopefully what you want to do, you can do.
QTS MANUALS
Submit QNAP Support Ticket - QNAP Tutorials, FAQs, Downloads, Wiki - Product Support Status - Moogle's QNAP FAQ help V2
Asking a question, include the following
(Thanks to Toxic17)
QNAP md_checker nasreport (release 20210309)
===============================
Model: TS-869L -- RAM: 3G -- FW: QTS 4.1.4 Build 20150522 (used for data storage)
WD60EFRX-68L0BN1(x1)/68MYMN1(x7) Red HDDs -- RAID6: 8x6TB -- Cold spare: 1x6TB
Entware
===============================
Model: TS-451A -- RAM: 2G -- FW: QTS 4.5.2 Build 20210202 (used as a video server)
WL3000GSA6472(x3) White label NAS HDDs -- RAID5: 3x3TB
Entware -- MyKodi 17.3 (default is Kodi 16)
===============================
My 2017 Total Solar Eclipse Photos | My 2019 N. Ireland Game of Thrones tour
murrayvr
Starting out
Posts: 13
Joined: Sun Aug 28, 2011 4:29 pm

Re: How to run bad block scan on External USB drive

Post by murrayvr »

I also found it frustrating that you couldn't run the bad block scan of USB drives from within the qnap toolset provided. I found this site which has software that runs a bunch of tests:
http://hddscan.com/

Portable windows app so no need to install.
Hope it helps.
User avatar
OneCD
Guru
Posts: 12159
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: How to run bad block scan on External USB drive

Post by OneCD »

murrayvr wrote:I also found it frustrating that you couldn't run the bad block scan of USB drives from within the qnap toolset provided.
;)

Code: Select all

[/share] # df | grep external
/dev/sdg1               959.0M      5.3M    953.7M   1% /share/external/DEV3401_1
[/share] # badblocks -v /dev/sdg1
Checking blocks 0 to 982015
Checking for bad blocks (read-only test): done                                
Pass completed, 0 bad blocks found.

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
MCCDOM
New here
Posts: 5
Joined: Wed Dec 14, 2016 7:46 pm

Re: How to run bad block scan on External USB drive

Post by MCCDOM »

QNAP technical support say "In the current design, QNAP NAS does not support running the bad block scan on an external drive. We would recommend to check the external drive with the manufacturer's tools.".
This is annoying but clears up the question. I personally use HD Tune on a PC to check for bad sectors. Tip I found when using HD Tune is to not run the quick scan as that can miss some errors.
shooms99
Starting out
Posts: 23
Joined: Thu Aug 11, 2016 12:44 pm

Re: How to run bad block scan on External USB drive

Post by shooms99 »

I also found it frustrating that you couldn't run the bad block scan of USB drives from within the qnap toolset provided.
Please vote to add this feature so that QNAP knows how vital this is for those of us who use External USB Drives. It will take all of 15 seconds since you don't need to log in. Just provide your email address and select 1, 2, or 3 votes.

https://qnap.uservoice.com/forums/21337 ... isk-health
Dipster
New here
Posts: 2
Joined: Wed May 04, 2016 2:52 am

Re: How to run bad block scan on External USB drive

Post by Dipster »

The badblock program only supports 32 bit range. :-/

The error I get running it on 4.3.3 and a 5TB drive...

badblocks: Value too large for defined data type invalid end block (4883638272): must be 32-bit value
shooms99
Starting out
Posts: 23
Joined: Thu Aug 11, 2016 12:44 pm

Re: How to run bad block scan on External USB drive

Post by shooms99 »

Dipster wrote:The badblock program only supports 32 bit range. :-/

The error I get running it on 4.3.3 and a 5TB drive...

badblocks: Value too large for defined data type invalid end block (4883638272): must be 32-bit value
For any interested parties: I scoured the internet, and I *think* I managed to get badblocks to work on larger drives:

Code: Select all

badblocks -b 16384 -sv /dev/sdc
Please keep in mind that badblocks is considered deprecated. Coming from a linux newbie (me) ... Standard Disclaimer: USE AT YOUR OWN RISK!
Also, the "/dev/sdc" is the drive you are trying to scan. It could be sdb or sdd, etc.

PS. Dipster, thanks for adding your votes to the Uservoice.com tally
steven424
New here
Posts: 6
Joined: Sun Nov 08, 2009 1:24 pm

Re: How to run bad block scan on External USB drive

Post by steven424 »

The command to check for bad blocks is

Code: Select all

e2fsck -c /dev/sdXX
The disk needs to be unmounted to prevent conflicts

To get "/dev/sdXX", use the df command and look for a line like this

Code: Select all

/dev/sde1                 3.6T     88.2M      3.6T   0% /share/external/DEV3301_1
You can also use the command "e2fsck -?" to get a list of all the commandline parameters and arguments

As far as I can tell, e2fsck can only be run from the commandline. THere is no way to run it on an external device from the QTS UI

I agree that the attitude of the original responder was atrocious and completely uncalled for. Karma can be a **, though... :wink:
kacharava
First post
Posts: 1
Joined: Tue Feb 22, 2011 10:59 pm

Re: How to run bad block scan on External USB drive

Post by kacharava »

Exactly my situation ;)

With the only difference I was cleaning HDDs from my external eSATA RAID enclosure that I use for backing up my QNAP TS-659 with DBaN and it discovered that one HDD has bad blocks. I've replaced that disk, created new RAID volume and decided to check the volume first before using it. And after not seeing the command for checking external volume for errors in TS-659's web admin interface I've found this beautiful tread :)
googlebroughtmehere wrote:QNap says there`s bad block and to run a scan. There is no indication whatsoever on how to do this, so you google it, find this thread and go "wow, these guys are massive jerks".
User avatar
polo
Starting out
Posts: 17
Joined: Sat Oct 13, 2007 10:12 am
Location: Hong Kong
Contact:

Re: How to run bad block scan on External USB drive

Post by polo »

steven424 wrote:The command to check for bad blocks is

Code: Select all

e2fsck -c /dev/sdXX
The disk needs to be unmounted to prevent conflicts

To get "/dev/sdXX", use the df command and look for a line like this

Code: Select all

/dev/sde1                 3.6T     88.2M      3.6T   0% /share/external/DEV3301_1
You can also use the command "e2fsck -?" to get a list of all the commandline parameters and arguments

As far as I can tell, e2fsck can only be run from the commandline. THere is no way to run it on an external device from the QTS UI

I agree that the attitude of the original responder was atrocious and completely uncalled for. Karma can be a **, though... :wink:
Thanks for your info which i am able to scan my external disk now :)
Model name - TS-253D :lol:
Model name - TS-269H :D
Model name - TS-209 Pro :mrgreen:
Post Reply

Return to “System & Disk Volume Management”