LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
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


Reply
  Search this Thread
Old 05-13-2011, 04:46 AM   #1
papul1993
Member
 
Registered: Aug 2010
Location: India
Distribution: Archlinux
Posts: 56

Rep: Reputation: 1
How to turn off secondary hdd?


Hi,
I recently purchased a new 1TB seagate harddisk to store backups of my music, movies etc. I use paid software in Windows 7 to manage backups. However I run the software once every month and so the hard disk gets used only then. Rest of the time it just remains idle. And I use linux most of the time and the secondary hard disk is never mounted on linux. So I just wanted to know if there was a way to shutdown the second hard disk using linux. I dont want it spinning uselessly when I am using linux.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 05-13-2011, 08:22 AM   #2
bsdunix
Senior Member
 
Registered: May 2006
Distribution: BeOS, BSD, Caldera, CTOS, Debian, LFS, Mac, Mandrake, Red Hat, Slackware, Solaris, SuSE
Posts: 1,761

Rep: Reputation: 80
I presume your talking about an internal hard disk? If so, I don't know of any way in Linux to power down a secondary internal hard disk.

As soon as you turn on your computer, power is already going to the internal disk whether it's mounted or not so long as a power cable is connected to it. Unless your secondary hard drive is inefficient and consumes a lot watts, the amount of power it draws at idle is very negligible.

You could always just open your computer case and unplug the disk's power connector when not in use, just make sure the whole computer is powered off and the AC cord is unplugged so you don't shock yourself.
 
Old 05-13-2011, 08:40 AM   #3
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
You can shutdown that disk with hdparm. Have a look at the -S option.
 
2 members found this post helpful.
Old 05-13-2011, 11:33 AM   #4
bsdunix
Senior Member
 
Registered: May 2006
Distribution: BeOS, BSD, Caldera, CTOS, Debian, LFS, Mac, Mandrake, Red Hat, Slackware, Solaris, SuSE
Posts: 1,761

Rep: Reputation: 80
Thanks for that, I learned something.
 
Old 05-13-2011, 10:53 PM   #5
cascade9
Senior Member
 
Registered: Mar 2011
Location: Brisneyland
Distribution: Debian, aptosid
Posts: 3,753

Rep: Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935
Unless you are running odd BIOS settings, the HDD spins down after 'X' amount of time (normally about 30 minutes IIRC). Setting the spin-down time in the BIOS isnt hard, its normally under 'power management'.
 
Old 05-14-2011, 04:58 AM   #6
papul1993
Member
 
Registered: Aug 2010
Location: India
Distribution: Archlinux
Posts: 56

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by bsdunix View Post
I presume your talking about an internal hard disk? If so, I don't know of any way in Linux to power down a secondary internal hard disk.

As soon as you turn on your computer, power is already going to the internal disk whether it's mounted or not so long as a power cable is connected to it. Unless your secondary hard drive is inefficient and consumes a lot watts, the amount of power it draws at idle is very negligible.

You could always just open your computer case and unplug the disk's power connector when not in use, just make sure the whole computer is powered off and the AC cord is unplugged so you don't shock yourself.
I know that but I don't want to disconnect and connect it every week I run backups.
 
Old 05-14-2011, 05:05 AM   #7
papul1993
Member
 
Registered: Aug 2010
Location: India
Distribution: Archlinux
Posts: 56

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by TobiSGD View Post
You can shutdown that disk with hdparm. Have a look at the -S option.
Can you please tell me how to set the spin down time on hdparm? I want to set the time to 10 mins. The encoding of timeout value is odd and I couldn't figure out anything after reading the man pages.
 
Old 05-14-2011, 08:10 AM   #8
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Try (as root) hdparm -S 1 /dev/sdb (or whatever the disk is labelled as)
The disk should spin down after 5s and remain like that until it is next accessed.
 
Old 05-14-2011, 03:39 PM   #9
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
For 10 minutes you need a value of 120.
 
Old 05-15-2011, 07:35 AM   #10
papul1993
Member
 
Registered: Aug 2010
Location: India
Distribution: Archlinux
Posts: 56

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by tredegar View Post
Try (as root) hdparm -S 1 /dev/sdb (or whatever the disk is labelled as)
The disk should spin down after 5s and remain like that until it is next accessed.
Is this change permanent or do I have to run this command after every boot?
 
Old 05-15-2011, 07:59 AM   #11
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
You will have to do that after every boot. If you want the command to be run automatically just add it to your rc.local-file.
 
Old 05-15-2011, 12:35 PM   #12
papul1993
Member
 
Registered: Aug 2010
Location: India
Distribution: Archlinux
Posts: 56

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by TobiSGD View Post
You will have to do that after every boot. If you want the command to be run automatically just add it to your rc.local-file.
Isn't there some file which I can edit to make this change permanent? BTW do I need to add sudo before the command when I place in rc.local?
 
Old 05-15-2011, 12:38 PM   #13
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
You can't make that permanent, the drive resets when you boot/reboot the machine.
All commands in rc.local run as root, so you don't need sudo.
 
  


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
[SOLVED] Can't Find Secondary HDD Mikester Linux - Hardware 4 09-03-2007 02:23 AM
How do I install a secondary HDD? Torsten Slackware 2 05-31-2007 07:39 PM
secondary hdd bytez Linux - Software 6 05-22-2007 06:58 PM
[RAID1, GRUB] Secondary HDD can't boot up when primary HDD fails Akhran Linux - Newbie 2 05-04-2006 04:17 AM
Mounting Secondary HDD nairnie Linux - Newbie 7 11-17-2003 07:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 06:25 AM.

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