A quick way to check the type of the drive
Is there a quick way to understand a type of the "storage" on Linux? Is it a HDD or SSD (or NVMe)?
It's already known that the host is a physical machine and not a VM.
The first thing I though about was rotational
flag under /sys/block/<device>/queue/
directory. But in my experience even for SSD devices it may contain "1" value.
The second way and more realistic and truthful was a latency. It's a bit harder to measure (some work with /proc/diskstats), but looks more preferable.
Is there any other ways? It's important to mention that I don't need to know exact model of the "storage", just its type.
linux storage proc
add a comment |
Is there a quick way to understand a type of the "storage" on Linux? Is it a HDD or SSD (or NVMe)?
It's already known that the host is a physical machine and not a VM.
The first thing I though about was rotational
flag under /sys/block/<device>/queue/
directory. But in my experience even for SSD devices it may contain "1" value.
The second way and more realistic and truthful was a latency. It's a bit harder to measure (some work with /proc/diskstats), but looks more preferable.
Is there any other ways? It's important to mention that I don't need to know exact model of the "storage", just its type.
linux storage proc
add a comment |
Is there a quick way to understand a type of the "storage" on Linux? Is it a HDD or SSD (or NVMe)?
It's already known that the host is a physical machine and not a VM.
The first thing I though about was rotational
flag under /sys/block/<device>/queue/
directory. But in my experience even for SSD devices it may contain "1" value.
The second way and more realistic and truthful was a latency. It's a bit harder to measure (some work with /proc/diskstats), but looks more preferable.
Is there any other ways? It's important to mention that I don't need to know exact model of the "storage", just its type.
linux storage proc
Is there a quick way to understand a type of the "storage" on Linux? Is it a HDD or SSD (or NVMe)?
It's already known that the host is a physical machine and not a VM.
The first thing I though about was rotational
flag under /sys/block/<device>/queue/
directory. But in my experience even for SSD devices it may contain "1" value.
The second way and more realistic and truthful was a latency. It's a bit harder to measure (some work with /proc/diskstats), but looks more preferable.
Is there any other ways? It's important to mention that I don't need to know exact model of the "storage", just its type.
linux storage proc
linux storage proc
asked 2 hours ago
lesovskylesovsky
314
314
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
How about something like sudo smartctl -a /dev/<device> | grep Rotation
-- if this returns Rotation Rate: Solid State Device
, then that's an SSD. Not sure if this bullet-proof method, either.
1
Looks good, it works even with drives attached through RAID cards.
– lesovsky
45 mins ago
add a comment |
A simple command:
sudo lshw -c disk
Also looks interesting, but output oflshw
doesn't show explicit info about "rotational" capability. I can make a conslusion using sector size value but it's indirect sign
– lesovsky
38 mins ago
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "2"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f950004%2fa-quick-way-to-check-the-type-of-the-drive%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
How about something like sudo smartctl -a /dev/<device> | grep Rotation
-- if this returns Rotation Rate: Solid State Device
, then that's an SSD. Not sure if this bullet-proof method, either.
1
Looks good, it works even with drives attached through RAID cards.
– lesovsky
45 mins ago
add a comment |
How about something like sudo smartctl -a /dev/<device> | grep Rotation
-- if this returns Rotation Rate: Solid State Device
, then that's an SSD. Not sure if this bullet-proof method, either.
1
Looks good, it works even with drives attached through RAID cards.
– lesovsky
45 mins ago
add a comment |
How about something like sudo smartctl -a /dev/<device> | grep Rotation
-- if this returns Rotation Rate: Solid State Device
, then that's an SSD. Not sure if this bullet-proof method, either.
How about something like sudo smartctl -a /dev/<device> | grep Rotation
-- if this returns Rotation Rate: Solid State Device
, then that's an SSD. Not sure if this bullet-proof method, either.
answered 2 hours ago
Janne PikkarainenJanne Pikkarainen
28k33966
28k33966
1
Looks good, it works even with drives attached through RAID cards.
– lesovsky
45 mins ago
add a comment |
1
Looks good, it works even with drives attached through RAID cards.
– lesovsky
45 mins ago
1
1
Looks good, it works even with drives attached through RAID cards.
– lesovsky
45 mins ago
Looks good, it works even with drives attached through RAID cards.
– lesovsky
45 mins ago
add a comment |
A simple command:
sudo lshw -c disk
Also looks interesting, but output oflshw
doesn't show explicit info about "rotational" capability. I can make a conslusion using sector size value but it's indirect sign
– lesovsky
38 mins ago
add a comment |
A simple command:
sudo lshw -c disk
Also looks interesting, but output oflshw
doesn't show explicit info about "rotational" capability. I can make a conslusion using sector size value but it's indirect sign
– lesovsky
38 mins ago
add a comment |
A simple command:
sudo lshw -c disk
A simple command:
sudo lshw -c disk
answered 45 mins ago
d a i s yd a i s y
1741214
1741214
Also looks interesting, but output oflshw
doesn't show explicit info about "rotational" capability. I can make a conslusion using sector size value but it's indirect sign
– lesovsky
38 mins ago
add a comment |
Also looks interesting, but output oflshw
doesn't show explicit info about "rotational" capability. I can make a conslusion using sector size value but it's indirect sign
– lesovsky
38 mins ago
Also looks interesting, but output of
lshw
doesn't show explicit info about "rotational" capability. I can make a conslusion using sector size value but it's indirect sign– lesovsky
38 mins ago
Also looks interesting, but output of
lshw
doesn't show explicit info about "rotational" capability. I can make a conslusion using sector size value but it's indirect sign– lesovsky
38 mins ago
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f950004%2fa-quick-way-to-check-the-type-of-the-drive%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown