-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
smartctl --all /dev/sda make reads and no spin down #70
Comments
Hi adelolmo, |
That's possible. |
Not my situation, udisks2 never installed. |
You need to change This should do the trick: Keep in mind smartctl will return an error (2) due to the drive sleeping. |
Did not help. |
Now I've got version 1.18 and it looks like any smartctl make reads. |
Can confirm what @prchal mentioned above, even when the drive is already in standby (done manually by calling hdparm -y) it still counts reads. This means that you cannot use any smart monitoring (smartmontools or munin etc) with hd-idle at the moment: Unfortunately Im not even sure how ~# cat /sys/block/sda/stat | awk '{ print $3 }'
32594596872
~# /usr/sbin/smartctl -n standby -i /dev/sda
smartctl 7.2 2020-12-30 (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org
Device is in STANDBY mode, exit(2)
~# cat /sys/block/sda/stat | awk '{ print $3 }'
32594596873
~# hdparm -C /dev/sda
/dev/sda:
drive state is: standby |
I'm not sure if this is the exact issue here but I wanted to share what fixed it for me. I was having this issue (smartctl causing reads on the device and not allowing spindown). I poked around the issues in the repo and came across this #38 I was not using partitions for my devices. I partitioned and formatted the partition of these devices and then hd-idle was able to detect partition reads only and it would splin down devices while smartctl would probe the device. Now this obviously won't be an option if you have a LUKS encrypted device, but something to consider for anyone reading this and having similar issues. |
same here - partitionless drives are not spun down automatically, but when spinning them down (with -t) they stay in standby. something is incorrectly accounted as disk activity by hd-idle.
other system with same configuration, but disks partitioned - hd-idle is correctly spinning them down.
|
First of all I have to apologize for not being responsive at all: After reading this issue (and some others) many times, I'm starting to grasp what's this about.
|
Hi, still not solved, but postponed to "sometimes".
You might be right, I don't have a partition on affected disk.
So, is there only solution to reformat disk with at least one partition?
…On 02. 11. 23 9:16, Andoni del Olmo Elizari wrote:
First of all I have to apologize for not being responsive at all:
I'm sorry!
After reading this issue (and some others) many times, I'm starting to
grasp what's this about.
This is my current understanding:
* Monitoring disk tools (like smartmontools) increase reads in
|/proc/diskstats|.
* If the disk has partitions the reads go to the disk level. hd-idle
relays on the partitions' activity to determine activity. So all
good here.
* If the disk has *no* partitions the reads go also to the disk level,
but hd-idle relays on the disk to determine activity. Therefore
hd-idle is mislead and believes there's disk activity.
—
Reply to this email directly, view it on GitHub
<#70 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABIS2CREOZ2WSI6FJ3B75ADYCNJFFAVCNFSM5P54LJ32U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCNZZGAZDMMBZGI3A>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Currently I only see two options to proceed here:
This is all mentioned here: #70 (comment) Where option 1 would be the easiest to implement from my side, I see the value for users to implement option 2.
@prchal Currently yes, that's the only solution if you want to keep disk monitoring tools. |
Hi,
I use command periodically (60s) to get temperature of disk:
smartctl --all /dev/sda | awk '/Temperature_Celsius/ {print $10}'
but hd-idle reports reads and thus won't spin down:
disk=sda command=scsi spunDown=false reads=39880915 writes=33187968 idleTime=77 idleDuration=8 spindown=0001-01-01T00:00:00 spinup=2022-03-04T16:28:55 lastIO=2022-03-04T16:32:00 disk=sda command=scsi spunDown=false reads=39880923 writes=33187968 idleTime=77 idleDuration=0 spindown=0001-01-01T00:00:00 spinup=2022-03-04T16:28:55 lastIO=2022-03-04T16:32:16 disk=sda command=scsi spunDown=false reads=39880923 writes=33187968 idleTime=77 idleDuration=8 spindown=0001-01-01T00:00:00 spinup=2022-03-04T16:28:55 lastIO=2022-03-04T16:32:16 disk=sda command=scsi spunDown=false reads=39880923 writes=33187968 idleTime=77 idleDuration=15 spindown=0001-01-01T00:00:00 spinup=2022-03-04T16:28:55 lastIO=2022-03-04T16:3
If I spun disk down manually it stays down and reading temp works too.
Is there any solution of this?
Thanks Jiri
The text was updated successfully, but these errors were encountered: