Re: Identifying physical disks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



> -----Original Message-----
> From: centos-bounces@xxxxxxxxxx On Behalf Of Jussi Hirvi
> Sent: 30/04/2011 10:31
> To: CentOS mailing list
> Subject:  Identifying physical disks
> 
> I am sure this is really simple.
> 
> I have a setup of 2 disks (sda, sdb) which are outwardly 
> identical, and 
> are mirrors of each other. Together they form 3 raid1 devices. Both 
> disks can boot.
> 
> Now sda has bad sectors, and I should replace it. But which 
> one of the 
> physical disks is sda??
> 
> The machine boots fine from either one of the disks, (and the booting 
> disk of course is always called sda).
> 
> In the messages log I see entries like this:
> 
> Apr 29 02:21:07 a134-224 kernel: ata2: SATA link up 3.0 Gbps (SStatus 
> 123 SControl 300)
> 
> By noticing which SATA link (ata1, ata2) is up and which is 
> down, I can 
> find out which physical disk is connected to ata1 and which to ata2.
> 
> If both disks are connected, will the hd in ata1 become sda, 
> and the hd 
> in ata2 become sdb??
> 
> - Jussi

How about:

ls -l /dev/disk/by-id

which on my system gives me:

lrwxrwxrwx 1 root root  9 Mar  6 14:34 scsi-SATA_SAMSUNG_HD154UIS1XWJ1BZ900317 -> ../../sdc
lrwxrwxrwx 1 root root  9 Mar  6 14:34 scsi-SATA_SAMSUNG_HD154UIS1XWJ1BZ900318 -> ../../sdb
lrwxrwxrwx 1 root root  9 Mar  6 14:34 scsi-SATA_SAMSUNG_HD154UIS1XWJ9CZA00454 -> ../../sdd

which are my three identical Samsung HD154UI disks.  Their serial numbers are the S1XWJ... bits at the end.

hth  Andy









_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux