Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Determine bus device is on?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
David  
View profile  
 More options Oct 29, 5:04 pm
Newsgroups: comp.os.linux.development.system
From: "David" <t...@is.invalid>
Date: Wed, 28 Oct 2009 23:04:23 -0700
Local: Thurs, Oct 29 2009 5:04 pm
Subject: Determine bus device is on?
Hello,

So say I have /dev/sdf and I want to know if it's on iScsi, PATA, SATA, USB,
etc ... how does one go about doing that in Linux.

TIA!!


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Josef Moellers  
View profile  
 More options Oct 29, 7:00 pm
Newsgroups: comp.os.linux.development.system
From: Josef Moellers <josef.moell...@ts.fujitsu.com>
Date: Thu, 29 Oct 2009 09:00:36 +0100
Local: Thurs, Oct 29 2009 7:00 pm
Subject: Re: Determine bus device is on?

David wrote:
> Hello,

> So say I have /dev/sdf and I want to know if it's on iScsi, PATA, SATA,
> USB, etc ... how does one go about doing that in Linux.

BTDT

Check /sys/block/sdX/device. It is a symbolic link which points to an
entry <relativepath>/<bus>:<channel>:<id>:<lun>

HTH,

Josef
--
These are my personal views and not those of Fujitsu Technology Solutions!
Josef Möllers (Pinguinpfleger bei FTS)
        If failure had no penalty success would not be a prize (T.  Pratchett)
Company Details: http://de.ts.fujitsu.com/imprint.html


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Josef Moellers  
View profile  
 More options Oct 29, 7:02 pm
Newsgroups: comp.os.linux.development.system
From: Josef Moellers <josef.moell...@ts.fujitsu.com>
Date: Thu, 29 Oct 2009 09:02:23 +0100
Local: Thurs, Oct 29 2009 7:02 pm
Subject: Re: Determine bus device is on?

David wrote:
> Hello,

> So say I have /dev/sdf and I want to know if it's on iScsi, PATA, SATA,
> USB, etc ... how does one go about doing that in Linux.

For a start: Check /sys/block/sdX/device. It is a symbolic link which
points to an entry <relativepath>/<bus>:<channel>:<id>:<lun>

HTH,

Josef
--
These are my personal views and not those of Fujitsu Technology Solutions!
Josef Möllers (Pinguinpfleger bei FTS)
        If failure had no penalty success would not be a prize (T.  Pratchett)
Company Details: http://de.ts.fujitsu.com/imprint.html


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
David  
View profile  
 More options Oct 30, 2:29 am
Newsgroups: comp.os.linux.development.system
From: "David" <t...@is.invalid>
Date: Thu, 29 Oct 2009 08:29:20 -0700
Local: Fri, Oct 30 2009 2:29 am
Subject: Re: Determine bus device is on?
"Josef Moellers" <josef.moell...@ts.fujitsu.com> wrote in message

news:hcbi6f$27g$3@nntp.fujitsu-siemens.com...

> David wrote:
>> Hello,

>> So say I have /dev/sdf and I want to know if it's on iScsi, PATA, SATA,
>> USB, etc ... how does one go about doing that in Linux.

> For a start: Check /sys/block/sdX/device. It is a symbolic link which
> points to an entry <relativepath>/<bus>:<channel>:<id>:<lun>

> HTH,

Thanks, I see the symbolic link now and that helps.  However it's a little
hard to get the actual information and have confidence of good results.  For
example on this system there is /dev/sda (HD on SLI RAID controller in JBOD
mode), /dev/hda (standard PATA), /dev/sdf (usb drive).   The results are:

../devices/pci0000:00/0000:00:08.0/0000:01:0a.0/host1/target1:0:0/1:0:0:0/b lock/sda
../devices/pci0000:00/0000:00:09.0/ide0/0.0/block/hda
../devices/pci0000:00/0000:00:02.2/usb1/1-2/1-2:1.0/host6/target6:0:0/6:0:0 :0/block/sdf

So first .. is it safe to assume linux will aways have the sym link with the
same number of components (slashes to bus)?  ../x/x/x/BUS  ?
Next, that RAID controller just has some weird number, how would one convert
that to know it's on a RAID bus (really PATA in RAID mode)?
Is there a list of bus names ... is it "ide", "usb", "scsi", "iscsi",
"fibre", "sata", "1394"?

or is there a much better way to do it like some file "bus" in
/sys/block/sda/bus that would have "RAID" in it ?  Well wishful thinking
anyway?


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google