Ubuntu – How to turn off hard drive in Ubuntu

dual-bootexternal-hddhard drivepower-managementusb-drive

I am running Kubuntu from External Hard Drive. My Internal Hard Drive has Windows on it. I don't want to use it while on Ubuntu and want to turn it off to produce less heat as well consume lower battery. I think spinning down hard drive isn't an option for me. Because, it wear out the hard drive and I don't plan to spend on HDD's :)

Best Answer

sudo hdparm -Y /dev/sdX

where /dev/sdX is the device you'd like to turn off. You can also run sudo blkid to determine the device's 'fingerprint' (UUID), which would allow you to more reliably control which device is being turned off.

In this case, you'd run:

sudo hdparm -Y /dev/disk/by-uuid/DEVICE-IDENT-HERE

man hdparm

   -Y     Force  an  IDE  drive  to  immediately  enter  the  lowest power
          consumption 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 option.