Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
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.
|
 |
12-14-2004, 09:44 AM
|
#1
|
Member
Registered: Aug 2003
Location: Akron, OH
Distribution: Fedora Core 3
Posts: 185
Rep:
|
How to turn off disk drive?
i have a second disk drive in my pc that i want to turn off but keep the ability to turn back on when needed. i unmounted all the filesystems on the drive and commented them out in fstab. i suspended the drive with hdparm -Y and when the drive kept waking back up eventually figured out to take it out of the smartdrive monitor (commented out the appropriate line in /etc/smartd.conf). at that point the drive stayed off until i tried to reboot at which point things went very badly. the machine hung on the shutdown and i had to do a hard reset (power off/on). after an ugly 20-minute reboot where all the filesystems had to be checked the thing came back up with all of the filesystems on the second drive online. so it actually modified fstab where i had commented them out. what does it take to turn off a disk drive?
|
|
|
12-14-2004, 12:07 PM
|
#2
|
Senior Member
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577
Rep:
|
well DUH............
Code:
-Y Force an IDE drive to immediately enter the lowest power con-
sumption sleep mode, causing it to shut down completely. A hard
or soft reset is required before the drive can be accessed again
(the Linux IDE driver will automatically handle issuing a reset
if/when needed). The current power mode status can be checked
using the -C flag.
it says right in the man page what will happen when you use the -Y flag....did you NOT read all of it..................??
Last edited by 320mb; 12-14-2004 at 12:08 PM.
|
|
|
12-14-2004, 12:11 PM
|
#3
|
Member
Registered: Nov 2004
Location: UK
Distribution: Gentoo
Posts: 61
Rep:
|
Perhaps you got confused with the lowercase y, which will turn the hard drive off until it's next accessed.
|
|
|
12-14-2004, 12:14 PM
|
#4
|
Member
Registered: Sep 2003
Distribution: Debian
Posts: 213
Rep:
|
Why not use something like:
hdparm -S 60 /dev/hdb
A timeout value comes handy if you need to do rebooting in series for some testing reasons or so.
Last edited by PMorph; 12-14-2004 at 12:20 PM.
|
|
|
12-14-2004, 01:37 PM
|
#5
|
Member
Registered: Aug 2003
Location: Akron, OH
Distribution: Fedora Core 3
Posts: 185
Original Poster
Rep:
|
perhaps i didn't make myself clear. i want the drive to STAY OFF. i don't want it to be necessary for the drive to be running for the machine to shutdown and i don't want the drive coming back up on reboot.
|
|
|
12-14-2004, 02:08 PM
|
#6
|
Member
Registered: Sep 2003
Distribution: Debian
Posts: 213
Rep:
|
It will stay OFF through shutdown if you haven't mounted any partitions on it.
Reboot is a tricky one.. I think it will start up in any case (I'd worry if it didn't :-)
|
|
|
12-14-2004, 02:33 PM
|
#7
|
Member
Registered: Aug 2003
Location: Akron, OH
Distribution: Fedora Core 3
Posts: 185
Original Poster
Rep:
|
i believe the drive being suspended is what caused the last shutdown to hang despite having unmounted the filesystems and commented out the fstab entries. i suppose i'll have to disconnect the drive if that's what it takes to turn it off completely. the only reason i'm keeping it around is because that's my ms-windows install. my goal is to not ever have to use it, but there's still a few things that can only be done in windows (unfortunately).
|
|
|
12-14-2004, 03:49 PM
|
#8
|
Member
Registered: Aug 2003
Location: Akron, OH
Distribution: Fedora Core 3
Posts: 185
Original Poster
Rep:
|
i tested the shutdown again (twice) with the drive suspended and this time it behaved a little better. it wakes the drive up after a timeout and then proceeds with the shutdown. it reboots ok and brings up both drives. so i'm going to atttribute the original case that hung to a fluke.
so the procedure is to suspend the drive after reboot and wake prior to shutdown. if i forget to wake the drive prior to shutdown it should still work (as the last two tests have shown) but for the fluke chance that it hangs, i've taken an additional measure to avoid the long annoying process of doing fsck on all the filesystems which is that i converted them to ext3 (i believe the journaling eliminates the fsck on reboot after a crash). so this should resolve the problem for the most part.
|
|
|
All times are GMT -5. The time now is 07:07 PM.
|
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
|
|