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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
07-26-2021, 02:39 AM
|
#1
|
LQ Newbie
Registered: Oct 2013
Posts: 21
Rep: 
|
How to check if disk attached to Linux OS is SSD or SATA?
Dear All,
Good Day!
OS Version is Red Hat Enterprise Linux Server release 7.1
1.How to check if disk attached to Linux OS is SSD or SATA?
2.How to check , how many Local disks are available excluding LUN mapped from storage end.
Thanks
|
|
|
07-26-2021, 03:32 AM
|
#2
|
Member
Registered: Jun 2020
Posts: 609
Rep: 
|
1. If you mean 'NVMe' by SSD, they will show up as /dev/nvme as opposed to /dev/sd as block devices, unless they're all hidden behind a RAID controller or somesuch (won't apply to NVMe of course). SSDs can be SATA devices too, however, so there'd be no way (other than to observe its performance or physically check the device or dump its information and then google whatever you get) to verify mechanical drive vs SSD programatically.
2. Does lsblk do what you want?
|
|
|
07-26-2021, 03:49 AM
|
#3
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,340
|
Quote:
Originally Posted by obobskivich
... so there'd be no way (other than to observe its performance or physically check the device or dump its information and then google whatever you get) to verify mechanical drive vs SSD programatically.
|
It rarely pays to be so dogmatic with Linux.
Code:
cat /sys/block/sd?/queue/rotational
"1" means yes, "0" no. There are a few edge cases (USB flash e.g.) but there are also other solutions that might need some parsing - SMART e.g.
|
|
|
07-26-2021, 09:28 AM
|
#4
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,491
|
Quote:
Originally Posted by peterdin
Dear All, Good Day!
OS Version is Red Hat Enterprise Linux Server release 7.1
1.How to check if disk attached to Linux OS is SSD or SATA?
2.How to check , how many Local disks are available excluding LUN mapped from storage end.
|
Have you done ANY research at all? Identify HDD vs SSD and get model #
Code:
lsblk -d -e 7 -o NAME,ROTA,DISC-MAX,MODEL
RAID devices will tell you they're LVM's. Using lspci and lshw will let you find more. Feel free to look at the man pages for those commands.
|
|
|
07-26-2021, 10:48 AM
|
#5
|
Member
Registered: Jun 2020
Posts: 609
Rep: 
|
Quote:
Originally Posted by syg00
It rarely pays to be so dogmatic with Linux.
Code:
cat /sys/block/sd?/queue/rotational
"1" means yes, "0" no. There are a few edge cases (USB flash e.g.) but there are also other solutions that might need some parsing - SMART e.g.
|
Yeah my reasoning is basically in-line with your answer here - 'other solutions that might need some parsing' - you can get linux (or whatever other OS, or the system BIOS/UEFI) to spit out a full model # on some level and that will be absolutely definitive once resolved back to the manufacturer specs. I wouldn't (personally) trust any system to make a 'guess' as to a drive being 'rotational' or 'not' (to my understanding this is based on a lookup of the device ID, right?) as the absolute final word (even if it works 99% of the time) specifically because of the aforesaid corner cases (including SSHDs and other hybrid solutions, as well as devices being potentially abstracted by controllers (e.g. as here: https://unix.stackexchange.com/quest...ational-should)). I don't see that as 'dogmatic' but whatever blows your hair back I guess...
|
|
|
07-28-2021, 01:17 AM
|
#6
|
LQ Guru
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, OS/2, others
Posts: 6,354
|
Another option:
Code:
# inxi -dayz
Drives:
Local Storage: total: raw: 1.93 TiB usable: 1.03 TiB
used: 694.97 GiB (66.0%)
ID-1: /dev/sda maj-min: 8:0 vendor: PNY model: CS900 120GB SSD
size: 111.79 GiB block-size: physical: 512 B logical: 512 B sata: 3.2
speed: 6.0 Gb/s rotation: SSD serial: <filter> rev: 0613 temp: 33 C
scheme: MBR
SMART: yes state: enabled health: PASSED on: 370d 5h cycles: 43
written: 242 KiB
ID-2: /dev/sdb maj-min: 8:16 vendor: Hitachi model: HUA722010CLA331
family: Ultrastar A7K2000 size: 931.51 GiB block-size: physical: 512 B
logical: 512 B sata: 2.6 speed: 3.0 Gb/s rotation: 7200 rpm serial: <filter>
rev: A3NH temp: 32 C scheme: GPT
SMART: yes state: enabled health: PASSED on: 2y 324d 23h cycles: 93
Pre-Fail: reallocated sector: 100 threshold: 5
ID-3: /dev/sdc maj-min: 8:32 vendor: Seagate model: ST1000DM003-1CH162
family: Barracuda 7200.14 (AF) size: 931.51 GiB block-size: physical: 4096 B
logical: 512 B sata: 3.1 speed: 3.0 Gb/s rotation: 7200 rpm serial: <filter>
rev: CC49 temp: 31 C scheme: GPT
SMART: yes state: enabled health: PASSED on: 112d 23h cycles: 15
read: 18.06 TiB written: 1.52 TiB Pre-Fail: attribute: Spin_Retry_Count
value: 100 worst: 100 threshold: 97
Optical-1: /dev/sr0 vendor: ASUS model: DRW-24B1ST j rev: 1.11
dev-links: cdrom,cdrw,dvd,dvdrw
Features: speed: 48 multisession: yes audio: yes dvd: yes
rw: cd-r,cd-rw,dvd-r state: running
|
|
|
All times are GMT -5. The time now is 06:47 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|