How can I tell wich HDD to swap, when the "cat /proc/mdstat" says one HDD of the RAID1 array has died? Does the HDD's has some serial numbers, that I can see in "reality", and I can get that number from e.g.: a commands output? How could I know wich HDD to swap in e.g.: a RAID1 array? thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20091102/6a0b78ec/attachment-0004.html>
Eugeneapolinary Ju wrote:> Does the HDD's has some serial numbers, that I can see in "reality", and I > can get that number from e.g.: a commands output?You may be able to get serial#s from hdparm or something..> How could I know wich HDD to swap in e.g.: a RAID1 array?When you set the array up, yank a drive and note which drive goes offline in the array then label them so you know. If your building many systems of the same type as long as your cabling is the same you should only need to do it once for all systems. nate
Eugeneapolinary Ju wrote:> How can I tell wich HDD to swap, when the "cat /proc/mdstat" says one > HDD of the RAID1 array has died? > > Does the HDD's has some serial numbers, that I can see in "reality", > and I can get that number from e.g.: a commands output? > > How could I know wich HDD to swap in e.g.: a RAID1 array? >for devices that show up as /dev/hdX, try # hdparm -i /dev/hda for devices that show up as /dev/sdX, # cat /proc/scsi/scsi this last won't show serial numbers, however it will list drive models and SCSI channel/id/lun, which should narrow it down. the first SCSI device listed thats 'Direct-Access' (as opposed to Processor, or something else) is /dev/sda, the 2nd is /dev/sdb
Eugeneapolinary Ju wrote:> How can I tell wich HDD to swap, when the "cat /proc/mdstat" says one > HDD of the RAID1 array has died? > > Does the HDD's has some serial numbers, that I can see in "reality", > and I can get that number from e.g.: a commands output? > > How could I know wich HDD to swap in e.g.: a RAID1 array? > > thank you > ># smartctl -a /dev/sda and so on This will give you the serial # of the working drives. You'll then have to power down and search for the one not in your serial# list. Make sure to have a good backup first.
Eugeneapolinary Ju wrote:> How can I tell wich HDD to swap, when the "cat /proc/mdstat" says one > HDD of the RAID1 array has died? > > Does the HDD's has some serial numbers, that I can see in "reality", and > I can get that number from e.g.: a commands output? > > How could I know wich HDD to swap in e.g.: a RAID1 array? >If you can see activity lights, you can 'cat /dev/sd? >/dev/null' to make them busy, one at a time (where ? is a, b, c, etc). -- Les Mikesell lesmikesell at gmail.com
At Mon, 2 Nov 2009 14:47:23 -0800 (PST) CentOS mailing list <centos at centos.org> wrote:> > > > How can I tell wich HDD to swap, when the "cat /proc/mdstat" says one > HDD of the RAID1 array has died?Use '/sbin/mdadm --detail /dev/md<mumble>' and note the drive name (/dev/sd<mumble> for SCSI or SATA, and /dev/hd<mumble> for IDE). Then '/usr/sbin/smartctl -A <drive name from mdadm's listing>' /usr/sbin/smartctl will give you lots of information. Near the beginning is the serial number. You *should* be running smartd and you *should* be enabling all of your disks to be monitored with smartd.> > > > Does the HDD's has some serial numbers, that I can see in "reality", > and I can get that number from e.g.: a commands output?Yes. smartctl will list the disk's info, including serial number.> > > > How could I know wich HDD to swap in e.g.: a RAID1 array?Presumably, you know which disk is connected to which controller port. mdadm will give you the name assigned by the O/S. For IDE this would be /dev/hda -- primary master /dev/hdb -- primary slave /dev/hdc -- secondary master /dev/hdd -- secondary slave for SCSI, the disks get a letter a, b, c, d, etc. on a 'first come first served' basis: disks are scaned in controller order, in id order: controller 0, disk 0, disk 1, disk 2 ... controller 1, disk 0, disk 1 .. ahci SATA treats each SATA port as a separate 'controller', with only one device (0) and the ports are scanned in order. Some SATA controllers can be (are) set up to behave like IDE (PATA) disks, this maps a pair of SATA ports as a master and slave pair of 'IDE' (PATA) disks. This can make things 'interesting'. The Dell PowerEdge 840 is like that. With the SCSI-layer Linux drive, the mapping becomes (when all four are in use): Port 0: (primary master) /dev/sda Port 1: (secondary master) /dev/sdc Port 2: (primary slave) /dev/sdb Port 3: (secondary slave) /dev/sdd Letters are assigned in the order port 0, port 2, port 1, port 3, with unoccupied ports being skipped.> > > > thank you > > > > > > MIME-Version: 1.0 > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos > >-- Robert Heller -- 978-544-6933 Deepwoods Software -- Download the Model Railroad System http://www.deepsoft.com/ -- Binaries for Linux and MS-Windows heller at deepsoft.com -- http://www.deepsoft.com/ModelRailroadSystem/