Shutdown my (backup) hard disk on Linux when I don't use itWhat command do I use to spin up a “power up in standby” drive?I/O errors on hard disk on Linux bootWhich 'smartctl -d' option should I use on this hard-disk: 'scsi' or 'ata'?Recovering data from a damaged hard-drive: the “freezer trick”What is the worst scenario, if the hard disk or motherboard don't support the `hddparm -s`?Hard disk drive spins up on laptop sleep/wake, can I stop it doing this?Linux Hard Drive PartitioningHDD with windows OS not connecting to linux via usb to sata adapterGetting hard disk drive serial number at the terminal - not the WWNHard disk shows '193' bad sectors and makes a repetitive clicking noiseHow to detect a (possibly corrupt) hard disk?
How can I plot a Farey diagram?
How to answer pointed "are you quitting" questioning when I don't want them to suspect
Is every set a filtered colimit of finite sets?
Manga about a female worker who got dragged into another world together with this high school girl and she was just told she's not needed anymore
Does a dangling wire really electrocute me if I'm standing in water?
Why do we use polarized capacitors?
How could a lack of term limits lead to a "dictatorship?"
Are cabin dividers used to "hide" the flex of the airplane?
What are the advantages and disadvantages of running one shots compared to campaigns?
Calculate Levenshtein distance between two strings in Python
How did the USSR manage to innovate in an environment characterized by government censorship and high bureaucracy?
"listening to me about as much as you're listening to this pole here"
Shall I use personal or official e-mail account when registering to external websites for work purpose?
Typesetting a double Over Dot on top of a symbol
Lied on resume at previous job
LWC and complex parameters
Why is my log file so massive? 22gb. I am running log backups
Does bootstrapped regression allow for inference?
Finding files for which a command fails
What is the meaning of "of trouble" in the following sentence?
I’m planning on buying a laser printer but concerned about the life cycle of toner in the machine
Why doesn't a const reference extend the life of a temporary object passed via a function?
Are objects structures and/or vice versa?
COUNT(*) or MAX(id) - which is faster?
Shutdown my (backup) hard disk on Linux when I don't use it
What command do I use to spin up a “power up in standby” drive?I/O errors on hard disk on Linux bootWhich 'smartctl -d' option should I use on this hard-disk: 'scsi' or 'ata'?Recovering data from a damaged hard-drive: the “freezer trick”What is the worst scenario, if the hard disk or motherboard don't support the `hddparm -s`?Hard disk drive spins up on laptop sleep/wake, can I stop it doing this?Linux Hard Drive PartitioningHDD with windows OS not connecting to linux via usb to sata adapterGetting hard disk drive serial number at the terminal - not the WWNHard disk shows '193' bad sectors and makes a repetitive clicking noiseHow to detect a (possibly corrupt) hard disk?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have a hard disk in my computer that I use to make backups of my data. I do not use this disk otherwise.
How can I stop this disk from spinning once my backup is finished? Also how would I make it spin back up again before the backup takes place later on?
The drive is a regular SATA drive.
linux hard-disk power-management
add a comment |
I have a hard disk in my computer that I use to make backups of my data. I do not use this disk otherwise.
How can I stop this disk from spinning once my backup is finished? Also how would I make it spin back up again before the backup takes place later on?
The drive is a regular SATA drive.
linux hard-disk power-management
add a comment |
I have a hard disk in my computer that I use to make backups of my data. I do not use this disk otherwise.
How can I stop this disk from spinning once my backup is finished? Also how would I make it spin back up again before the backup takes place later on?
The drive is a regular SATA drive.
linux hard-disk power-management
I have a hard disk in my computer that I use to make backups of my data. I do not use this disk otherwise.
How can I stop this disk from spinning once my backup is finished? Also how would I make it spin back up again before the backup takes place later on?
The drive is a regular SATA drive.
linux hard-disk power-management
linux hard-disk power-management
edited Feb 2 '14 at 6:04
slm♦
256k71541687
256k71541687
asked Feb 2 '14 at 4:50
TotorTotor
8,772135181
8,772135181
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
Umount the filesystem and then run hdparm -S 1 /dev/sdb
to set it to spin down after five seconds (replace /dev/sdb
with the actual device for the hard disk). This will minimize the power used and heat generated by the hard disk.
2
With respect to spinning it back up, you shouldn't have to do anything other than access/use the HDD. unix.stackexchange.com/questions/10930/spin-up-drive-in-linux/…
– slm♦
Feb 2 '14 at 6:07
Thanks! How can I restore the default standby timeout value then? I also sawhdparm -Y
in the man which seems to set the drive in a deeper sleep mode. Is that not recommended?
– Totor
Feb 2 '14 at 17:24
This won't always work. For instance Rockstor will do a smart check frequently while using the control panel, regardless of whether the drive is mounted to anything. The best answer is unfortunately to remove it physically... or not use any program that might wake it up, including S.M.A.R.T. monitors.
– Ray Foss
Feb 21 '18 at 23:32
add a comment |
To further build upon samiam's answer, you can set udev rules to do these things for you.
For this example, you'd have to fill in a file in /etc/udev/rules.d
(ideally name it something along the lines of 45-sdX-power.rules
to respect the conventions, but it doesn't really matter...), with the following:
ACTION=="add", SUBSYSTEM=="block", KERNEL=="sdX", ATTRqueue/rotational=="1", RUN+="/path/to/hdparm -S 1 /dev/sdX"
where you will need to fill in sdX
and provide the full path to the hdparm
binary (which hdparm
).
This will automatically stop your drive from spinning after 5 seconds of inactivity whenever your laptop boots.
This is ideal for a dual boot disk (my case), and backup disks you only startup once a week or so (in which case just mounting it before issuing your backup will turn it on and it will be off the rest of the time).
As for hdparm -Y /dev/sdX
, it is less useful here as it only stops the disk from spinning once, after which any access to the disk (like mounting it) will re-start it and you will have to issue the command again.
add a comment |
Short lookup in gnome-disk-utility repo code, and:
udisksctl power-off -b /dev/sdX
Works in Ubuntu and Mint. In ArchLinux, /usr/bin/udisksctl is owned by udisks2 package.
Source: Superuser SE answer
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',
autoActivateHeartbeat: false,
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%2f112117%2fshutdown-my-backup-hard-disk-on-linux-when-i-dont-use-it%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Umount the filesystem and then run hdparm -S 1 /dev/sdb
to set it to spin down after five seconds (replace /dev/sdb
with the actual device for the hard disk). This will minimize the power used and heat generated by the hard disk.
2
With respect to spinning it back up, you shouldn't have to do anything other than access/use the HDD. unix.stackexchange.com/questions/10930/spin-up-drive-in-linux/…
– slm♦
Feb 2 '14 at 6:07
Thanks! How can I restore the default standby timeout value then? I also sawhdparm -Y
in the man which seems to set the drive in a deeper sleep mode. Is that not recommended?
– Totor
Feb 2 '14 at 17:24
This won't always work. For instance Rockstor will do a smart check frequently while using the control panel, regardless of whether the drive is mounted to anything. The best answer is unfortunately to remove it physically... or not use any program that might wake it up, including S.M.A.R.T. monitors.
– Ray Foss
Feb 21 '18 at 23:32
add a comment |
Umount the filesystem and then run hdparm -S 1 /dev/sdb
to set it to spin down after five seconds (replace /dev/sdb
with the actual device for the hard disk). This will minimize the power used and heat generated by the hard disk.
2
With respect to spinning it back up, you shouldn't have to do anything other than access/use the HDD. unix.stackexchange.com/questions/10930/spin-up-drive-in-linux/…
– slm♦
Feb 2 '14 at 6:07
Thanks! How can I restore the default standby timeout value then? I also sawhdparm -Y
in the man which seems to set the drive in a deeper sleep mode. Is that not recommended?
– Totor
Feb 2 '14 at 17:24
This won't always work. For instance Rockstor will do a smart check frequently while using the control panel, regardless of whether the drive is mounted to anything. The best answer is unfortunately to remove it physically... or not use any program that might wake it up, including S.M.A.R.T. monitors.
– Ray Foss
Feb 21 '18 at 23:32
add a comment |
Umount the filesystem and then run hdparm -S 1 /dev/sdb
to set it to spin down after five seconds (replace /dev/sdb
with the actual device for the hard disk). This will minimize the power used and heat generated by the hard disk.
Umount the filesystem and then run hdparm -S 1 /dev/sdb
to set it to spin down after five seconds (replace /dev/sdb
with the actual device for the hard disk). This will minimize the power used and heat generated by the hard disk.
answered Feb 2 '14 at 5:05
samiamsamiam
2,466813
2,466813
2
With respect to spinning it back up, you shouldn't have to do anything other than access/use the HDD. unix.stackexchange.com/questions/10930/spin-up-drive-in-linux/…
– slm♦
Feb 2 '14 at 6:07
Thanks! How can I restore the default standby timeout value then? I also sawhdparm -Y
in the man which seems to set the drive in a deeper sleep mode. Is that not recommended?
– Totor
Feb 2 '14 at 17:24
This won't always work. For instance Rockstor will do a smart check frequently while using the control panel, regardless of whether the drive is mounted to anything. The best answer is unfortunately to remove it physically... or not use any program that might wake it up, including S.M.A.R.T. monitors.
– Ray Foss
Feb 21 '18 at 23:32
add a comment |
2
With respect to spinning it back up, you shouldn't have to do anything other than access/use the HDD. unix.stackexchange.com/questions/10930/spin-up-drive-in-linux/…
– slm♦
Feb 2 '14 at 6:07
Thanks! How can I restore the default standby timeout value then? I also sawhdparm -Y
in the man which seems to set the drive in a deeper sleep mode. Is that not recommended?
– Totor
Feb 2 '14 at 17:24
This won't always work. For instance Rockstor will do a smart check frequently while using the control panel, regardless of whether the drive is mounted to anything. The best answer is unfortunately to remove it physically... or not use any program that might wake it up, including S.M.A.R.T. monitors.
– Ray Foss
Feb 21 '18 at 23:32
2
2
With respect to spinning it back up, you shouldn't have to do anything other than access/use the HDD. unix.stackexchange.com/questions/10930/spin-up-drive-in-linux/…
– slm♦
Feb 2 '14 at 6:07
With respect to spinning it back up, you shouldn't have to do anything other than access/use the HDD. unix.stackexchange.com/questions/10930/spin-up-drive-in-linux/…
– slm♦
Feb 2 '14 at 6:07
Thanks! How can I restore the default standby timeout value then? I also saw
hdparm -Y
in the man which seems to set the drive in a deeper sleep mode. Is that not recommended?– Totor
Feb 2 '14 at 17:24
Thanks! How can I restore the default standby timeout value then? I also saw
hdparm -Y
in the man which seems to set the drive in a deeper sleep mode. Is that not recommended?– Totor
Feb 2 '14 at 17:24
This won't always work. For instance Rockstor will do a smart check frequently while using the control panel, regardless of whether the drive is mounted to anything. The best answer is unfortunately to remove it physically... or not use any program that might wake it up, including S.M.A.R.T. monitors.
– Ray Foss
Feb 21 '18 at 23:32
This won't always work. For instance Rockstor will do a smart check frequently while using the control panel, regardless of whether the drive is mounted to anything. The best answer is unfortunately to remove it physically... or not use any program that might wake it up, including S.M.A.R.T. monitors.
– Ray Foss
Feb 21 '18 at 23:32
add a comment |
To further build upon samiam's answer, you can set udev rules to do these things for you.
For this example, you'd have to fill in a file in /etc/udev/rules.d
(ideally name it something along the lines of 45-sdX-power.rules
to respect the conventions, but it doesn't really matter...), with the following:
ACTION=="add", SUBSYSTEM=="block", KERNEL=="sdX", ATTRqueue/rotational=="1", RUN+="/path/to/hdparm -S 1 /dev/sdX"
where you will need to fill in sdX
and provide the full path to the hdparm
binary (which hdparm
).
This will automatically stop your drive from spinning after 5 seconds of inactivity whenever your laptop boots.
This is ideal for a dual boot disk (my case), and backup disks you only startup once a week or so (in which case just mounting it before issuing your backup will turn it on and it will be off the rest of the time).
As for hdparm -Y /dev/sdX
, it is less useful here as it only stops the disk from spinning once, after which any access to the disk (like mounting it) will re-start it and you will have to issue the command again.
add a comment |
To further build upon samiam's answer, you can set udev rules to do these things for you.
For this example, you'd have to fill in a file in /etc/udev/rules.d
(ideally name it something along the lines of 45-sdX-power.rules
to respect the conventions, but it doesn't really matter...), with the following:
ACTION=="add", SUBSYSTEM=="block", KERNEL=="sdX", ATTRqueue/rotational=="1", RUN+="/path/to/hdparm -S 1 /dev/sdX"
where you will need to fill in sdX
and provide the full path to the hdparm
binary (which hdparm
).
This will automatically stop your drive from spinning after 5 seconds of inactivity whenever your laptop boots.
This is ideal for a dual boot disk (my case), and backup disks you only startup once a week or so (in which case just mounting it before issuing your backup will turn it on and it will be off the rest of the time).
As for hdparm -Y /dev/sdX
, it is less useful here as it only stops the disk from spinning once, after which any access to the disk (like mounting it) will re-start it and you will have to issue the command again.
add a comment |
To further build upon samiam's answer, you can set udev rules to do these things for you.
For this example, you'd have to fill in a file in /etc/udev/rules.d
(ideally name it something along the lines of 45-sdX-power.rules
to respect the conventions, but it doesn't really matter...), with the following:
ACTION=="add", SUBSYSTEM=="block", KERNEL=="sdX", ATTRqueue/rotational=="1", RUN+="/path/to/hdparm -S 1 /dev/sdX"
where you will need to fill in sdX
and provide the full path to the hdparm
binary (which hdparm
).
This will automatically stop your drive from spinning after 5 seconds of inactivity whenever your laptop boots.
This is ideal for a dual boot disk (my case), and backup disks you only startup once a week or so (in which case just mounting it before issuing your backup will turn it on and it will be off the rest of the time).
As for hdparm -Y /dev/sdX
, it is less useful here as it only stops the disk from spinning once, after which any access to the disk (like mounting it) will re-start it and you will have to issue the command again.
To further build upon samiam's answer, you can set udev rules to do these things for you.
For this example, you'd have to fill in a file in /etc/udev/rules.d
(ideally name it something along the lines of 45-sdX-power.rules
to respect the conventions, but it doesn't really matter...), with the following:
ACTION=="add", SUBSYSTEM=="block", KERNEL=="sdX", ATTRqueue/rotational=="1", RUN+="/path/to/hdparm -S 1 /dev/sdX"
where you will need to fill in sdX
and provide the full path to the hdparm
binary (which hdparm
).
This will automatically stop your drive from spinning after 5 seconds of inactivity whenever your laptop boots.
This is ideal for a dual boot disk (my case), and backup disks you only startup once a week or so (in which case just mounting it before issuing your backup will turn it on and it will be off the rest of the time).
As for hdparm -Y /dev/sdX
, it is less useful here as it only stops the disk from spinning once, after which any access to the disk (like mounting it) will re-start it and you will have to issue the command again.
answered Feb 16 '16 at 15:47
aznashwanaznashwan
211
211
add a comment |
add a comment |
Short lookup in gnome-disk-utility repo code, and:
udisksctl power-off -b /dev/sdX
Works in Ubuntu and Mint. In ArchLinux, /usr/bin/udisksctl is owned by udisks2 package.
Source: Superuser SE answer
add a comment |
Short lookup in gnome-disk-utility repo code, and:
udisksctl power-off -b /dev/sdX
Works in Ubuntu and Mint. In ArchLinux, /usr/bin/udisksctl is owned by udisks2 package.
Source: Superuser SE answer
add a comment |
Short lookup in gnome-disk-utility repo code, and:
udisksctl power-off -b /dev/sdX
Works in Ubuntu and Mint. In ArchLinux, /usr/bin/udisksctl is owned by udisks2 package.
Source: Superuser SE answer
Short lookup in gnome-disk-utility repo code, and:
udisksctl power-off -b /dev/sdX
Works in Ubuntu and Mint. In ArchLinux, /usr/bin/udisksctl is owned by udisks2 package.
Source: Superuser SE answer
answered Apr 5 at 19:52
CrollCroll
172111
172111
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.
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%2f112117%2fshutdown-my-backup-hard-disk-on-linux-when-i-dont-use-it%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