LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 08-27-2011, 03:26 AM   #1
pbdiwpwm
LQ Newbie
 
Registered: Aug 2011
Posts: 6

Rep: Reputation: Disabled
How to find mapping between ATA and e.g. sg device?


How can I find the correct /dev file node for my ata3 hard drive (1 of four connected drives)?

I hav'nt found any tool or information how the mapping has to been produced. dmesg is not helping here, because the info/mapping messages are mixed.

Is there a tool to show the map?

Thanks for suggestions.
Pierre

PS: I found allready the drive with the corrupt cable because on initialisation the manufactuer/model is shown. And I have only one drive with this model so I have to look in my hw to found the problem.
 
Old 08-27-2011, 06:52 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,125

Rep: Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260
I use lsscsi and sg_inq. Neither is installed by default in most distros.

If you have several identical drives and want to identify one, do:

Code:
while true ; do 
  dd if=/dev/$1 of=/dev/null count=1000 2>&1 ;
  sleep 1 ;
done
to blink its drive select light
 
Old 08-28-2011, 04:54 PM   #3
pbdiwpwm
LQ Newbie
 
Registered: Aug 2011
Posts: 6

Original Poster
Rep: Reputation: Disabled
Hi,

and how can I check which ata# that is? If I have a message in dmesg that ata3 responds reset link messages some time than there is no identification which sd# it is.
So I need

ata3 -> /dev/sda for example

Cheers...
Pierre
 
Old 08-30-2011, 09:09 AM   #4
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,125

Rep: Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260Reputation: 1260
Quote:
Originally Posted by pbdiwpwm View Post
Hi,

and how can I check which ata# that is? If I have a message in dmesg that ata3 responds reset link messages some time than there is no identification which sd# it is.
So I need

ata3 -> /dev/sda for example

What's the output of lsscsi?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to find the /dev/Device mapping for NFS file system in RHEL srithi Linux - Newbie 2 06-20-2010 08:27 AM
device mapping switch james2b Linux - Newbie 4 06-17-2008 06:07 PM
mapping usb device to device file scerenon Linux - Hardware 12 07-20-2006 04:13 PM
Serial ATA device search on bootup taarnak Linux - General 0 11-25-2003 10:32 AM
physical scsi channel mapping to scsiX device node mapping, how to configure manually drthornt Linux - Hardware 3 02-09-2003 11:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 01:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration