Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Question about drives.


  • Please log in to reply
5 replies to this topic

#1 MalwareMutilator

MalwareMutilator

  • Members
  • 931 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:08:44 PM

Posted 23 December 2015 - 09:19 AM

Hi all,
 
I have another Linux question if you don't mind.  :thumbup2:
 
This computer is setup with 2, WD-1TB blue, hard drives, and a CD/DVD burner.  I wanted to make sure the two hard drives were running at SATA 2 (which is maximum on this computer), so I ran the command below to find out:
 
dmesg | grep -i sata | grep 'link up'
 
The results, as I interpret them, seem correct.  
 
george@george-Dimension-XPSGEN5 ~ $ dmesg | grep -i sata | grep 'link up'
[    1.944035] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    1.948083] ata6: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[    1.948112] ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
 
My assumption is that ata3 and ata5 are my hard drives, and ata6 is my CD/DVD.  What I can't figure out is how to determine which drive is which.  For example . . . is ata3 actually /dev/sda1?  Is there a command to determine that?
 
I hope I didn't confuse you.
 
Thanks to all, and Merry Christmas!   :santa:


BC AdBot (Login to Remove)

 


#2 nuna

nuna

  • Members
  • 155 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Local time:02:44 AM

Posted 23 December 2015 - 05:23 PM

I had a similar doubt to identify the device linked to some ata errors. Think I used the lsscsi command (which is not installed by default on all distros):

lsscsi -v

Surely there are other options, like: ​​Mapping ata device number to logical device name


---Edited to add install command and example---

​to install lsscsi on linux distributions from the Debian familiy (like Linux Mint):

​sudo apt-get install lsscsi

usage example:

~$ lsscsi -v
[0:0:0:0]    disk    ATA      ST3320620AS      E     /dev/sda
  dir: /sys/bus/scsi/devices/0:0:0:0  [/sys/devices/pci0000:00/0000:00:1f.2/ata1/host0/target0:0:0/0:0:0:0]
[1:0:0:0]    disk    ATA      WDC WD40EZRX-00S 0A80  /dev/sdb
  dir: /sys/bus/scsi/devices/1:0:0:0  [/sys/devices/pci0000:00/0000:00:1f.2/ata2/host1/target1:0:0/1:0:0:0]
[2:0:0:0]    disk    ATA      ST3000DM001-1CH1 CC24  /dev/sdc
  dir: /sys/bus/scsi/devices/2:0:0:0  [/sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:0/2:0:0:0]
[3:0:0:0]    cd/dvd  HL-DT-ST DVD-RAM GH22LS30 1.01  /dev/sr0
  dir: /sys/bus/scsi/devices/3:0:0:0  [/sys/devices/pci0000:00/0000:00:1f.2/ata4/host3/target3:0:0/3:0:0:0]

Edited by nuna, 23 December 2015 - 06:40 PM.


#3 MalwareMutilator

MalwareMutilator
  • Topic Starter

  • Members
  • 931 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:08:44 PM

Posted 23 December 2015 - 05:33 PM

Thank you, nuna,
 
The link you provided is quite helpful, albeit a bit over my head right now (I'm a Linux newbie), but I will study it a while.  Hopefully I can learn something new.  :)
 
Thanks again


#4 MalwareMutilator

MalwareMutilator
  • Topic Starter

  • Members
  • 931 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:08:44 PM

Posted 24 December 2015 - 06:19 AM

Hi again, nuna,

 

Thank you so much for adding the additional information to your reply. It answered my questions.

 

As you suspected, llscsi was not installed on my version of Mint 17.2 (Mate). However, I downloaded, installed, and ran it without problems. First I ran it without arguments to see what would it would reveal:

 

george@george-Dimension-XPSGEN5 ~ $ lsscsi

[0:0:1:0] cd/dvd _NEC DVD+-RW ND-3530A 102B /dev/sr0

[2:0:0:0] disk ATA WDC WD10EZEX-00B 1A01 /dev/sda

[4:0:0:0] disk ATA WDC WD10EZEX-00B 1A01 /dev/sdb

[5:0:0:0] cd/dvd ATAPI iHAS424 Y ZL1U /dev/sr1

[6:0:0:0] disk WDC WD12 00BB-00CAA1 17.0 /dev/sdd

[7:0:0:0] disk M-SysT5 Dell Memory Key 5.00 /dev/sdc

 

Then I ran it with the verbose argument:

 

george@george-Dimension-XPSGEN5 ~ $ lsscsi -v

[0:0:1:0] cd/dvd _NEC DVD+-RW ND-3530A 102B /dev/sr0

dir: /sys/bus/scsi/devices/0:0:1:0 [/sys/devices/pci0000:00/0000:00:1f.1/ata1/host0/target0:0:1/0:0:1:0]

[2:0:0:0] disk ATA WDC WD10EZEX-00B 1A01 /dev/sda

dir: /sys/bus/scsi/devices/2:0:0:0 [/sys/devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:0/2:0:0:0]

[4:0:0:0] disk ATA WDC WD10EZEX-00B 1A01 /dev/sdb

dir: /sys/bus/scsi/devices/4:0:0:0 [/sys/devices/pci0000:00/0000:00:1f.2/ata5/host4/target4:0:0/4:0:0:0]

[5:0:0:0] cd/dvd ATAPI iHAS424 Y ZL1U /dev/sr1

dir: /sys/bus/scsi/devices/5:0:0:0 [/sys/devices/pci0000:00/0000:00:1f.2/ata6/host5/target5:0:0/5:0:0:0]

[6:0:0:0] disk WDC WD12 00BB-00CAA1 17.0 /dev/sdd

dir: /sys/bus/scsi/devices/6:0:0:0 [/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6.5/1-6.5:2.0/host6/target6:0:0/6:0:0:0]

[7:0:0:0] disk M-SysT5 Dell Memory Key 5.00 /dev/sdc

dir: /sys/bus/scsi/devices/7:0:0:0 [/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-6/1-6.6/1-6.6:1.0/host7/target7:0:0/7:0:0:0]

 

It took me a while to sift through and understand the output, but the answer was there. It was not at all what I expected.

 

I really appreciate your help with this. I have a whole lot to learn, and this is another stepping block.

 

Thanks again, and Happy Holidays.   :)

 



#5 nuna

nuna

  • Members
  • 155 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Local time:02:44 AM

Posted 24 December 2015 - 09:37 AM

In the example I tried to highlight the relevant parts of the output but couldn't do it without losing alignment. As my connection at that time was slow I leaved it like it was.

​From your output, it seems you were right the first time:
  • ata1: cd/dvd _NEC DVD+-RW ND-3530A 102B /dev/sr0
  • ata3: WDC WD10EZEX-00B 1A01 /dev/sda
  • ​ata5: WDC WD10EZEX-00B 1A01 /dev/sdb
  • ​ata6: cd/dvd ATAPI iHAS424 Y ZL1U /dev/sr1
Happy happy!!

#6 MadmanRB

MadmanRB

    Spoon!!!!


  • Members
  • 3,163 posts
  • ONLINE
  •  
  • Gender:Male
  • Location:No time for that when there is evil afoot!
  • Local time:09:44 PM

Posted 27 December 2015 - 12:45 PM

Linux just happens to use a little different numbering system then windows does but its actually very easy to work out.

sda usually means scsi drive a and any partitions in it are numbered by the order they are assigned by the installer.

for example sda2 usually refers to the / or root partition.

now sometimes its different such as sdb or scsi drive b, usually this one is how linux assigns windows partitions even if its on the same drive.

sr usually refers scsi removable media drives such as CD's DVD's and blu rays.

Really its not hard to work out how linux assigns things, but I understand the confusion after so many years as seeing your hard drive as the C drive


You know you want me baby!

Proud Linux user and dual booter.

Proud Vivaldi user.

 

ljxaqg-6.png





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users