LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices



Reply
 
Search this Thread
Old 07-03-2008, 06:47 PM   #1
gettons1980
LQ Newbie
 
Registered: Jun 2008
Posts: 21

Rep: Reputation: 0
managing order and names for hd in a raid


Hi guys,

shortly, I have 2 sata disks attached to a motherboard and one on a promise pci sata controller.
Everything gone well, all disks recognized by red hat 5.2
I am going to create 3 raid 1 for swap /home and / and I would like to create such raids on two different controller of course :

1 disk on sata mobo controller
and
1 disk on pci sata controller


USUALLY Linux gives names in orders as he find them, and I could take the vol_id and try to boot with only one disk for 3 times to discover the vol_id .
But what if I have no access to this machine?

I mean, is there a way to find and to be sure that sda ( for example ) and sdb are the two on the mobo and sdc is the only one on the pci controller?

Is there a way to see where sd* is attached on my computer, throught which controller ?



Thanks in advance.
 
Old 07-03-2008, 07:15 PM   #2
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware -current (multilib) with kernel 3.16.2
Posts: 1,571
Blog Entries: 13

Rep: Reputation: 182Reputation: 182
Look in /dev/disk/uuid and compare to the other entries in /dev/disk/something or other. (Sorry, I'm stuck on a Windows machine and can't remember the exact location.) One location will list the partitions and the device names, you should be able to identify them from there.

EDITED, looking up under google
"lspci" should probably help too, as should looking at dmesg

Last edited by mostlyharmless; 07-03-2008 at 07:20 PM.
 
Old 07-04-2008, 04:23 AM   #3
gettons1980
LQ Newbie
 
Registered: Jun 2008
Posts: 21

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by mostlyharmless View Post
Look in /dev/disk/uuid and compare to the other entries in /dev/disk/something or other. (Sorry, I'm stuck on a Windows machine and can't remember the exact location.) One location will list the partitions and the device names, you should be able to identify them from there.

EDITED, looking up under google
"lspci" should probably help too, as should looking at dmesg


Sorry for my bad english, maybe I couldn't explain the right way.
Basically I have 3 sata hard disks ( sda,sdb,sdc ) : 2 attached on motherboard and 1 on pci controller.
How can I identify which one is attached to pci port ? ( in theory sdc, because usually Linux gives names in the order as if finds them at the boot, and I suppose the 2 hd on the mobo will be the first and second )
I wish to be sure of that because managing a raid and wish to make a raid 1 on two disks and 2 different controllers.


Thanks
 
Old 07-05-2008, 06:20 PM   #4
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware -current (multilib) with kernel 3.16.2
Posts: 1,571
Blog Entries: 13

Rep: Reputation: 182Reputation: 182
Identifying disks

Well, here's how I would do it, using my machine as an example:

Go to /dev/disk/by-id and type

ls

You should see all of the disks. If I do that, for example I get (among other things):

Code:
ata-MAXTOR_STM3320620A_9QF3SLT2
ata-MAXTOR_STM3320620A_9QF3SLT2-part1
ata-MAXTOR_STM3320620A_9QF3SLT2-part2
ata-MAXTOR_STM3320620A_9QF3SLT2-part3
'ls -l' reveals

Code:
lrwxrwxrwx 1 root root  9 2008-07-05 07:45 ata-MAXTOR_STM3320620A_9QF3SLT2 -> ../../hda
lrwxrwxrwx 1 root root 10 2008-07-05 07:45 ata-MAXTOR_STM3320620A_9QF3SLT2-part1 -> ../../hda1
lrwxrwxrwx 1 root root 10 2008-07-05 07:45 ata-MAXTOR_STM3320620A_9QF3SLT2-part2 -> ../../hda2
lrwxrwxrwx 1 root root 10 2008-07-05 07:45 ata-MAXTOR_STM3320620A_9QF3SLT2-part3 -> ../../hda3
All of which show that this particular Maxtor disk (which you can externally identify on the physical label) as STM332062A etc. is attached to IDE as hda.

Going to /dev/disk/by-path and typing 'ls'

Code:
pci-0000:00:1f.1-ide-0:0
pci-0000:00:1f.1-ide-0:0-part1
pci-0000:00:1f.1-ide-0:0-part2
pci-0000:00:1f.1-ide-0:0-part3
pci-0000:00:1f.1-ide-1:0
pci-0000:00:1f.1-ide-1:1
pci-0000:02:03.0-ieee1394-0x0010b92100783ba2:1:0
pci-0000:02:03.0-ieee1394-0x0010b92100783ba2:1:0-part1
pci-0000:02:03.0-ieee1394-0x0010b92100783ba2:1:0-part2
pci-0000:02:03.0-ieee1394-0x0010b92100783ba2:1:0-part3
with 'ls -l'

Code:
lrwxrwxrwx 1 root root  9 2008-07-05 07:45 pci-0000:00:1f.1-ide-0:0 -> ../../hda
lrwxrwxrwx 1 root root 10 2008-07-05 07:45 pci-0000:00:1f.1-ide-0:0-part1 -> ../../hda1
lrwxrwxrwx 1 root root 10 2008-07-05 07:45 pci-0000:00:1f.1-ide-0:0-part2 -> ../../hda2
lrwxrwxrwx 1 root root 10 2008-07-05 07:45 pci-0000:00:1f.1-ide-0:0-part3 -> ../../hda3
lrwxrwxrwx 1 root root  9 2008-07-05 07:45 pci-0000:00:1f.1-ide-1:0 -> ../../hdc
lrwxrwxrwx 1 root root  9 2008-07-05 07:45 pci-0000:00:1f.1-ide-1:1 -> ../../hdd
lrwxrwxrwx 1 root root  9 2008-07-05 07:45 pci-0000:02:03.0-ieee1394-0x0010b92100783ba2:1:0 -> ../../sda
lrwxrwxrwx 1 root root 10 2008-07-05 07:45 pci-0000:02:03.0-ieee1394-0x0010b92100783ba2:1:0-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 2008-07-05 07:45 pci-0000:02:03.0-ieee1394-0x0010b92100783ba2:1:0-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 2008-07-05 07:45 pci-0000:02:03.0-ieee1394-0x0010b92100783ba2:1:0-part3 -> ../../sda3
Shows the External ieee1394 "Firewire" drive as sda, with each of its partitions.

Looking at /var/adm/dmesg shows (among a lot of other stuff)

Code:
Probing IDE interface ide0...
hdb: IOMEGA ZIP 250 ATAPI, ATAPI FLOPPY drive
hda: MAXTOR STM3320620A, ATA DISK drive
hda: host max PIO4 wanted PIO255(auto-tune) selected PIO4
hda: UDMA/100 mode selected
hdb: applying conservative PIO "downgrade"
hdb: host max PIO4 wanted PIO255(auto-tune) selected PIO2
hdb: UDMA/33 mode selected
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Probing IDE interface ide1...
hdd: DVD-ROM DDU1621, ATAPI CD/DVD-ROM drive
hdc: SONY DVD+RW DRU-120A, ATAPI CD/DVD-ROM drive
hdc: host max PIO4 wanted PIO255(auto-tune) selected PIO4
hdc: UDMA/33 mode selected
hdd: host max PIO4 wanted PIO255(auto-tune) selected PIO4
hdd: UDMA/33 mode selected
ide1 at 0x170-0x177,0x376 on irq 15
PDC20271: IDE controller (0x105a:0x6269 rev 0x02) at  PCI slot 0000:02:05.0
ACPI: PCI Interrupt 0000:02:05.0[A] -> GSI 17 (level, low) -> IRQ 16
PDC20271: PLL input clock is 16587 kHz
PDC20271: 100% native mode on irq 16
    ide2: BM-DMA at 0xac00-0xac07, BIOS settings: hde:pio, hdf:pio
    ide3: BM-DMA at 0xac08-0xac0f, BIOS settings: hdg:pio, hdh:pio
Probing IDE interface ide2...
hde: WDC WD1600JB-00REA0, ATA DISK drive
hde: host max PIO4 wanted PIO255(auto-tune) selected PIO4
hde: UDMA/100 mode selected
ide2 at 0x9c00-0x9c07,0xa002 on irq 16
Probing IDE interface ide3...
hdg: WDC WD1600AAJB-00PVA0, ATA DISK drive
hdg: host max PIO4 wanted PIO255(auto-tune) selected PIO4
hdg: UDMA/100 mode selected
ide3 at 0xa400-0xa407,0xa802 on irq 16
hda: max request size: 512KiB
hda: 625142448 sectors (320072 MB) w/16384KiB Cache, CHS=38913/255/63
hda: cache flushes supported
 hda: hda1 hda2 hda3
hde: max request size: 512KiB
hde: 312581808 sectors (160041 MB) w/8192KiB Cache, CHS=19457/255/63
hde: cache flushes supported
 hde: hde1 hde2 hde3
 hde: p3 exceeds device capacity
hdg: max request size: 512KiB
hdg: 312581808 sectors (160041 MB) w/8192KiB Cache, CHS=19457/255/63
hdg: cache flushes supported
So you can see each disk on each port. For example above, hda is the ide0 drive on the motherboard, hdb is a ZIP drive, hdc, hdd are CD drives, hde and hdg are ide1 drives on a board with a PDC-20271 chip (a Fasttrak firmware RAID board)

Hope that makes it clearer!
 
  


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
Good guide for managing RAID? hondo Linux - General 11 07-27-2007 09:25 AM
General question about NIC names and order they are found.. angeloio Slackware 2 03-14-2006 05:48 PM
raid mdadm reiser, possibly boot order? DigitalSmash Debian 5 11-10-2004 04:26 AM
RAID managing software? mehesque Linux - Software 0 04-05-2004 08:33 PM
SAMBA: display of share names is OK but files names are wrong superandrzej Linux - Software 5 02-02-2004 10:14 AM


All times are GMT -5. The time now is 11:05 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration