Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

xamindar

Community Developer
  • Joined

  • Last visited

Everything posted by xamindar

  1. It's not getting the temperature for your two Hitachi drives. Maybe no one has used the script with Hitachi drives yet and they report a different name for the temperature value. Could you post the output of: smartctl -d ata -A /dev/sdb sdb or sdc, doesn't matter which you post. We will likely have to modify the script to look for something different. Right now it takes the value of Temperature_Celsius which both my Western Digital and Seagate drives label such as. I think I remember bubbaQ or someone making an actual program to report the temperature. It was a while ago. Anyone remember that? It might be a better way of doing things. Just have the script call that program and get the highest temp that way.
  2. Yeah, install a full slackware as a test then run the same sensors-detect and make sure those sensors are loaded. Then test if you can control the fans. If that all works then you just need to compile a new kernel for unraid with the sensor modules for your hardware. You can follow the unraid wiki for the full slackware install to compile the kernel. Just make sure you go to the hardware sensors section in "make menuconfig" and enable those same sensor modules so they will be built (you can compile them into the kernel as an alternative but then sensors-detect will complain that they can't be found. But it should still work).
  3. You need to research your chipset and what Linux kernel drivers work with it and what those drivers support. You are probably not going to find much help here I'm afraid as people here probably aren't kernel hackers. You might want to check lkml.org and maybe subscribe to that list to ask your questions.
  4. Not the coolest build but it doesn't get too hot. The drives peak around 38 on hot days. Before I replaced the original hotswap fan with a quieter one it was cooler than that and the cpu fan never spun as that one fan kept everything else inside cool as well. But I needed less noise with it being right next to the TV. The new fan also spins down when the hard drives are cool enough or spun down themselves.
  5. The other side:
  6. Thought I would post my unRAID build. I wanted my first one to be small enough to take places (like to parents house to backup dad's photos and other things from their PCs). Found the perfect case thanks to bubbaQ's post. -Mini ITX atom mobo (nothing special) -old 80GB 2.5" laptop hard drive with full Slackware installed on it -Norco 5 in 3 hot swap bay
  7. Don't confuse PWM in lm-sensors with PWM in the bios. I was reading about the 4-pin and 3-pin stuff when I was writing my script and don't know why lm-sensors calls everything pwm. The way I understand it real pwm (4 pin fans) are controlled by pulsing the power at different intervals while always staying at 12 volts. Apparently they are less likely to stall at lower rpms that way. But then there are 3 pin (non pwm) fans. The speed of them is changed by lowering the voltage. This way of changing speed does stall the fan at low rpms and depending on the fan depends on when it stalls. Also, you have to raise the power pretty high to get the fan to start again. Obviously 4 pin is better but 3 pin works just fine in most cases. I am pretty sure if you are using only 3 pin fans you need to select 3 pin in the bios. Don't worry about it not calling it pwm. Lm-sensors should still be able to control them. I have no idea why there is a server and a workstation setting though. If I were you I would try the three settings of disabled, 3 pin server, and 3 pin workstation and see if any of those change what you see under your hwmon0/devices area. Specifically look for pwm2_enable or see if fan2_input is reporting rpms.
  8. Thats one of the problems. He doesn't have pwm_enable. The script wasn't able to change it and the directory listing he posted doesn't include it. His fans are spinning but fan2_input is not showing any rpm values. I don't really have much experience with this to know what the problem is. Looks like your board deffinately supports fan speeds. starcat, do the IPMI fan speeds ever change? They should constantly fluctuate a little as the fans don't go the exact same speed at all times. From one of your earlier posts they were all even numbers (800, 1500...). That doesn't make sense to me unless your monitors are rounding them to the closest 100 or something. In any case, sorry, I'm out of ideas. Sense you have the fan divisors (I don't on mine for some reason) you can read up on it here: http://www.lm-sensors.org/browser/lm-sensors/trunk/doc/fan-divisors
  9. Dang, I had a whole long reply typed out then my computer froze (laptop doesn't like to compile programs for a long time, the ram overheats). What do you see under /sys/class/hwmon/hwmon0/device ?? "ls /sys/class/hwmon/hwmon0/device" Are you running on a full slackware setup? Looks like you are if you are using lm-sensors. Looks like you either don't have 3-wire fans connected or your sensors do not have the correct circuitry connected on the mainboard to control them. Try the following while physically watching the fan: "echo 0 > /sys/class/hwmon/hwmon0/device/pwm2" - that is a zero. It should completely stop that fan. If it does stop spinning then you will be able to control them. "echo 255 > /sys/class/hwmon/hwmon0/device/pwm2" - will bring it back to full speed. If that does nothing at all then either linux is not allowed to change the speed or the board doesn't support it. The error the script gave means it was unable to set the file that tells whether linux controls the fan or the bios controls the fan. I haven't done much testing with different sensor drivers so don't know if there is a different spot for that in your case. Post a directory listing of /sys/class/hwmon/hwmon0/device so we can see if there is anything else that might help. Also "cat /sys/class/hwmon/hwmon0/device/fan2_input" should give you the rpm of the fan on pwm2.
  10. Can anyone out there tell me if some manufacturers name the temperature field differently than "Temperature_Celsius"? I installed a new seagate drive and it was returning two temperature fields when I was just searching for "Temperature" by its self so I had to modify my script to look for the whole "Temperature_Celsius". If anyone has other manufacturers like samsung or hitachi (anything other than WD or seagate) it would be a great help if you could run the following command against those drives and verify if the temperature field is labeled as "Temperature_Celsius" or not. "smartctl -d ata -A /dev/sdX" (without quotes and where X is the drive leter, ie a, b, c and so on) You can find out which drive it is from the devices tab of the unraid web interface. You will see something like (sdb) right before the drive serial number. This command is not dangerous at all, just returns smart fields and may spin up some drives to get it, that's it. The temperature field is usually number 194 but not always. Thanks for any help. It will help to make this script work for any drive.
  11. Woohoo! Got the new fan today and installed it into my unraid. This script works perfect! I had an issue with crontab at first but I must have had a typo in the crontab. Did a couple reboots and everything is working. The script runs every three minutes from cron and changes fan speed when heeded. No need for any special front panel display.
  12. Lol, well thanks for "fixing" it so fast. Either no one tests it before using it or they all have cache drives in their systems. Thanks again for this script!
  13. Just tried this. It seemed to run as it spun up all my disks and they were grinding away for a while. Then I ran "cache_dirs -q" to stop it and started it with "cache_dirs -F" so I can see output but now it just sits there on a blank line forever, no output, nothing. It seems to run fine without the -F option so I guess it's no big deal. Just thought it was supposed to spit back info as it ran.
  14. That's why you don't try to control CPU or PSU fans... they have their own self-contained control mechanisms. Exactly. There is no bios control for hdd temperature so we have to write our own. I was just using the cpu fan as a test as it is currently the only controllable fan I have on the system. If I don't modify it but just "cat /sys/class/hwmon/hwmon1/device/pwm1" I can see how the number is automatically changed by the bios as the cpu temp rises or lowers, kinda neat. But I have noticed once I manually change it the bios releases control of it and it will stay where I set it until I reboot. There might be another way without rebooting but I haven't bothered to look as this is only testing anyway. The wonders of linux, you can do pretty much anything you can dream up with linux. Also, I don't see controlling the hdd fans with the os as a problem as they are defaulted to full speed without the script and if the temperature rises too high there is an over temp buzzer on the array that will go off.
  15. Well, I figured out that my little mini itx board that unraid is using has pwm fan speed control on all three fan ports so I can just use that. I spent some time and wrote a very simple script to check the temperatures of the drives, pick the highest one, then set the speed of the fan accordingly between three speed settings. I am still waiting for a fan to come in the mail that I will use with the 5 in 3 backplane (norco ss-500) but I have tested this script on the cpu fan and it works great. I am definitely open to criticism as this is only the second bash script I have ever written. It's not very smart so you have to edit it and be sure to set all the user variables correctly. Then just add a cron entry to run this script every 5 minutes or so and it should work. Also one more thing. I don't know if smartctl will reset the spindown timer so it may cause the drives to never spin down. Anyone know if this is the case? I do know that running the smartctl on a drive in standby does NOT cause it to spin up so this is probably not an issue. #!/bin/bash # unraid_array_fan.sh v0.4 # v0.1 First try at it. # v0.2: Made a small change so the fan speed on low doesn't fluctuate every time the script is run. # v0.3: It will now enable fan speed change before trying to change it. I missed # it at first because pwmconfig was doing it for me while I was testing the fan. # v0.4: Corrected temp reading to "Temperature_Celsius" as my new Seagate drive # was returning two numbers with just "Temperature". # A simple script to check for the highest hard disk temperatures in an array # or backplane and then set the fan to an apropriate speed. Fan needs to be connected # to motherboard with pwm support, not array. # DEPENDS ON:grep,awk,smartctl,hdparm ### VARIABLES FOR USER TO SET ### # Amount of drives in the array. Make sure it matches the amount you filled out below. NUM_OF_DRIVES=3 # unRAID drives that are in the array/backplane of the fan we need to control HD[1]=/dev/sdb HD[2]=/dev/sdc HD[3]=/dev/sde HD[4]=/dev/ HD[5]=/dev/ # Temperatures to change fan speed at # Any temp between OFF and HIGH will cause fan to run on low speed setting FAN_OFF_TEMP=30 # Anything this number and below - fan is off FAN_HIGH_TEMP=36 # Anything this number or above - fan is high speed # Fan speed settings. Run pwmconfig (part of the lm_sensors package) to determine # what numbers you want to use for your fan pwm settings. Should not need to # change the OFF variable, only the LOW and maybe also HIGH to what you desire. # Any real number between 0 and 255. FAN_OFF_PWM=100 FAN_LOW_PWM=120 FAN_HIGH_PWM=255 # Fan device. Depends on your system. pwmconfig can help with finding this out. # pwm1 is usually the cpu fan. You can "cat /sys/class/hwmon/hwmon0/device/fan1_input" # or fan2_input and so on to see the current rpm of the fan. If 0 then fan is off or # there is no fan connected or motherboard can't read rpm of fan. ARRAY_FAN=/sys/class/hwmon/hwmon1/device/pwm2 ### END USER SET VARIABLES ### # Program variables - do not modify HIGHEST_TEMP=0 CURRENT_DRIVE=1 CURRENT_TEMP=0 # while loop to get the highest temperature of active drives. # If all are spun down then high temp will be set to 0. while [ "$CURRENT_DRIVE" -le "$NUM_OF_DRIVES" ] do SLEEPING=`hdparm -C ${HD[$CURRENT_DRIVE]} | grep -c standby` if [ "$SLEEPING" == "0" ]; then CURRENT_TEMP=`smartctl -d ata -A ${HD[$CURRENT_DRIVE]} | grep -m 1 -i Temperature_Celsius | awk '{print $10}'` if [ "$HIGHEST_TEMP" -le "$CURRENT_TEMP" ]; then HIGHEST_TEMP=$CURRENT_TEMP fi fi #echo $CURRENT_TEMP let "CURRENT_DRIVE+=1" done echo "Highest temp is: "$HIGHEST_TEMP # Enable speed change on this fan if not already if [ "$ARRAY_FAN" != "1" ]; then echo 1 > "${ARRAY_FAN}_enable" fi # Set the fan speed based on highest temperature if [ "$HIGHEST_TEMP" -le "$FAN_OFF_TEMP" ]; then # set fan to off echo $FAN_OFF_PWM > $ARRAY_FAN echo "Setting pwm to: "$FAN_OFF_PWM elif [ "$HIGHEST_TEMP" -ge "$FAN_HIGH_TEMP" ]; then # set fan to full speed echo $FAN_HIGH_PWM > $ARRAY_FAN echo "Setting pwm to: "$FAN_HIGH_PWM else CURRENT_SPEED=`cat $ARRAY_FAN` # set fan to full speed first to make sure it spins up then change it to low setting. if [ "$CURRENT_SPEED" -lt "$FAN_LOW_PWM" ]; then echo $FAN_HIGH_PWM > $ARRAY_FAN sleep 2 fi echo $FAN_LOW_PWM > $ARRAY_FAN echo "Setting pwm to: "$FAN_LOW_PWM fi EDIT: v0.2: Made a small change so the fan speed on low doesn't fluctuate every time the script is run. EDIT: v0.3: It will now enable fan speed change before trying to change it. I missed it at first because pwmconfig was doing it for me while I was testing the fan. EDIT: v0.4: Corrected temp reading to "Temperature_Celsius" as my new Seagate drive was returning two numbers with just "Temperature". unraid-fan-speed.sh.zip
  16. That TC647B is interesting. How do you program it? Not sure if I have the tools to program it but building it sounds fun. I have found a couple interesting ones: Lian Li TR-5 - Seems to do exactly what I need. But one thing I can't figure out. It has an auto speed setting based on temperature but it doesn't look like you can set it to which temperatures you want the fan speeds to change. That doesn't make sense to me. Anyone have experience with these things? This one is a little on the expensive side as well. http://www.newegg.com/Product/Product.aspx?Item=N82E16811999194 - Looks like similar control as the Lian one but has a bunch of media card slots as well. Would be kinda neat to write some scripts to auto mount any cards plugged into it, copy the data on the cards to unraid, then unmount them. Would make a quick backup sollution for memory cards. Regarding temperature control, how do you set which temperatures to speed up the fans at? These things seem to have no information on that. I saw some others around when I was searching last week but can't seem to find them, oh well. Also, I'll have to check my motherboard and see if Linux will detect fan speed and such with it. I know the bios does for all three fan connectors, now to check on linux. If this works then I wouldn't even need one of these panels and can just have unraid take care of it for me as bubbaQ suggested. My main reason for all this is because my unraid sits right next to the TV and I want it as quiet as possible but also need it to kick into high gear if the HDD temps get too high.
  17. I'm looking for a way to connect the fan that blows air across the hard drives to a temperature controller that will set the speed of the fan based on the temperature. So for example, if the hard drives hit 35C then spin the fan up to full and then when they drop below 30C to lower the speed down to a level that is inaudible. Is there such a device out there that can do this? Any of you have experience with it? Something that has temperature sensor leads that could be put in the 5 in 3 backplane and then apply those readings to the speed of that fan would be very usefull. Or, as another way of doing this, if possible. Can the fan be plugged into the main board and then speed adjusted based on the hdd SMART temperatures? Thanks for any input. EDIT: Go HERE for my answer to my question.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.