LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-01-2016, 06:09 PM   #1
Rinndalir
Member
 
Registered: Sep 2015
Posts: 733

Rep: Reputation: Disabled
Some ways to get the hard drive make and model.


I know of these:

Code:
cat /proc/scsi/scsi

cat /sys/devices/pcixxxx:xx/xxxx:xx:xx.x/atax/hostx/targetx:x:x/x:x:x:x/wwid

hdparm -i /dev/sdo

Are there other ways?
 
Old 09-01-2016, 06:19 PM   #2
STDOUBT
Member
 
Registered: May 2010
Location: Stumptown
Distribution: Slackware64
Posts: 583

Rep: Reputation: 242Reputation: 242Reputation: 242
Code:
# smartctl -i /dev/sda
(As root of course)
 
Old 09-02-2016, 03:59 PM   #3
Rinndalir
Member
 
Registered: Sep 2015
Posts: 733

Original Poster
Rep: Reputation: Disabled
Forgot about that one. FWIW the three I posted don't require root. Well they might on some systems but it depends.
 
Old 09-02-2016, 08:49 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
http://www.cyberciti.biz/faq/find-ha...pecs-on-linux/
 
1 members found this post helpful.
Old 09-03-2016, 04:08 AM   #5
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Code:
dmesg|grep ata
Or similar?
 
Old 09-03-2016, 08:09 PM   #6
Rinndalir
Member
 
Registered: Sep 2015
Posts: 733

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by 273 View Post
Code:
dmesg|grep ata
Or similar?
Post the output here.
 
Old 09-03-2016, 08:21 PM   #7
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Quote:
Originally Posted by Rinndalir View Post
Post the output here.
May I ask why? I thought you were looking at ways of finding out the hard drive make and model on your currently running install? If it doesn't work on your system then it doesn't work on your system, not sure why my telling you I have a Toshiba and a Seagate plugged in to this system will help?
Still, happy to oblige...
Code:
$ dmesg|grep ata
[    0.000000] BIOS-e820: [mem 0x00000000bfdd1000-0x00000000bfdfffff] ACPI data
[    0.000000] Memory: 32843860K/33535196K available (6004K kernel code, 1096K rwdata, 2752K rodata, 1352K init, 928K bss, 691336K reserved, 0K cma-reserved)
[    3.764352] Write protecting the kernel read-only data: 10240k
[    3.884064] libata version 3.00 loaded.
[    3.930087] ata1: SATA max UDMA/133 abar m1024@0xfdfff000 port 0xfdfff100 irq 19
[    3.930143] ata2: SATA max UDMA/133 abar m1024@0xfdfff000 port 0xfdfff180 irq 19
[    3.930203] ata3: SATA max UDMA/133 abar m1024@0xfdfff000 port 0xfdfff200 irq 19
[    3.930259] ata4: SATA max UDMA/133 abar m1024@0xfdfff000 port 0xfdfff280 irq 19
[    3.930312] ata5: SATA max UDMA/133 abar m1024@0xfdfff000 port 0xfdfff300 irq 19
[    3.930365] ata6: SATA max UDMA/133 abar m1024@0xfdfff000 port 0xfdfff380 irq 19
[    4.242812] ata5: SATA link down (SStatus 0 SControl 300)
[    4.242948] ata6: SATA link down (SStatus 0 SControl 300)
[    4.399064] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[    4.399130] ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[    4.399191] ata4: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[    4.399256] ata3: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[    4.399759] ata4.00: ATA-9: WDC WD30EZRZ-00Z5HB0, 80.00A80, max UDMA/133
[    4.399807] ata4.00: 5860533168 sectors, multi 0: LBA48 NCQ (depth 31/32), AA
[    4.400421] ata4.00: configured for UDMA/133
[    4.400709] ata3.00: ATA-8: TOSHIBA DT01ACA300, MX6OABB0, max UDMA/133
[    4.400756] ata3.00: 5860533168 sectors, multi 0: LBA48 NCQ (depth 31/32), AA
[    4.402285] ata3.00: configured for UDMA/133
[    4.411256] ata1.00: ATA-8: OCZ-AGILITY3, 2.25, max UDMA/133
[    4.411315] ata1.00: 117231408 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[    4.414275] ata2.00: ATA-8: OCZ-VERTEX3, 2.28.20, max UDMA/133
[    4.414331] ata2.00: 468862128 sectors, multi 1: LBA48 NCQ (depth 31/32), AA
[    4.421128] ata1.00: configured for UDMA/133
[    4.434068] ata2.00: configured for UDMA/133
[    7.623034] BTRFS: device label datab devid 1 transid 40 /dev/sdd1
[    7.789749] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[    8.047097] systemd[1]: Listening on LVM2 metadata daemon socket.
[    8.204950] acpi_cpufreq: overriding BIOS provided _PSD data
[    8.558455] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
[    8.896465] EXT4-fs (sdc1): mounted filesystem with ordered data mode. Opts: (null)
 
Old 09-03-2016, 08:32 PM   #8
Rinndalir
Member
 
Registered: Sep 2015
Posts: 733

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by 273
May I ask why?
It's more than just the make/model, that's the point. You'd need to sort the HDDs out.
 
Old 09-03-2016, 08:37 PM   #9
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Quote:
Originally Posted by Rinndalir View Post
It's more than just the make/model, that's the point. You'd need to sort the HDDs out.
Please ask what you actually want to ask then. You are not helping yourself or anybody else by asking one question then changing it to something else.
 
Old 09-03-2016, 09:04 PM   #10
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Your answer was similar to saying "Google 'hard drive'. Your model is in the output somewhere."
 
Old 09-03-2016, 09:09 PM   #11
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
Quote:
Originally Posted by Richard Cranium View Post
Your answer was similar to saying "Google 'hard drive'. Your model is in the output somewhere."
In what way? The question was which commands give information regarding the make and model of the hard drive, just running the command I gave is pretty self-explanatory.
If you're unconvinced read the output I posted and look for names of manufacturers.
I apologise if I missed some condition that the answers muse be given in a particular format or obvious to people who have never used Linux.
 
Old 09-03-2016, 11:07 PM   #12
rokytnji
LQ Veteran
 
Registered: Mar 2008
Location: Waaaaay out West Texas
Distribution: antiX 23, MX 23
Posts: 7,111
Blog Entries: 21

Rep: Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474Reputation: 3474
Thumbs down oooooooooops



Code:
harry@biker:~
$ sudo -i
[sudo] password for harry: 
root@biker:~# smartctl -i /dev/sda
smartctl 6.4 2014-10-07 r4002 [i686-linux-4.6.2-antix.1-686-smp-pae] (local build)
Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Hitachi/HGST Travelstar Z5K500
Device Model:     HGST HTS545032A7E380
Serial Number:    TM8412ZJ15LVER
LU WWN Device Id: 5 000cca 71fd0a421
Firmware Version: GGBOAC90
User Capacity:    320,072,933,376 bytes [320 GB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    5400 rpm
Form Factor:      2.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS T13/1699-D revision 6
SATA Version is:  SATA 2.6, 3.0 Gb/s
Local Time is:    Sat Sep  3 23:00:25 2016 CDT
SMART support is: Available - device has SMART capability.
SMART support is: Disabled

root@biker:~# exit
logout
harry@biker:~
$ dmesg|grep ata
[    0.000000] BIOS-e820: [mem 0x00000000daf9f000-0x00000000daffefff] ACPI data
[    0.000000] ACPI: SSDT 0x00000000DAFF9000 000797 (v01 LENOVO SataAhci 00001000 INTL 20061109)
[    0.000000] Memory: 16296512K/16494568K available (6693K kernel code, 604K rwdata, 1932K rodata, 596K init, 452K bss, 198056K reserved, 0K cma-reserved, 15585664K highmem)
      .data : 0xc1689a5c - 0xc1906300   (2546 kB)
[    0.266580] ACPI : EC: GPE = 0x11, I/O: command/status = 0x66, data = 0x62
[    0.266747] libata version 3.00 loaded.
[    0.636356] ata1: SATA max UDMA/133 abar m2048@0xf1538000 port 0xf1538100 irq 27
[    0.636359] ata2: SATA max UDMA/133 abar m2048@0xf1538000 port 0xf1538180 irq 27
[    0.636360] ata3: DUMMY
[    0.636361] ata4: DUMMY
[    0.636362] ata5: DUMMY
[    0.636363] ata6: DUMMY
[    0.636873] scsi host6: pata_legacy
[    0.636919] ata7: PATA max PIO4 cmd 0x1f0 ctl 0x3f6 irq 14
[    0.939896] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    0.939937] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[    0.940957] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
[    0.940961] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
[    0.942192] ata1.00: ATA-8: HGST HTS545032A7E380, GGBOAC90, max UDMA/133
[    0.942196] ata1.00: 625142448 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[    0.942264] ata2.00: ACPI cmd e3/00:1f:00:00:00:a0 (IDLE) succeeded
[    0.942627] ata2.00: ACPI cmd e3/00:02:00:00:00:a0 (IDLE) succeeded
[    0.943383] ata1.00: ACPI cmd ef/02:00:00:00:00:a0 (SET FEATURES) succeeded
[    0.943386] ata1.00: ACPI cmd f5/00:00:00:00:00:a0 (SECURITY FREEZE LOCK) filtered out
[    0.944246] ata2.00: ATAPI: Optiarc DVD RW AD-7740H, 1.S1, max UDMA/100
[    0.944472] ata1.00: configured for UDMA/133
[    0.946912] ata2.00: ACPI cmd e3/00:1f:00:00:00:a0 (IDLE) succeeded
[    0.947253] ata2.00: ACPI cmd e3/00:02:00:00:00:a0 (IDLE) succeeded
[    0.948812] ata2.00: configured for UDMA/100
[    1.033030] scsi host7: pata_legacy
[    1.033061] ata8: PATA max PIO4 cmd 0x170 ctl 0x376 irq 15
[    1.242395] Write protecting the kernel read-only data: 1940k
[    1.242402] NX-protecting the kernel data: 3544k
[    2.778290] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[   12.567218] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
[   12.733634] EXT4-fs (sda5): mounted filesystem with ordered data mode. Opts: (null)
[   12.806577] EXT4-fs (sda6): mounted filesystem with ordered data mode. Opts: (null)
harry@biker:~
$ cat /proc/scsi/scsi
cat: /proc/scsi/scsi: No such file or directory
harry@biker:~
$ 
harry@biker:~
$ cat /sys/devices/pcixxxx:xx/xxxx:xx:xx.x/atax/hostx/targetx:x:x/x:x:x:x/wwid
cat: /sys/devices/pcixxxx:xx/xxxx:xx:xx.x/atax/hostx/targetx:x:x/x:x:x:x/wwid: No such file or directory
harry@biker:~
$ hdparm -i /dev/sda
bash: hdparm: command not found
harry@biker:~
$
Code:
harry@biker:~
$ inxi -plu
Partition: ID-1: / size: 7.6G used: 4.5G (62%) fs: ext4 dev: /dev/sda1
           label: antiX15root uuid: 685d85b2-6651-49ed-928c-d5e17f70f500
           ID-2: /home size: 68G used: 9.9G (16%) fs: ext4 dev: /dev/sda2
           label: antiX15home uuid: 8d150b09-c903-4b7d-9326-7b88e7ac84f2
           ID-3: /media/_data1 size: 119G used: 4.1G (4%) fs: ext4 dev: /dev/sda5
           label: /data1 uuid: 8c692b69-46f7-48ef-abc9-e6963655e259
           ID-4: /media/_data2 size: 96G used: 60M (1%) fs: ext4 dev: /dev/sda6
           label: /data2 uuid: b76696e8-11ba-4177-970b-0d237aa5a8ae
           ID-5: swap-1 size: 4.19GB used: 0.00GB (0%) fs: swap dev: /dev/sda3
           label: N/A uuid: 45720f5c-3d28-4e6d-a06d-9ce4a9fe5370
harry@biker:~

Last edited by rokytnji; 09-03-2016 at 11:13 PM.
 
1 members found this post helpful.
Old 09-04-2016, 04:43 AM   #13
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680

Rep: Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373Reputation: 2373
For completeness, since it seems I misread this as a casual question on a site for people using Linux to help each other rather than a customer service query by a customer you could do the following:
Code:
dmesg|grep ATA-
[    5.044300] ata4.00: ATA-9: WDC WD30EZRZ-00Z5HB0, 80.00A80, max UDMA/133
[    5.045103] ata3.00: ATA-8: TOSHIBA DT01ACA300, MX6OABB0, max UDMA/133
[    5.055525] ata1.00: ATA-8: OCZ-AGILITY3, 2.25, max UDMA/133
[    5.058772] ata2.00: ATA-8: OCZ-VERTEX3, 2.28.20, max UDMA/133
My apologies for expecting people to understand what grep was doing, read the output, then make changes themselves. I realise now that I am not being paid to give ideas but to give accurate solutions to the customers.

Edit: Oh, no, terribly sorry again I need to point out that this only works for SATA drives and that the manufacturer names will be those given by the drives and may not be spelled out or capitalised correctly. If any customer needs these translating I would be happy to google it for them. I am sorry I suggested that anybody ought to do any of my work themselves.

Last edited by 273; 09-04-2016 at 04:47 AM.
 
Old 09-04-2016, 04:56 AM   #14
elcore
Senior Member
 
Registered: Sep 2014
Distribution: Slackware
Posts: 1,753

Rep: Reputation: Disabled
Quote:
Originally Posted by 273 View Post
Please ask what you actually want to ask then. You are not helping yourself or anybody else by asking one question then changing it to something else.
I assume he's just scraping for data, as I've read another thread where he's advocating IP address and geolocation be public on LQ.
 
Old 09-11-2016, 08:05 PM   #15
Rinndalir
Member
 
Registered: Sep 2015
Posts: 733

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rokytnji View Post


Code:
cat /proc/scsi/scsi
cat: /proc/scsi/scsi: No such file or directory
Might be lack of cd/dvd rom support in your kernel.

Quote:
Code:
cat /sys/devices/pcixxxx:xx/xxxx:xx:xx.x/atax/hostx/targetx:x:x/x:x:x:x/wwid
cat: /sys/devices/pcixxxx:xx/xxxx:xx:xx.x/atax/hostx/targetx:x:x/x:x:x:x/wwid: No such file or directory
Huh what, you'd need to replace those xs with the correct targets.

Quote:
Code:
inxi -plu
Double huh what. Doesn't look like a slackware command but any way it doesn't return make/model.
 
  


Reply



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 make external hard drive to work as internal hard drive chaitanyajun12 Linux - Hardware 6 05-01-2011 02:29 AM
Make / Model of Server and Hard Drive Type Pryach Linux - Newbie 1 11-15-2007 12:13 PM
How To Make Permissions For New Hard Drive? Harpo Linux - Newbie 10 04-18-2006 09:57 PM
Make image of hard drive spondootre Linux - General 1 07-19-2005 03:33 PM
Possible to make hard drive installation? jtsai256 Debian 2 09-30-2003 12:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:08 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