<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=us-ascii" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Alan Cox wrote:
<blockquote cite="mid20080523200048.GC13150@devserv.devel.redhat.com"
 type="cite">
  <pre wrap="">On Fri, May 23, 2008 at 01:41:32PM -0400, Gerry Reno wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">So I need to find out if there is some best practice guide for how to 
rewrite our tools so that they can support SATA.  We use LVM over RAID 
on all our drives and all our RAID and LVM tools appear to still work.  
It is only when dealing with the low-level disk devices themselves that 
we have problems.  Can someone give me some suggestions as to how to 
manage things when using SATA?
    </pre>
  </blockquote>
  <pre wrap=""><!---->
You want to look at the volume itself. SATA is hotplug so talking about
devices by their bus location is a bit meaningless.

You've got two useful identifiers

1.      The serial number of the drive available directly either by using
SG_IO to issue an IDENTIFY or the boot one (which is fine) via ioctls too.
Or you can script parsing hdparm of course.

2.      Labels on the file systems which is what RAID/LVM/etc all use.

For low level work where you want to know "this physical disk is the one
I saw last week" the disk vendor|model|serial combination should be unique
for any modern real world drive.

  </pre>
</blockquote>
The serial number might be ok until you replace the disk.  Just have to
remember to rerun the tools for the replacement and to note the
replacement lineage.  In scripts I think I could parse smartctl output
for serial numbers or is there something better under /proc I can parse?<br>
<br>
<br>
</body>
</html>