December 24, 200916 yr I have been running 4.5 now for a few weeks and it seems that at least one of my drives (#1 in my array) is not spinning down. There is constant writing and reading to it and to the parity drives. Also, I noticed that folders on the cache drive, although long written to the array are still there, and even after I delete them physically, they return on their own. Are these two "issues" related and how do I fix them both?
December 24, 200916 yr Have you tried using "lsof" to see what processes are reading/writing to the drive(s)?
December 24, 200916 yr Author Have you tried using "lsof" to see what processes are reading/writing to the drive(s)? I am sorry, but I am rather a novice with Linux and the unRAID, beyond the basic interface. Can you be a little more specific as to the command and how to use it? Just a little guidance and hopefully I can take it from there. Can I SSH into unRAID? If yes, a little help into ssh protocol for unRAID, please! Thanks.
December 24, 200916 yr Author I am doing parity check now and will post the result of lsof after it is completed.
December 24, 200916 yr I am doing parity check now and will post the result of lsof after it is completed. You do not need to wait... the "lsof" command will work regardless. You will need to try two different commands, since disk2 can be accessed via either the user-shares of directly as disk1. lsof /mnt/user lsof /mnt/disk1 report back with the output from them. If no files are being accessed, there will be no output. Joe L.
December 24, 200916 yr Author Joe, Since it will probable be best to just copy and paste the output, how can I ssh into the unRAID?
December 24, 200916 yr Joe, Since it will probable be best to just copy and paste the output, how can I ssh into the unRAID? I honestly don't know if you can "ssh" into the server, but you can use "telnet" (I think "ssh" would have to be installed and configured as a user add-on before it would be available) Log onto the system console as "root" or log in via telnet as "root" Press the "Enter" key if you get a password prompt. (Or enter the correct password if you set one for "root") Then, at the shell prompt, type the two commands. They are pretty short, so you can cut-and -aste, or type them by hand. Joe L.
December 24, 200916 yr Joe, Since it will probable be best to just copy and paste the output, how can I ssh into the unRAID? Ssh is not installed by default, you can telnet to the machine just fine though and that will work to run these commands.
December 24, 200916 yr Author OK. Here is the output: Linux 2.6.31.6-unRAID. root@Tower:~# lsof /mnt/user COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME smbd 3530 root cwd DIR 0,13 48 7 /mnt/user/Family Pictures smbd 4629 root cwd DIR 0,13 1096 72621 /mnt/user/Applications smbd 17641 root cwd DIR 0,13 80 12 /mnt/user/Movies root@Tower:~# lsof /mnt/disk1 root@Tower:~# Does this make sense?
December 24, 200916 yr OK. Here is the output: Linux 2.6.31.6-unRAID. root@Tower:~# lsof /mnt/user COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME smbd 3530 root cwd DIR 0,13 48 7 /mnt/user/Family Pictures smbd 4629 root cwd DIR 0,13 1096 72621 /mnt/user/Applications smbd 17641 root cwd DIR 0,13 80 12 /mnt/user/Movies root@Tower:~# lsof /mnt/disk1 root@Tower:~# Does this make sense? Yes, it does. It shows that smbd (the SAMBA daemon process) has three processes currently active with their "cwd" (current working directory) on each of the three folders listed. There is no activity on disk1 at the time you issues the lsof command. (but there could have been within the time period you have for spin-down.) if you type /root/mdcmd status | grep "rdevLastIO" You will get a listing of the last time an I/O request was made to each of your disks. (The time will be 0 if spun down) The time will look odd, as it is the number of seconds since Jan 1st, 1970, but you can type a command to get the "current time" using the same format and then subtract to get the number of seconds since the last I/O. date +%s What add-ons, if any do you have installed? Are you running cache_dirs? Is your windows PC set to scan the disks for updates or indexing? Are you using a "thumbnail" view where it might need to refresh its thumbnail icons? Joe L.
December 24, 200916 yr Author Joe, I tried the commands that you listed and here is the output: root@Tower:~# date +%s 1261687949 Linux 2.6.31.6-unRAID. root@Tower:~# /root/mdcmd status | grep "rdevLastIO" Binary file (standard input) matches I have not installed anything extra, as far as I am aware on unRAID and do not know of anything that is accessing the drives at any give time. However, every time I check, there is read / write activity to the parity and Disk 1. I can try to turn off my main PC that has Win 7 running and see if that fixes the issue of constantly accessing that drive, though I am not sure if that is going to achieve anything as it is only those two drives always "running".
December 24, 200916 yr Joe, I tried the commands that you listed and here is the output: root@Tower:~# date +%s 1261687949 Linux 2.6.31.6-unRAID. root@Tower:~# /root/mdcmd status | grep "rdevLastIO" Binary file (standard input) matches I have not installed anything extra, as far as I am aware on unRAID and do not know of anything that is accessing the drives at any give time. However, every time I check, there is read / write activity to the parity and Disk 1. I can try to turn off my main PC that has Win 7 running and see if that fixes the issue of constantly accessing that drive, though I am not sure if that is going to achieve anything as it is only those two drives always "running". Forgot about the fact that the "status" has a null character at the end. Sorry. Need to pipe it through "strings" to get the binary character stripped off. /root/mdcmd status | strings | grep "rdevLastIO" Odds are it is Windows "indexing" your disk, or scanning it for updates of your media collection. If the parity disk is being kept spun up, then something is writing to disk1 too. Possibly it is windows updating a "thumbs.db" file. This command will show you the 50 most recently accessed files on disk1 ls /mnt/disk1 -R -l --time=atime --time-style=+%s | sort -n +5 | tail -50 Or, to see the most recently "written" ls /mnt/disk1 -R -l --time=ctime --time-style=+%s | sort -n +5 | tail -50 I'll be curious to see what you find. Joe L.
December 24, 200916 yr Author Joe, Thanks for all the help. I'll try your suggestions later on tonight and post. Happy Holidays!
December 25, 200916 yr Author Joe, I ran your suggested commands. The last two appeared identical, unless I am missing something. The system hangs for a while before output. Here is the output: Linux 2.6.31.6-unRAID. root@Tower:~# date +%s 1261715580 root@Tower:~# root@Tower:~# /root/mdcmd status | strings | grep "rdevLastIO" rdevLastIO.0=1261715597 rdevLastIO.1=0 rdevLastIO.2=1261714980 rdevLastIO.3=0 rdevLastIO.4=1261715597 rdevLastIO.5=1261714895 rdevLastIO.6=1261714895 rdevLastIO.7=0 root@Tower:~# Linux 2.6.31.6-unRAID. root@Tower:~# ls /mnt/disk1 -R -l --time=ctime --time-style=+%s | sort -n +5 | t ail -50 -rwx------ 1 root root 58216 1261712400 Lev-9j.jpg.tnj* -rwx------ 1 root root 52900 1261712402 Lev-9k.jpg.tnj* -rwx------ 1 root root 47304 1261712404 Lev-9l.jpg.tnj* -rwx------ 1 root root 39551 1261712406 Lev-9m.jpg.tnj* -rwx------ 1 root root 61909 1261712407 Lev-9z.jpg.tnj* -rwx------ 1 root root 18403 1261712408 residency100.tif.tnj* -rwx------ 1 root root 64804 1261712409 FRANZ-1.jpg.tnj* -rwx------ 1 root root 65706 1261712412 FRANZ-2.jpg.tnj* -rwx------ 1 root root 47403 1261712413 FRANZ-3.jpg.tnj* -rwx------ 1 root root 51581 1261712414 FRANZ-4.jpg.tnj* -rwx------ 1 root root 67710 1261712415 FRANZ-5.jpg.tnj* -rwx------ 1 root root 59179 1261712417 FRANZ-6.jpg.tnj* -rwx------ 1 root root 52293 1261712418 FRANZ-8.jpg.tnj* -rwx------ 1 root root 6059824 1261712420 The_Pussycat_Dolls_Hush_Hush_Remix_(I_ Will_Survive)_(Instrumental)_49196(2).mp3* -rwx------ 1 root root 4594134 1261712422 01\ A\ Change\ In\ Me.mp3* -rwx------ 1 root root 4885465 1261712423 Better\ In\ Time\ _\ Farrah\ Fin.mp3* -rwx------ 1 root root 4885465 1261712424 Better\ In\ Time\ _\ Farrah\ Voc.mp3* -rwx------ 1 root root 5858756 1261712425 Leona\ Lewis\ -\ Better\ in\ Time_192 .mp3* -rwx------ 1 root root 9763748 1261712426 Leona\ Lewis\ -\ Better\ in\ Time_320 .mp3* -rwx------ 1 root root 28131621 1261712427 Leona\ Lewis\ -\ Better\ in\ Time.fla c* -rwx------ 1 root root 39490 1261712442 1.tif.tnj* -rwx------ 1 root root 37627 1261712457 2.tif.tnj* -rwx------ 1 root root 34725 1261712460 3.tif.tnj* -rwx------ 1 root root 35764 1261712461 P0002909.JPG.tnj* -rwx------ 1 root root 35384 1261712462 P0002910.JPG.tnj* -rwx------ 1 root root 35881 1261712464 P0002913.JPG.tnj* -rwx------ 1 root root 37354 1261712465 P0002092.JPG.tnj* -rwx------ 1 root root 37582 1261712466 P0002096.JPG.tnj* -rwx------ 1 root root 34966 1261712467 P0002097.JPG.tnj* -rwx------ 1 root root 35634 1261712468 P0002099.JPG.tnj* -rwx------ 1 root root 38757 1261712469 P0002100.JPG.tnj* -rwx------ 1 root root 39910 1261712471 P0002070.JPG.tnj* -rwx------ 1 root root 33648 1261712472 P0002076.JPG.tnj* -rwx------ 1 root root 37034 1261712473 P0002081.JPG.tnj* -rwx------ 1 root root 32885 1261712474 P0002083.JPG.tnj* -rwx------ 1 root root 34960 1261712475 P0002982.JPG.tnj* -rwx------ 1 root root 35013 1261712477 P0002983.JPG.tnj* -rwx------ 1 root root 35682 1261712478 P0002984.JPG.tnj* -rwx------ 1 root root 35240 1261712479 P0002985.JPG.tnj* -rwx------ 1 root root 34621 1261712480 P0002986.JPG.tnj* -rwx------ 1 root root 35186 1261712482 P0002987.JPG.tnj* -rwx------ 1 root root 35007 1261712483 P0002988.JPG.tnj* -rwx------ 1 root root 32759 1261712484 P0002995.JPG.tnj* -rwx------ 1 root root 35495 1261712485 P0002996.JPG.tnj* -rwx------ 1 root root 33352 1261712486 P0003008.JPG.tnj* -rwx------ 1 root root 37204 1261712487 P0003011.JPG.tnj* -rwx------ 1 root root 32491 1261712488 P0003012.JPG.tnj* -rwx------ 1 root root 40982 1261712489 P0003013.JPG.tnj* -rwx------ 1 root root 34599 1261712490 P0003020.JPG.tnj* -rwx------ 1 root root 32866 1261712491 P0002154.JPG.tnj* root@Tower:~# I recognize the names of the files, at least most of them. I also saw activity, for no apparent reason on disk 4 and ran the same command: Linux 2.6.31.6-unRAID. root@Tower:~# ls /mnt/disk4 -R -l --time=ctime --time-style=+%s | sort -n +5 | t ail - -rwx------ 1 root root 5425152 1261716186 09\ -\ \320\243\320\273\320\270\321\20 6\321\213\ \321\201\321\202\320\276\320\273\320\270\321\206\321\213.mp3* -rwx------ 1 root root 5527552 1261716188 01\ -\ \320\237\320\276\321\206\320\26 5\320\273\321\203\320\271\ \320\264\320\273\320\270\320\275\320\276\321\216\ \32 0\262\ \320\262\320\265\321\207\320\275\320\276\321\201\321\202\321\214.mp3* -rwx------ 1 root root 4712448 1261716190 03\ -\ \320\235e\ \320\274\320\276\320 \273\321\207\320\270\ \321\202\320\260\320\272\ \320\263\321\200\320\276\320\274 \320\272\320\276.mp3* -rwx------ 1 root root 3776512 1261716191 05\ -\ \320\235\320\276\321\207\321\21 4\ \320\277\320\276\320\277\320\276\320\273\320\260\320\274,\ \320\264\320\265\3 20\275\321\214\ \320\277\320\276\320\277\320\276\320\273\320\260\320\274.mp3* -rwx------ 1 root root 3708928 1261716193 04\ -\ \320\235\320\265\320\262\320\26 5\320\267\321\203\321\207\320\270\320\271.mp3* -rwx------ 1 root root 4487168 1261716195 07\ -\ \320\222\ \321\210\320\276\321\ 200\321\202\320\260\321\205\ \320\270\ \320\274\320\260\320\265\321\207\320\272\ 320\265.mp3* -rwx------ 1 root root 4980736 1261716197 11\ -\ \320\230\320\275\321\202\320\26 5\321\200\320\275\320\265\321\202-\320\275\320\260\321\201\321\202\321\200\320\2 76\320\265\320\275\320\270\320\265.mp3* -rwx------ 1 root root 4237312 1261716199 02\ -\ \320\232\321\203\320\264\320\26 0\ \321\202\321\213,\ \321\202\321\203\320\264\320\260\ \321\217.mp3* -rwx------ 1 root root 5185536 1261716200 08\ -\ \320\234\320\260\320\275\321\20 2\321\200\320\260.mp3* -rwx------ 1 root root 4603904 1261716202 10\ -\ \320\222\320\265\321\200\321\21 6\ \320\262\ \320\273\321\216\320\261\320\276\320\262\321\214.mp3* root@Tower:~#
December 25, 200916 yr Author Joe, Once peace of information that I probably should have mentioned at the beginning is that I have LinuxMCE box acting as a gateway. I think that that system is constantly accessing the unRAID array. Are you familiar with that system? Lev
December 25, 200916 yr Joe, Once peace of information that I probably should have mentioned at the beginning is that I have LinuxMCE box acting as a gateway. I think that that system is constantly accessing the unRAID array. Are you familiar with that system? Lev I am not familiar with it, other than reading about it once or twice. It appears as if it is constantly looking at your media collection for possible changes. Joe L.
December 25, 200916 yr Author I have deleted unRAID from the device tree on the LinuxMCE and the access has stopped... I am not sure what it was scanning for or why it needed to constantly update itself, but I would rather not have it interrogate the array all the time. Joe, thanks for your input. Lev
December 26, 200916 yr cachedirs should be able to solve that, shouldn't it? It depends... if the MCE process is building thumbnail images, or look at the contents of the files stored, then no, it will not help since it only tries to keep directory entries in memory, not the files. If only the directories were being scanned for new media, then yes, it might help. Joe L.
December 26, 200916 yr Author Now that I "removed" the unRAID box form the list of devices on the LinuxMCE page of devices all "unnecessary" activity has seized. I posted a question on the LMCE forum and here is the link to the answer. I do not speak that language, but maybe it makes a little more sence to someone here... http://forum.linuxmce.org/index.php?topic=9374.0
December 26, 200916 yr Based on what I read over there, this link http://lime-technology.com/forum/index.php?topic=4500.0 should provide a script that should encourage unraid to keep a copy of the directory in memory for linuxmce to read. Since the description involves no writing, it should, if enough memory is available, be able to satisfy linuxmce without having to spin up the drives. Just a guess though, I don't run either.
December 26, 200916 yr Author Based on what I read over there, this link http://lime-technology.com/forum/index.php?topic=4500.0 should provide a script that should encourage unraid to keep a copy of the directory in memory for linuxmce to read. Since the description involves no writing, it should, if enough memory is available, be able to satisfy linuxmce without having to spin up the drives. Just a guess though, I don't run either. Thanks Wholly, I'll give a try.
December 26, 200916 yr Not to intrude on this thread, but I seem to be having the same problem. According to 4.5 and unMenu it says that disk1 and disk3 says it is spinning, but the lsof output seems to be saying its sleeping? Unmenu says that disk2 is asleep. I have cache_dir installed as well. root@unRAID:~# lsof /mnt/disk1 COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME cache_dir 5897 root cwd DIR 9,1 104 2 /mnt/disk1 sleep 8606 root cwd DIR 9,1 104 2 /mnt/disk1 root@unRAID:~# lsof /mnt/disk2 COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME cache_dir 5901 root cwd DIR 9,2 104 2 /mnt/disk2 sleep 8648 root cwd DIR 9,2 104 2 /mnt/disk2 root@unRAID:~# lsof /mnt/disk3 COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME cache_dir 5906 root cwd DIR 9,3 104 2 /mnt/disk3 sleep 8661 root cwd DIR 9,3 104 2 /mnt/disk3 I believe all 3 disks should be asleep as there has been no activity for quite some time now. Well over an hour.
December 26, 200916 yr Not to intrude on this thread, but I seem to be having the same problem. According to 4.5 and unMenu it says that disk1 and disk3 says it is spinning, but the lsof output seems to be saying its sleeping? Unmenu says that disk2 is asleep. I have cache_dir installed as well. root@unRAID:~# lsof /mnt/disk1 COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME cache_dir 5897 root cwd DIR 9,1 104 2 /mnt/disk1 sleep 8606 root cwd DIR 9,1 104 2 /mnt/disk1 root@unRAID:~# lsof /mnt/disk2 COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME cache_dir 5901 root cwd DIR 9,2 104 2 /mnt/disk2 sleep 8648 root cwd DIR 9,2 104 2 /mnt/disk2 root@unRAID:~# lsof /mnt/disk3 COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME cache_dir 5906 root cwd DIR 9,3 104 2 /mnt/disk3 sleep 8661 root cwd DIR 9,3 104 2 /mnt/disk3 I believe all 3 disks should be asleep as there has been no activity for quite some time now. Well over an hour. lsof does NOT indicate if a drive is spinning or not, it shows which process have open files and "current working directories" on a given disk. A disk can be spun down with an open file, or with a process having it as its working directory,and it will spin down if no activity occurs for its time-out period, it just cannot be un-mounted. lsof just chows a snapshot of what is happening at the exact moment you invoke it. Joe L.
December 26, 200916 yr Sooo....if lsof shows there's no files open and there's been no activity for well over an hour wouldn't that be an indication that it isn't spinning down correctly like I think it should be?
Archived
This topic is now archived and is closed to further replies.