identifying devices from device names (was: udev causing data loss?)



also sprach Douglas A. Tutty <dtutty@xxxxxxxxx> [2008.11.16.0054 +0100]:
Lets say you have an old server with 12 disks on two scsi busses an
you're using mdadm (rather than a hardware raid card). Lets say that
all 12 drives are in one array (just to make life interesting). One of
those disks dies.

mdadm would have assembed the array (before the failure) and you can get
a list of /dev/sd? devices that make up the array. When a drive fails,
you get a message, presumably telling you that e.g. /dev/sde has failed.
How do you know which drive has failed so that you can swap it?

Presumabily, /dev/sde is your fifth SCSI disk, probably the one with
ID 4 on the first controller. If that's not the case, you can always
find out more:

piper:~|master|% ls -lR /dev/disk | grep sdg$
lrwxrwxrwx 1 root root 9 2008-11-06 11:56 ata-Maxtor_7Y250M0_Y63XCJRE -> ../../sdg
lrwxrwxrwx 1 root root 9 2008-11-06 11:56 scsi-SATA_Maxtor_7Y250M0_Y63XCJRE -> ../../sdg
lrwxrwxrwx 1 root root 9 2008-11-06 11:56 pci-0000:00:0f.0-scsi-1:0:0:0 -> ../../sdg

piper:~|master|% lspci -s 00:0f.0
00:0f.0 RAID bus controller: VIA Technologies, Inc. VIA VT6420 SATA RAID Controller (rev 80)


So you know the controller and you should be able to identify the
disk by following cables. Once you find the disk, you can verify the
serial number.

... unless you have little stickers on your disks like I, which tell
you right away what they are.

On the other hand, I tend to use /dev/disk/by-id/* whenever I can,
as opposed to /dev/[sh]d*.

--
.''`. martin f. krafft <madduck@xxxxxxxxxx>
: :' : proud Debian developer, author, administrator, and user
`. `'` http://people.debian.org/~madduck - http://debiansystem.info
`- Debian - when you have better things to do than fixing systems

"everyone has a little secret he keeps,
i like the fires when the city sleeps."
-- mc 900 ft jesus

Attachment: digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/)



Relevant Pages

  • Re: [opensuse] 10.2 no RAID to 11.0 RAID 1
    ... 10.2 no RAID to 11.0 RAID 1 ... you can force rebuilds in mdadm in situations where no firmware raid will ever let you. ... Send me your problem disks that you think are impossible to assemble and I bet in a little while I can tell you how to assemble the array as long as there actually is enough there to use. ... One thing I've seen, which I don't think is your problem but shows the kind of thing that happens, a disk will drop out of the array and reappear instantly as a higher drive letter than the system really has. ...
    (SuSE)
  • SUMMARY: 6120 Disk Array-> Remove and Replace Disk, does not enable
    ... the not-latest) firmware for the array which resulted in failure to ... I was able to source a pair of sun-part drives (good used working ... arrays has a disk that went bad - not a problem since we're running ...
    (SunManagers)
  • Re: RAID 0
    ... The OP has four drives. ... Creating a RAID5 array out of 3 of them and using ... It sounds like you have a hardware RAID ... I have discovered in the Disk Management console I ...
    (microsoft.public.windows.server.sbs)
  • Re: Raid 1+0 Configuration (0+1?)
    ... logical drives aon a single drive array. ... files may be on different physical drives. ... > Keep in mind that if you have one large RAID array it will remain one ... Disk ...
    (microsoft.public.sqlserver.server)
  • Re: [opensuse] Re: [OT] vmware and fake scsi devs
    ... Single threaded access to a raid array may not be helped by adding ... effectively each disk can do N IOPS ... So if you have M drives, ... Read original sector, ...
    (SuSE)