SCSI disk spare sectors


 
Thread Tools Search this Thread
Special Forums Hardware Filesystems, Disks and Memory SCSI disk spare sectors
# 1  
Old 12-14-2007
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.
# 2  
Old 12-14-2007
try "df -k" and "du -sk"
# 3  
Old 12-15-2007
I don't think you can do this with du.

Du (Unix - Wikipedia, the free encyclopedia)

To look at the underlying sectors, you need a lower level utility such as fdisk

fdisk - Wikipedia, the free encyclopedia
# 4  
Old 12-15-2007
Quote:
Originally Posted by Neo
To look at the underlying sectors,...
I didn't take this literally, I inferred it meant useable disk space.
# 5  
Old 12-17-2007
I am sorry. I think I confused everyone. This is what I actually meant to say..

Usually a hard disk keeps spare sectors that are not visible to the user. Whenever the disk encounters a bad block the disk internally replaces these bad blocks from the spare sectors. This operation is completely translucent to the user. There seems to be a specific number of spare sectors on any hard disk that is used for recovering from bad blocks. But once the disk runs out of spare sectors in the process of replacing bad blocks, all future bad blocks will become medium errors (unrecoverable). If the number of available spare sectors can be found then the user can be informed much earlier that its time to backup this disk as it would soon become faulty.
# 6  
Old 12-17-2007
Quote:
Originally Posted by rednex
....the user can be informed much earlier that its time to backup this disk.
You should be backing up the disk anyway irrespective of this as this is only one of the many ways your data may become unrecoverable. Power spikes, bearing failures, buggy/malicious software, erroneous deletions etc can all trash your data.

What you are asking for is very low-level and device/manufacturer specific.
# 7  
Old 12-30-2007
Quote:
Originally Posted by rednex
Usually a hard disk keeps spare sectors that are not visible to the user. Whenever the disk encounters a bad block the disk internally replaces these bad blocks from the spare sectors. This operation is completely translucent to the user. There seems to be a specific number of spare sectors on any hard disk that is used for recovering from bad blocks. But once the disk runs out of spare sectors in the process of replacing bad blocks, all future bad blocks will become medium errors (unrecoverable). If the number of available spare sectors can be found then the user can be informed much earlier that its time to backup this disk as it would soon become faulty.
See the SourceForge project called SMART:

smartmontools Home Page (last updated $Date: 2007/10/26 21:49:03 $)

Quote:
The smartmontools package contains two utility programs (smartctl and smartd) to control and monitor storage systems using the Self-Monitoring, Analysis and Reporting Technology System (SMART) built into most modern ATA and SCSI hard disks. In many cases, these utilities will provide advanced warning of disk degradation and failure.

Smartmontools is originally derived from the Linux smartsuite package, and includes support for ATA/ATAPI-3 to -7 disks and SCSI disk and tape devices. It should run on any modern Darwin (Mac OSX), Linux, FreeBSD, NetBSD, OpenBSD, Solaris, OS/2, eComStation or Windows system. Alternatively, it can also be run from one of the bootable CDs or floppies containing smartmontools.
See also:

Monitoring Hard Disks with SMART
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. AIX

IBM SAN STORAGE HOT SPARE DISK

Hello, I have DS4000 IBM SAN Storage ( aka FastT Storage ) One of my disks has failed and I had a hot spare disk covering all the arrays. As the disk failed, immediately the hotspare disk took over the failed disk ( see the JPEG in the attachment ) My Question: How can I make the hotspare... (1 Reply)
Discussion started by: filosophizer
1 Replies

4. 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

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. 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

7. 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

8. UNIX for Dummies Questions & Answers

copy failing disk to Spare

Hi Guys, I have a failing 4gb (c0t5d0) drive that contains lvol4 -8 on hp-ux. It's not the boot disk but is part of VG00 volume group. Within that group, I have a disk (c0t4d0) of the same size that has 1 lvol on it for swap(4gb) I also have a seperate 1.5 gb swap volume on another physical disk... (1 Reply)
Discussion started by: rees_a
1 Replies

9. Filesystems, Disks and Memory

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 ... (0 Replies)
Discussion started by: justinian
0 Replies

10. UNIX for Dummies Questions & Answers

Vfstab on spare disk - HOW ? Mount ?

Hi, guys ! Could someone clarify one thing for me: I start machine from disk0, and want to check the /etc/vfstab on disk1. How do i do it ? Tried to write: cd / mount /dev/dsk/c0t1d0s0 /mnt But if I do cd /mnt, it is empty. I expected to see disk1 there ? Or am I wrong ? How do I... (3 Replies)
Discussion started by: DGoubine
3 Replies
Login or Register to Ask a Question