Is there a way to monitor drive sleep/access?

taltamir

Dabbler
Joined
Aug 2, 2022
Messages
28
I have a 2 drive mirror vdev (vids) used exclusively for storing videos that are accessed roughly once per week. They are accessed via jellyfin.
It occurred to me that with such infrequent access it might be viable to let those specific drives spindown and sleep when not in use.
Jellyfin itself is installed on the main vdev (tank) with all the other apps.

However, while I believe it should be a perfect scenario for using spindown, I am not 100% certain.
Maybe jellyfin regularly touches the files and that would wake it up? I don't know.

I wanted to know if there is a way to log either drive access times, or a way to log when the drive goes to sleep and wakes up. I figured a few days of logging when the drive wakes up and goes to sleep would let me know if my presumptions are correct or if I am wildly off and need to disable sleep mode on those drives.

Is there such a logger available somewhere for truenas scale?
 

taltamir

Dabbler
Joined
Aug 2, 2022
Messages
28
So, jellyfin does check the video directories for changes every 12 hours. which I can disable, and might need to disable if I want them to spin down.
But in order to find more instances of such events it would be best to use a logging tool
 

Conker

Cadet
Joined
Jun 23, 2022
Messages
5
You can check a drives active/idle/sleep Status with:
Code:
hdparm -C /dev/sdX

and change the X to your drive.
You can also Monitor multiple Drives like this:
Code:
hdparm -C /dev/sda; hdparm -C /dev/sdb; hdparm -C /dev/sdc; hdparm -C /dev/sdd

i checked my drives behavior manually first couple Hours/days like that.

with that you can create a Script to log into a File also, but i never did this.
 
Top