Jump to content

Avoid disk spin-up after resume from suspend (S3)


Recommended Posts

Hello community,

 

I've created a script which is putting my server into sleep (s3) after quite some time, if not used. I also let my HDDs spin down, if not used (in a shorter period of time of course).

When I reactivate the server, e.g. with WOL all Hard Disks will spin up. I would like to prevent this and keeping them in standby mode unless I'll access them.

 

Things I've tried so far:

  1. using "hdparm -s" to enable PUIS
  2. set "/sys/block/sdi/device/scsi_disk/*/manage_start_stop" to 0 (stopping the kernel sd (scsi disk) driver to starting the disk after suspend-exit)
  3. deleting the drive by "echo 1 > /sys/block/<devnode>/device/delete"

 

After the first two steps, when the drive was in standby and the system was suspended and reactivated it still spun up, but actually a bit later (3-5sec) as before. Dsmeg shows, that sd starting all disks but not the desired one. So this is working at least. I think something else keeps spinning the disk up.

After deleting the drive by step 3, it did not spun up. Problem here is, that I cant find the disk again by unsing 'echo "- - -" > /sys/class/scsi_host/host<n>/scan', which does not work at all. But I think this shows, that it is really the kernel or something, which keep spinning the disks up and not the BIOS/UEFI. 

 

I hope someone can help. 

Edited by joie95
Link to comment
  • joie95 changed the title to Avoid disk spin-up after resume from suspend (S3)
  • 3 weeks later...
  • 2 months later...

I have researched this topic. This is a main board issue. You have to mod the bios to keep the disks in standby.

There was somebody how did try to fix this and found a hard disk access inside the Linux kernel which is necessary to initialize the disk. For testing, he did remove it completely as POC and deploy his test kernel. Unfortunately this didn't help, during wake up there were some bios related stuff involved which he couldn't disable.

 

I don't have the reference anymore, but his hack was to physically disconnect the SATA connection partially or completely during this process. But I don't know if this was an idea or if he actually did deploy an Arduino to do this.

 

Maybe modern systems does not do this anymore, and you need to revisit the kernel mod?

Edited by Falcosc
Link to comment
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...