Why does hdparm -y not spin down a HDD while the file managed does? (using Ejection option)
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
A HDD, which is older than 10 years, is getting read using a SATA-to-USB adapter.
When using sudo hdparm -y /dev/sdj
, the HDD does not shut down.
But when using the Eject option in the File Manager, the HDD stops rotating.
Side fact: The eject option in Microsoft Windows does shut the HDD down as well.
Why does hdparm not make the HDD spin down while the File Manager does?
command-line hard-disk file-manager sata hdparm
add a comment |
up vote
0
down vote
favorite
A HDD, which is older than 10 years, is getting read using a SATA-to-USB adapter.
When using sudo hdparm -y /dev/sdj
, the HDD does not shut down.
But when using the Eject option in the File Manager, the HDD stops rotating.
Side fact: The eject option in Microsoft Windows does shut the HDD down as well.
Why does hdparm not make the HDD spin down while the File Manager does?
command-line hard-disk file-manager sata hdparm
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
A HDD, which is older than 10 years, is getting read using a SATA-to-USB adapter.
When using sudo hdparm -y /dev/sdj
, the HDD does not shut down.
But when using the Eject option in the File Manager, the HDD stops rotating.
Side fact: The eject option in Microsoft Windows does shut the HDD down as well.
Why does hdparm not make the HDD spin down while the File Manager does?
command-line hard-disk file-manager sata hdparm
A HDD, which is older than 10 years, is getting read using a SATA-to-USB adapter.
When using sudo hdparm -y /dev/sdj
, the HDD does not shut down.
But when using the Eject option in the File Manager, the HDD stops rotating.
Side fact: The eject option in Microsoft Windows does shut the HDD down as well.
Why does hdparm not make the HDD spin down while the File Manager does?
command-line hard-disk file-manager sata hdparm
command-line hard-disk file-manager sata hdparm
asked Dec 4 at 19:35
neverMind9
497213
497213
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
The hdparm
command only does one thing, namely issuing a specific ATA command which tells the drive to transition to a standby state. This doesn't prevent anything from immediately waking up the drive with a new command however so depending on the drive itself, it may not even try to spin down (the smart ones wait a short period of time for incoming commands, and only spin down if there are none). Note that the hdparm
man page does not guarantee that this will spin down the drive, it only says it will 'usually' do so.
In contrast, the Eject option in a file manager usually does a lot more than that. At minimum, it does the following (though not necessarily in this exact order):
- It makes sure that there are no open files on the drive.
- It forcibly flushes all filesystem buffers for all filesystems mounted from the drive.
- It unmounts all mounted filesystems from the drive.
- It flushes any block-layer caches for the device, and may tear down any intermediary block layers running on top of the device (for example, if FDE is being used, that will get shut down cleanly).
- It flushes the device's write cache, if the device has a write cache enabled.
- If the device can be put into a low or minimal power state programmatically, it does so.
- If the device has physically removable media that can be ejected by software (for example, a CD drive), it issues the appropriate eject command. Otherwise, it may dissociate the block-level drivers for the device from the device itself, effectively shutting off communications with the device.
Those first five steps functionally ensure that nothing in userspace will issue any commands to the device that would wake it from the low power state triggerd in the sixth step, and the final step ensures that the device is properly removed from the system, and treated as a newly connected device the next time it is connected.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
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',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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%2funix.stackexchange.com%2fquestions%2f485980%2fwhy-does-hdparm-y-not-spin-down-a-hdd-while-the-file-managed-does-using-eject%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
The hdparm
command only does one thing, namely issuing a specific ATA command which tells the drive to transition to a standby state. This doesn't prevent anything from immediately waking up the drive with a new command however so depending on the drive itself, it may not even try to spin down (the smart ones wait a short period of time for incoming commands, and only spin down if there are none). Note that the hdparm
man page does not guarantee that this will spin down the drive, it only says it will 'usually' do so.
In contrast, the Eject option in a file manager usually does a lot more than that. At minimum, it does the following (though not necessarily in this exact order):
- It makes sure that there are no open files on the drive.
- It forcibly flushes all filesystem buffers for all filesystems mounted from the drive.
- It unmounts all mounted filesystems from the drive.
- It flushes any block-layer caches for the device, and may tear down any intermediary block layers running on top of the device (for example, if FDE is being used, that will get shut down cleanly).
- It flushes the device's write cache, if the device has a write cache enabled.
- If the device can be put into a low or minimal power state programmatically, it does so.
- If the device has physically removable media that can be ejected by software (for example, a CD drive), it issues the appropriate eject command. Otherwise, it may dissociate the block-level drivers for the device from the device itself, effectively shutting off communications with the device.
Those first five steps functionally ensure that nothing in userspace will issue any commands to the device that would wake it from the low power state triggerd in the sixth step, and the final step ensures that the device is properly removed from the system, and treated as a newly connected device the next time it is connected.
add a comment |
up vote
1
down vote
accepted
The hdparm
command only does one thing, namely issuing a specific ATA command which tells the drive to transition to a standby state. This doesn't prevent anything from immediately waking up the drive with a new command however so depending on the drive itself, it may not even try to spin down (the smart ones wait a short period of time for incoming commands, and only spin down if there are none). Note that the hdparm
man page does not guarantee that this will spin down the drive, it only says it will 'usually' do so.
In contrast, the Eject option in a file manager usually does a lot more than that. At minimum, it does the following (though not necessarily in this exact order):
- It makes sure that there are no open files on the drive.
- It forcibly flushes all filesystem buffers for all filesystems mounted from the drive.
- It unmounts all mounted filesystems from the drive.
- It flushes any block-layer caches for the device, and may tear down any intermediary block layers running on top of the device (for example, if FDE is being used, that will get shut down cleanly).
- It flushes the device's write cache, if the device has a write cache enabled.
- If the device can be put into a low or minimal power state programmatically, it does so.
- If the device has physically removable media that can be ejected by software (for example, a CD drive), it issues the appropriate eject command. Otherwise, it may dissociate the block-level drivers for the device from the device itself, effectively shutting off communications with the device.
Those first five steps functionally ensure that nothing in userspace will issue any commands to the device that would wake it from the low power state triggerd in the sixth step, and the final step ensures that the device is properly removed from the system, and treated as a newly connected device the next time it is connected.
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
The hdparm
command only does one thing, namely issuing a specific ATA command which tells the drive to transition to a standby state. This doesn't prevent anything from immediately waking up the drive with a new command however so depending on the drive itself, it may not even try to spin down (the smart ones wait a short period of time for incoming commands, and only spin down if there are none). Note that the hdparm
man page does not guarantee that this will spin down the drive, it only says it will 'usually' do so.
In contrast, the Eject option in a file manager usually does a lot more than that. At minimum, it does the following (though not necessarily in this exact order):
- It makes sure that there are no open files on the drive.
- It forcibly flushes all filesystem buffers for all filesystems mounted from the drive.
- It unmounts all mounted filesystems from the drive.
- It flushes any block-layer caches for the device, and may tear down any intermediary block layers running on top of the device (for example, if FDE is being used, that will get shut down cleanly).
- It flushes the device's write cache, if the device has a write cache enabled.
- If the device can be put into a low or minimal power state programmatically, it does so.
- If the device has physically removable media that can be ejected by software (for example, a CD drive), it issues the appropriate eject command. Otherwise, it may dissociate the block-level drivers for the device from the device itself, effectively shutting off communications with the device.
Those first five steps functionally ensure that nothing in userspace will issue any commands to the device that would wake it from the low power state triggerd in the sixth step, and the final step ensures that the device is properly removed from the system, and treated as a newly connected device the next time it is connected.
The hdparm
command only does one thing, namely issuing a specific ATA command which tells the drive to transition to a standby state. This doesn't prevent anything from immediately waking up the drive with a new command however so depending on the drive itself, it may not even try to spin down (the smart ones wait a short period of time for incoming commands, and only spin down if there are none). Note that the hdparm
man page does not guarantee that this will spin down the drive, it only says it will 'usually' do so.
In contrast, the Eject option in a file manager usually does a lot more than that. At minimum, it does the following (though not necessarily in this exact order):
- It makes sure that there are no open files on the drive.
- It forcibly flushes all filesystem buffers for all filesystems mounted from the drive.
- It unmounts all mounted filesystems from the drive.
- It flushes any block-layer caches for the device, and may tear down any intermediary block layers running on top of the device (for example, if FDE is being used, that will get shut down cleanly).
- It flushes the device's write cache, if the device has a write cache enabled.
- If the device can be put into a low or minimal power state programmatically, it does so.
- If the device has physically removable media that can be ejected by software (for example, a CD drive), it issues the appropriate eject command. Otherwise, it may dissociate the block-level drivers for the device from the device itself, effectively shutting off communications with the device.
Those first five steps functionally ensure that nothing in userspace will issue any commands to the device that would wake it from the low power state triggerd in the sixth step, and the final step ensures that the device is properly removed from the system, and treated as a newly connected device the next time it is connected.
answered Dec 4 at 20:21
Austin Hemmelgarn
5,89811016
5,89811016
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- 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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2funix.stackexchange.com%2fquestions%2f485980%2fwhy-does-hdparm-y-not-spin-down-a-hdd-while-the-file-managed-does-using-eject%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