Sponsored Content
Special Forums Hardware Filesystems, Disks and Memory Smartmontools and fixing Unreadable Disk Sectors Post 302341392 by justinian on Wednesday 5th of August 2009 08:57:27 PM
Old 08-05-2009
Smartmontools and fixing Unreadable Disk Sectors

I found a document: Bad block HOWTO for smartmontools

My hard drive is Maxtor:

root]# fdisk -lu /dev/hda

Disk /dev/hda: 81.9 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders, total 160086528 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x3f4e3f4d

Device Boot Start End Blocks Id System
/dev/hda1 * 63 16370234 8185086 83 Linux
/dev/hda2 16370235 160071659 71850712+ 5 Extended
/dev/hda5 16370298 24547319 4088511 82 Linux swap / Solaris
/dev/hda6 24547383 160071659 67762138+ 83 Linux


root]# -H /dev/hda
smartctl version 5.38 [i586-mandriva-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is smartmontools Home Page (last updated $Date: 2009-07-30 19:33:22 +0200 (Thu, 30 Jul 2009) $)

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED


root]# smartctl -l selftest /dev/hda
smartctl version 5.38 [i586-mandriva-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is smartmontools Home Page (last updated $Date: 2009-07-30 19:33:22 +0200 (Thu, 30 Jul 2009) $)

=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed: read failure 60% 19646 6402153
# 2 Short offline Completed: read failure 60% 19645 6402153
# 3 Short offline Completed: read failure 60% 19630 6402153
# 4 Short offline Completed: read failure 60% 19622 6402153
# 5 Extended offline Completed: read failure 40% 19618 6402153
# 6 Short offline Completed: read failure 60% 19617 6402153

Logical Block Address LBA = 6402153 and i don't known which File System Block contains this LBA ?
 

9 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

issue with smartmontools

Hi, I need help!! I am trying to monitoring the temperature and error rate for diffrent storage systems - hard disk, SCSI, RAIDs. For, Hard disk, smartctl works perfectly, but in case of SCSI and RAIDs, it fails. smartctl notify only about the storage systems, health (i.e., OK,etc) but not... (0 Replies)
Discussion started by: reply2priyanka
0 Replies

2. Filesystems, Disks and Memory

SCSI disk spare sectors

Is there a way to determine the number of available spare sectors on a disk ? as it may be useful for notifying a user to take a backup of the disk before it runs into a medium error. (6 Replies)
Discussion started by: rednex
6 Replies

3. Linux

C++ Code to Access Linux Hard Disk Sectors (with a LoopBack Virtual Hard Disk)

Hi all, I'm kind of new to programming in Linux & c/c++. I'm currently writing a FileManager using Ubuntu Linux(10.10) for Learning Purposes. I've got started on this project by creating a loopback device to be used as my virtual hard disk. After creating the loop back hard disk and mounting it... (23 Replies)
Discussion started by: shen747
23 Replies

4. Boot Loaders

read sectors from disk failed with timeout

i'm writing some code to simulate the boot progress after power on but when i try to read the 2nd sector from a floppy disk, this operation always fail with ah=0x80h which means timeout, how can i get over this problem? my code would be like this: $ cat boot.S .code16 #define SETUPLEN 4... (0 Replies)
Discussion started by: wljackhero
0 Replies

5. Linux

read sectors from disk failed with timeout

i'm writing some code to simulate the boot progress after power on but when i try to read the 2nd sector from a floppy disk, this operation always fail with ah=0x80h which means timeout, how can i get over this problem? my code would be like this: $ cat boot.S .code16 #define SETUPLEN 4... (0 Replies)
Discussion started by: wljackhero
0 Replies

6. UNIX for Advanced & Expert Users

read sectors from disk failed with timeout

i'm writing some code to simulate the boot progress after power on but when i try to read the 2nd sector from a floppy disk, this operation always fail with ah=0x80h which means timeout, how can i get over this problem? my code would be like this: $ cat boot.S .code16 #define SETUPLEN 4... (0 Replies)
Discussion started by: wljackhero
0 Replies

7. Solaris

smartmontools ?

Has anyone managed installing smartmontools on (Sparc) Solaris 10? how to do it? thanks. (1 Reply)
Discussion started by: orange47
1 Replies

8. Shell Programming and Scripting

Use of prtdiag to give information of sectors,cylinders,track of each disk

Hi All, i am trying to get sectors,cylinders,track..etc information of all present disks out of solaris machine using prtvtoc command . Output of ptrvtoc command is as below : bash-3.2# prtvtoc /dev/dsk/c1t0d0s0 * /dev/dsk/c1t0d0s0 partition map * * Dimensions: * 512 bytes/sector... (2 Replies)
Discussion started by: omkar.jadhav
2 Replies

9. Solaris

EFI disk labeling / understand the parition table / sectors not continue

Hi all, I have a EFI disk and it is use in zfs pool. partition> p Volume: rpool Current partition table (original): Total disk sectors available: 1172107117 + 16384 (reserved sectors) Part Tag Flag First Sector Size Last Sector 0 usr wm ... (8 Replies)
Discussion started by: javanoob
8 Replies
SD(4)							     Linux Programmer's Manual							     SD(4)

NAME
sd - Driver for SCSI Disk Drives SYNOPSIS
#include <linux/hdreg.h> /* for HDIO_GETGEO */ #include <linux/fs.h> /* for BLKGETSIZE and BLKRRPART */ CONFIGURATION
The block device name has the following form: sdlp, where l is a letter denoting the physical drive, and p is a number denoting the parti- tion on that physical drive. Often, the partition number, p, will be left off when the device corresponds to the whole drive. SCSI disks have a major device number of 8, and a minor device number of the form (16 * drive_number) + partition_number, where drive_num- ber is the number of the physical drive in order of detection, and partition_number is as follows: partition 0 is the whole drive partitions 1-4 are the DOS "primary" partitions partitions 5-8 are the DOS "extended" (or "logical") partitions For example, /dev/sda will have major 8, minor 0, and will refer to all of the first SCSI drive in the system; and /dev/sdb3 will have major 8, minor 19, and will refer to the third DOS "primary" partition on the second SCSI drive in the system. At this time, only block devices are provided. Raw devices have not yet been implemented. DESCRIPTION
The following ioctls are provided: HDIO_GETGEO Returns the BIOS disk parameters in the following structure: struct hd_geometry { unsigned char heads; unsigned char sectors; unsigned short cylinders; unsigned long start; }; A pointer to this structure is passed as the ioctl(2) parameter. The information returned in the parameter is the disk geometry of the drive as understood by DOS! This geometry is not the physical geometry of the drive. It is used when constructing the drive's partition table, however, and is needed for convenient operation of fdisk(1), efdisk(1), and lilo(1). If the geometry information is not available, zero will be returned for all of the parameters. BLKGETSIZE Returns the device size in sectors. The ioctl(2) parameter should be a pointer to a long. BLKRRPART Forces a reread of the SCSI disk partition tables. No parameter is needed. The scsi(4) ioctl(2) operations are also supported. If the ioctl(2) parameter is required, and it is NULL, then ioctl(2) will fail with the error EINVAL. FILES
/dev/sd[a-h]: the whole device /dev/sd[a-h][0-8]: individual block partitions COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 1992-12-17 SD(4)
All times are GMT -4. The time now is 03:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy