December 26, 201213 yr For the last couple of months I have noticed that my drives appear to be spun up a lot, I have not payed to much attention to it but am now trying to get to the bottom of it. I have set up inotify as explained by Joe in the following thread: http://lime-technology.com/forum/index.php?topic=17449.msg157730#msg157730 I have spun 3 drives down (1, 2 and 3) and have activated inotify on the drive mountpoint: inotifywait -mr /mnt/disk1 inotifywait -mr /mnt/disk2 inotifywait -mr /mnt/disk3 I have sit there waiting to see if the spun up indicator changes. All indicators have shown the message that indicated that inotify is watching: root@Tower:~# inotifywait -mr /mnt/disk3 Setting up watches. Beware: since -r was given, this may take a while! Watches established. At the moment drive 1 and 3 are spun up again but both inotify screens have not shown any activity, drive 2 is still spun down but I have seen activity there: /mnt/disk2/Movies/Alvin and the Chipmunks - The Squeakquel/ CLOSE_NOWISDIR /mnt/disk2/Movies/ OPEN,ISDIR Black Sheep /mnt/disk2/Movies/Black Sheep/ OPEN,ISDIR /mnt/disk2/Movies/ CLOSE_NOWRITE,CLOSE,ISDIR Black Sheep /mnt/disk2/Movies/Black Sheep/ CLOSE_NOWRITE,CLOSE,ISDIR /mnt/disk2/Movies/ OPEN,ISDIR Prometheus /mnt/disk2/Movies/Prometheus/ OPEN,ISDIR /mnt/disk2/Movies/ CLOSE_NOWRITE,CLOSE,ISDIR Prometheus /mnt/disk2/Movies/Prometheus/ CLOSE_NOWRITE,CLOSE,ISDIR /mnt/disk2/Movies/ OPEN,ISDIR Awaydays /mnt/disk2/Movies/Awaydays/ OPEN,ISDIR /mnt/disk2/Movies/ CLOSE_NOWRITE,CLOSE,ISDIR Awaydays /mnt/disk2/Movies/Awaydays/ CLOSE_NOWRITE,CLOSE,ISDIR /mnt/disk2/Movies/ OPEN,ISDIR Pandorum /mnt/disk2/Movies/Pandorum/ OPEN,ISDIR /mnt/disk2/Movies/ CLOSE_NOWRITE,CLOSE,ISDIR Pandorum /mnt/disk2/Movies/Pandorum/ CLOSE_NOWRITE,CLOSE,ISDIR /mnt/disk2/Movies/ OPEN,ISDIR End Game /mnt/disk2/Movies/End Game/ OPEN,ISDIR /mnt/disk2/Movies/ CLOSE_NOWRITE,CLOSE,ISDIR End Game /mnt/disk2/Movies/End Game/ CLOSE_NOWRITE,CLOSE,ISDIR I am wondering what to do right now.. Before I started inotify I allready worked on turning off anything that might be indexing something on the drives. Any help is appreciated.
December 26, 201213 yr Author Not sure about the 15 mins, i have spin up groups disabled.. It happens with all my drives, I picked these three at random ..
December 26, 201213 yr Not sure about the 15 mins, i have spin up groups disabled.. It happens with all my drives, I picked these three at random .. If you have a lot of files, you might need to increase the max number of watches with something like this: echo "100000" >/proc/sys/fs/inotify/max_user_watches You might try a watch on /mnt/user Joe L.
December 26, 201213 yr Author Not sure about the 15 mins, i have spin up groups disabled.. It happens with all my drives, I picked these three at random .. If you have a lot of files, you might need to increase the max number of watches with something like this: echo "100000" >/proc/sys/fs/inotify/max_user_watches You might try a watch on /mnt/user Joe L. I had one disk with to many dirs, that gives a clear errormessage, as far as I understand, as soon as itnotify tells you the watches are set then they are... Can there be a difference in setting inotify on a disk share opposite a user share ? Meaning: If I write a file to a user share that is on disk1, will inotify find the disk access when watching disk 1 ?
December 26, 201213 yr If I write a file to a user share that is on disk1, will inotify find the disk access when watching disk 1 ? I do not know the answer, but I'll bet you can find out with a few simple tests now that you have inotifywatch in place. Nor do I know if it will spot a spinup command from emhttp or hdparm.
December 26, 201213 yr I found the OPEN,ISDIR and CLOSE_NOWRITE,CLOSE,ISDIR events are fired constantly on every disk in the array, even when spinned down, so this is probably not the events you want to look for, this must be some sort of default system-events. Unraid or linux is probably scanning everything always at all times for some process. If you would use the command inotifiwait -rm on *any* disk, you will see those messages everywhere, also on disks that are spinned down (spun down?). Those are probably not the messages you are looking for if you want to find activity-out-of-the-ordinary. What you want to look for are files that are actually accessed or modified by something. If you use: inotifywait -mr -e access -e modify /mnt/disk1 you will see if a file or folder is actually being accessed or altered, without the massive OPEN,ISDIR and CLOSE_NOWRITE messages cluttering your view.
December 27, 201213 yr I found the OPEN,ISDIR and CLOSE_NOWRITE,CLOSE,ISDIR events are fired constantly on every disk in the array, even when spinned down, so this is probably not the events you want to look for, this must be some sort of default system-events. Unraid or linux is probably scanning everything always at all times for some process. If you would use the command inotifiwait -rm on *any* disk, you will see those messages everywhere, also on disks that are spinned down (spun down?). Those are probably not the messages you are looking for if you want to find activity-out-of-the-ordinary. What you want to look for are files that are actually accessed or modified by something. If you use: notifywait -mr -e access -e modify /mnt/disk1 you will see if a file or folder is actually being accessed or altered, without the massive OPEN,ISDIR and CLOSE_NOWRITE messages cluttering your view. Any program that indexes disks would constantly scan the directories, or you might have installed cache_dirs. It too just scans the directories constantly. If all the directory information is in the disk buffer cache, then the disks can be spun down and they will not be physically accessed. As said, they are probably looking for something actually accessing or altering a file or directory. Good luck. You have the tool needed.
December 27, 201213 yr Good point, i have directory caching installed. That probably causes the excessive events that clutters up inotifywait's logging. Caching dir's does not spin up drives, so to find out what is actually causing spin-up, it is probably a good idea to disable any directory caching prior to use the inotifywait tool.
December 27, 201213 yr Author Thanks for the help guys ! I am curious about what I will find on this quest... Sofar I have disabeld cache_dirs and have now setup inotify to watch my Movies, Series and Users share. Allready caught something... My Series share is beiing scanned. I use My Movies but have disabled it. Question now is what is doing the accessing.. I have an AppleTV running Crystalbuntu (XBMC) but have set it up in such a way that it does not update its library constantly. Just to be sure I pulled its plug and the accessing is continuing, so that cannot be it..
December 27, 201213 yr Author MMmmm.. Now I see activity on the user share, a fileset of my girlfriend is beiing accessed, she is not online so it must be something from my own running windows.. Weird thing is that I also just now saw 1 directory getting accessed from my movies share, not a new dir, an older movie I have had for some time. And only this one directory got accessed..
December 27, 201213 yr maybe couchpotato or sickbeard? i thought they have to scan files periodically for existing files to see what was added.
December 27, 201213 yr Author Thats a good one.... that must be it... ! Also noticed a nice windows feature... It is enough to hover my mousecursor over a directory to get drive activity, no need to click :-)
December 27, 201213 yr Author Seems that couch and sick both do not let me view/change these settings.. shame..
December 27, 201213 yr This is why i installed an ssd, not as traditional 'cache' drive but as a non-mechanical 'working' disk where i installed things like sickbeard, sabnzbd, squeezeserver, dropbox... so all those sorts of apps don't spinup a 'real' drive when they have to do the things they do... also the ssd is my temporary download 'folder' so only when something is downloaded and about to get moved to a movie or tvserie folder, it is actually written to a physical disk in the array.
December 27, 201213 yr This is why i installed an ssd, not as traditional 'cache' drive but as a non-mechanical 'working' disk where i installed things like sickbeard, sabnzbd, squeezeserver, dropbox... so all those sorts of apps don't spinup a 'real' drive when they have to do the things they do... also the ssd is my temporary download 'folder' so only when something is downloaded and about to get moved to a movie or tvserie folder, it is actually written to a physical disk in the array. well yea Helmonder have them installed in a ssd cache drive and so do i. but my point is that couchpotato and sickbeard probably need to scan existing files in physical hdd's to refresh their existing library..
December 27, 201213 yr Thats a good one.... that must be it... ! Also noticed a nice windows feature... It is enough to hover my mousecursor over a directory to get drive activity, no need to click :-) Sounds like a bug to me. (they are probably trying to minimize the time it takes to get a listing "if" you did click on it)
December 27, 201213 yr but my point is that couchpotato and sickbeard probably need to scan existing files in physical hdd's to refresh their existing library.. True, but that is only once on setup, to create a library of everything you allready have, after that it just updates its library (on the ssd) with new downloaded stuff and doesnt scan anything. Sabnzbd uses an API call to inform sickbeard that it has downloaded the episode sickbeard ordered it to in the first place.
December 27, 201213 yr Ya, I can confirm that Sick, SAB, and Couch do not constantly scan drives. SAB monitors a directory you give it but even that doesn't seem to keep my drive spun up for some reason. I run cache dirs too and my drives still sleep...
December 28, 201213 yr Author This is why i installed an ssd, not as traditional 'cache' drive but as a non-mechanical 'working' disk where i installed things like sickbeard, sabnzbd, squeezeserver, dropbox... so all those sorts of apps don't spinup a 'real' drive when they have to do the things they do... also the ssd is my temporary download 'folder' so only when something is downloaded and about to get moved to a movie or tvserie folder, it is actually written to a physical disk in the array. That is the same setup I have... SABnzbd, Couchpotatoe, Sickbeard, Transmission and Spotweb all run off my SSD. I started out using the SSD for cache, but in the end I am now using it as an off-array disk. I have also set everything up to download on the SSD, after completion of a download that download is moved to a share (NewMovies) limited to one disk (disk8). I have a MOVIES share that is spread among more drives (But not disk8), whenever I think it is needed I move stuff out of NewMovies towards Movies. My XBMC only does automatic updates on NewMovies, it does not scan MOVIES unless I tell it to. I also have my "My Documents" folder on disk8 as well as the continuous backup (Genie Timeline) that runs on my pc. The whole setup is set up to have no disks spinning unless I use the system, at that point disk8 and parity will spin up. Cache_Dirs ofcourse also enabled, including user shares. So that it is a bit frustrating to me why I have disks spun up.. I am kind of tempted to start inotify in screen and then pull the ethernetcable, kind of a sledgehammer approach to finding out if the traffic is made from inside the array or from outside... I actually am pretty sure that it is generated within the unraid system, my disks are also spun up whenever I take my pc out of hibernation...
December 28, 201213 yr I am kind of tempted to start inotify in screen and then pull the ethernetcable, kind of a sledgehammer approach to finding out if the traffic is made from inside the array or from outside... I actually am pretty sure that it is generated within the unraid system, my disks are also spun up whenever I take my pc out of hibernation... Just turn off any folder caching and run the inotifywait as shown by Joe, and you'll find out soon enough what is causing it. I had some 'mysterious' spinups every hour as well, i could not imagine what could cause it, turned out it was my mac's timemachine making a backup every hour on the array I don't have ' my documents' on the array, but on a disk in my mac (i run windows using parallels desktop). I dont want to spin up the array for every file windows or mac touches... So all my data (mac + windows) is basically primary on the mac's harddisk, but i do an automated incremental backup every week on the array.
December 28, 201213 yr Author I am kind of tempted to start inotify in screen and then pull the ethernetcable, kind of a sledgehammer approach to finding out if the traffic is made from inside the array or from outside... I actually am pretty sure that it is generated within the unraid system, my disks are also spun up whenever I take my pc out of hibernation... Just turn off any folder caching and run the inotifywait as shown by Joe, and you'll find out soon enough what is causing it. I had some 'mysterious' spinups every hour as well, i could not imagine what could cause it, turned out it was my mac's timemachine making a backup every hour on the array You might have read that I did that... I saw some stuff happening but still do not know what caused it :-)
December 28, 201213 yr What i do is spin down all disks, disable folder caching, disable all 'known' apps (sick/sab/dropbox etc) and start the inotifywait on the 'problem' disks. The folders/files logged and the time/timespan it occures should give you an idea about what is causing it...
Archived
This topic is now archived and is closed to further replies.