Question HDD and badblock

Status
Not open for further replies.

nsaspook

Joined Aug 27, 2009
16,325
this function is same ECC of harddisks or different?
ECC is one part of the error detection and correction function from physical disk block to logical disk sector. That's the usual method of verifying block/sector data and possibility correcting (rewrite a block) soft block errors that happen fairly often due to random causes at the raw data read level. Continuous non-random but correctable ECC errors on one or more blocks might be one reason to mark a block(s) bad before data loss and possible Uncorrectable ECC errors on the block.

https://www.computerworld.com/artic...that-actually-predict-hard-drive-failure.html
 

Papabravo

Joined Feb 24, 2006
22,082
ECC is just part of the 'Error detection and correction'? what other part that complements this automatic function of the HDD firmware?
Other elements of error detection and correction
  1. The sector data can have a preamble and a postamble
  2. There can be fields containing fixed format metadata
  3. The data in the sector my use an encoded format like RLL(run Length Limited), Reed-Solomon, or BCH (Bose–Chaudhuri–Hocquenghem) codes
  4. Check bits can be inserted and removed from the sector data
You might find the following article interesting

https://en.wikipedia.org/wiki/Error_correction_code#List_of_error-correcting_codes
 

eetech00

Joined Jun 8, 2013
4,705
That DOS program is an anachronistic holdover from the days before bad sector management was part of the HDD firmware. I'm pretty sure it's use is deprecated.
No it is not depreciated!

CHKDSK is alive and well and continues to be updated and used in windows OS.

I just ran it on Windows 10 Pro.
 

nsaspook

Joined Aug 27, 2009
16,325
In the bad old days there were MFM and RLL controllers for drive interfaces like SMD, ST-506, ST412, ST412RLL. The HDD in those days didn't have the 'smarts', the controller in a CPU slot did and that controller need drivers loaded at boot-time (tape, floppy, bios, on the drive, etc ...). Programs like CHKDSK in those days did actually the dirty work of bad sector detection and marking while other DISK initialization programs did the low-level formats for MFM and RLL that set CRC, platter encoding, etc...

On windows 10 the CHKDISK command line program is a Potemkin village that pretends (for compatibility) to have the functionality of old because most, if not all, of the actual formatting, configuration, low-level detection and correction functionality is actually in the HDD on-board controller firmware now.
 
Last edited:

Papabravo

Joined Feb 24, 2006
22,082
No it is not depreciated!

CHKDSK is alive and well and continues to be updated and used in windows OS.

I just ran it on Windows 10 Pro.
Just because a program runs does not mean it is actually doing anything useful.
And wonder of wonders Windows10+ is going to be a GUI running on Linux
 

eetech00

Joined Jun 8, 2013
4,705
Just because a program runs does not mean it is actually doing anything useful.
And wonder of wonders Windows10+ is going to be a GUI running on Linux
It actually does repair what it can...
Anyway, the question regards CHKDSK...not windows GUI.

And I'm aware of the future of Windows server 2016.

In addition, Almost all windows versions already run on linux......excepted the platform is called VMWare..
 

Papabravo

Joined Feb 24, 2006
22,082
It actually does repair what it can...
Anyway, the question regards CHKDSK...not windows GUI.

And I'm aware of the future of Windows server 2016.

In addition, Almost all windows versions already run on linux......excepted the platform is called VMWare..
The connection is that many Windows functions will become wrappers for Linux calls and the original Windows code will be ash caned.
 

eetech00

Joined Jun 8, 2013
4,705
In the bad old days there were MFM and RLL controllers for drive interfaces like SMD, ST-506, ST412, ST412RLL. The HDD in those days didn't have the 'smarts', the controller in a CPU slot did and that controller need drivers loaded at boot-time (tape, floppy, bios, on the drive, etc ...). Programs like CHKDSK in those days did actually the dirty work of bad sector detection and marking while other DISK initialization programs did the low-level formats for MFM and RLL that set CRC, platter encoding, etc...

On windows 10 the CHKDISK command line program is a Potemkin village that pretends (for compatibility) to have the functionality of old because most, if not all, of the actual formatting, configuration, low-level detection and correction functionality is actually in the HDD on-board controller firmware now.
I don't think so...CHKDSK repairs what is can.
Its always worth running it on a suspected bad disk before going further. Most people won't bother with bad disk hardware.

I agree partially with the disk controller statement...but they ALL don't to that. Especially on HP DL380's. They want the additional money for the good add-on controller. :)
 

nsaspook

Joined Aug 27, 2009
16,325
I don't think so...CHKDSK repairs what is can.
Its always worth running it on a suspected bad disk before going further. Most people won't bother with bad disk hardware.

I agree partially with the disk controller statement...but they ALL don't to that. Especially on HP DL380's. They want the additional money for the good add-on controller. :)
CHKDSK repairs the logical sectors/blocks and file system while the actual low-level grunt work of actual physical bad-blocks detection and correction happens on the drive firmware. I've got several HP DL server grade machines at home.
https://forum.allaboutcircuits.com/threads/hp-dl380-linux-desktop.142085/post-1199783

The RAID controller presents a logical drive to CHKDSK or the normal Linux disk sub-system using several drives. The low-level details for bad-blocks detection/correction is still on the HDD and is reported to the RAID controller that decides if that physical drive is good/bad/impaired in the RAID, this information is reported to the OS. Typically there is a RAID utility to check/recover raid drives not CHKDSK because dumb CHKDSK can nuke a impending failure on a degraded raid to full unrecoverable failure.
 
Last edited:

eetech00

Joined Jun 8, 2013
4,705
CHKDSK repairs the logical sectors/blocks and file system while the actual low-level grunt work of actual physical bad-blocks detection and correction happens on the drive firmware. I've got several HP DL server grade machines at home.
https://forum.allaboutcircuits.com/threads/hp-dl380-linux-desktop.142085/post-1199783

The RAID controller presents a logical drive to CHKDSK or the normal Linux disk sub-system using several drives. The low-level details for bad-blocks detection/correction is still on the HDD and is reported to the RAID controller that decides if that physical drive is good/bad/impaired in the RAID, this information is reported to the OS. Typically there is a RAID utility to check/recover raid drives not CHKDSK because dumb CHKDSK can nuke a impending failure on a degraded raid to full unrecoverable failure.
Yes...if you are using a raid controller.
And yes....CHKDSK not perfect. It's not meant to repair physical hard disk errors...only file system errors.
I used to administer HP DL series servers. I've used the RAID utility....there is actually two different ones. Their controllers don't all have the same capabilities. The imbedded controllers seem to have less features than the add-on controllers. Some controllers warn of an impending failure and will allow you to correct offline, others will not. Anyway...I guess this is off topic.
 

nsaspook

Joined Aug 27, 2009
16,325
Yes...if you are using a raid controller.
And yes....CHKDSK not perfect. It's not meant to repair physical hard disk errors...only file system errors.
I used to administer HP DL series servers. I've used the RAID utility....there is actually two different ones. Their controllers don't all have the same capabilities. The imbedded controllers seem to have less features than the add-on controllers. Some controllers warn of an impending failure and will allow you to correct offline, others will not. Anyway...I guess this is off topic.
I spent far too much time in my youth looking into the minute details of OS level code while writing low-level disk utilities for odd-ball controllers like the ACB-5580 SCSI to SMD adapter:
http://bitsavers.trailing-edge.com/pdf/adaptec/500519-00_ACB-5580_SCSI_SMD_Ctlr_Oct85.pdf

I made a set of disk utilities that would allow 80MB Fujitsu M2312K and other compatible SMD drives to be usable using the SCSI controller on the Atari-ST. First you needed to program the adapter to format the drive in a sector format compatible with DOS by writing a special sector on the drive. Without a proper driver for the adapter that's a chicken and egg problem but it wasn't too hard to program the correct command sequences to make it work transparently as a normal SCSI drive on the computer.

1980's era SMD drive pack.
 

DickCappels

Joined Aug 21, 2008
10,661
You should have been paying more attention to the answers you were getting.

This has already been andwered. In modern drives this function is automatically done in drive firmware. In systems with older hardware a scan by software external to the drive either manually, ss a function of some other program or a scheduled task.
 

MrSoftware

Joined Oct 29, 2013
2,273
Just because a program runs does not mean it is actually doing anything useful.
And wonder of wonders Windows10+ is going to be a GUI running on Linux
I've used chkdsk to recover files from a scrambled SD card (FAT32 formatted). It had a couple thousand .jpg images, chkdsk stuck them into folders with 1000 files each named somethin like FOUND000, FOUND001, etc.. in my case I knew they were jpg so just ran a loop on the command line to rename them, but for a different case you could look at the file header (if there was one) to try to figure out what types of files they are. Anyway, chkdsk is limited in functionality, but it still has its uses.
 
Status
Not open for further replies.
Top