Find Hard Disk Information
Hi,
Is there a command(other than "badblocks") to find the number of bad sectors in the hard disk in Unix?? I tried badblocks. But it is too time consuming. I need something which will tell me the already scanned result. Or Is there a file in which hard disk related information is stored which also includes the bad sector count?? Thanks in advance!! Regards, Jay |
The current list of badblocks could be extracted from a ext2/ext3 system by using the command "dumpe2fs -b /dev/yourblockdevicehere"
e2fsck [-l|-L] could be used to add/set news bad blocks on a partition. |
Regarding Hard Disk Information..
Hi,
Thanks for the reply. But, "#dumpe2fs -b /dev/hda" gives the following : dumpe2fs 1.28 (31-Aug-2002) dumpe2fs: Bad magic number in super-block while trying to open /dev/hda Couldn't find valid filesystem superblock. And..... "#dumpe2fs -b /dev/hda1" gave the following : dumpe2fs 1.28 (31-Aug-2002) Running "badblocks" command directly on /dev/hda1 reported two badblocks. In that case, why the same is not being reflected on dumpe2fs?? Also, do the number of "Bad blocks" map directly to the number of "Bad Sectors" in hard disk?? If "badblocks" command reports 2 bad blocks.. does that mean there are two bad sectors on my hard disk?? I am unable to make out.. Please help.. Thanks in Advance!! Regards, Jay |
As I noted, this works only for ext2/ext3 filesystems.
Are you sure /dev/hda1 is a ext2 or ext3 filesytem ? Type: # mount | grep /dev/hda1 see'ya, |
All times are GMT -5. The time now is 06:26 PM. |