daparsons

Members
  • Posts

    4
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed

daparsons's Achievements

Noob

Noob (1/14)

0

Reputation

  1. Thanks, BRiT. That actually works out pretty well. bobkart's answer works also, but since I want to feed the output into smartctl, I'd need to strip the partition number. Syslog also provides a disk number in line with the rest of the array. Here's what I'm testing now, in case anybody wants to accomplish something similar. This bit goes at the end of /boot/config/go: #Get device names for array drives mdcmd status | gawk 'match($0,/rdevName.(.+)=(...)/,arr) {num=sprintf("%02d",arr[1]); print num, arr[2]}' > /tmp/SMART_Device_List #Get cache drive device name gawk 'match($0,/import.(..).cache.*(...)$/,arr) {print arr[1], arr[2]}' /var/log/syslog | head -1 >> /tmp/SMART_Device_List #Add custom cron entries crontab -l > /tmp/file cat /boot/scripts/Custom_Crontab >> /tmp/file crontab /tmp/file rm -f /tmp/file I don't know if gawk is included in unRaid versions prior to 6 -- I didn't really do anything like this on version 5. Edit: Just noticed an issue with the timing on this. The device list was empty after rebooting. I'm guessing the array needs to be started before any of the drive info is available. I'll update later with a better solution. SMART_Device_List then contains one line for each drive with the disk number (parity is 0, cache is 24) and device name: 00 sdc 01 sdd ... 21 sdv 24 sdb crontab: 0 5 3-27 * * /boot/scripts/Scheduled_SMART_Test 1> /dev/null Scheduled_SMART_Test: #!/bin/bash drivenum=$(printf "%02d" $((`date +%d` - 3))) devname=`grep $drivenum /tmp/SMART_Device_List | awk '{print $2}'` if [ $devname ]; then usr/local/emhttp/plugins/dynamix/scripts/spindowndelay $devname 0 smartctl -t long /dev/$devname while true; do sleep 30 if ! smartctl -c /dev/$devname | grep -Pom1 '\d+%'; then /usr/local/emhttp/plugins/dynamix/scripts/spindowndelay $devname break fi done fi Spindowndelay included in Dynamix per this post. The grep statement hangs if $drivenum is negative, which is why the crontab entry starts on the 3rd of each month. Another if statement to check if $drivenum is greater than or equal to 0 would accomplish the same thing.
  2. I'm looking for a way to get a bash script to determine the sdX device name of the cache drive. I've got usable results for the other drives using mdcmd status, but the output from that doesn't include the cache drive. And since some of my device names change between reboots, I don't think I can just hard code the values. My goal is to setup a cron job to run scheduled SMART tests on each drive once every month, with one drive being tested per day. This was recently discussed in a couple threads, but no final script was ever posted. I'm comfortable enough with bash to write this on my own, I just need some way to programmatically return the cache drive's sdX name. Thanks in advance!
  3. Little late, but I'm seeing the same here. Mine are from an iPad and Android phone (and only every 4-5 minutes), though. Seems like this is just an issue with the version of dhcpcd (6.8.1 on unRaid 6.1.7). Check this post from rsmarples on archlinux: https://bbs.archlinux.org/viewtopic.php?pid=1538363#p1538363. According to that, we're just seeing broadcast traffic because dhcpcd keeps the port open in debug mode. So, minor annoyance, but just informational messages and possibly resolved in a newer version of dhcpcd.
  4. I'm having an issue trying to change AD permissions on objects. Whenever I try to add an AD user or group, the name disappears from the list after clicking "OK" or "Apply." I can modify permissions for existing users, but it seems that I have to do that through Special Permissions, instead of the usual full control/modify/read options. I'm using unRAID 4.7 on a 2008r2 domain. I've gotten the unRAID server to join the domain successfully, and I can run "wbinfo -u" and "wbinfo -i <domain>\\<user>" from the console without error. I just checked the syslog, and I saw a few errors about extended attributes: kernel: REISERFS warning (device sda1): jdm-20002 reiserfs_xattr_get: Invalid hash for xattr (user.SAMBA_PAI) associated with [1919251317 1296126766 0x505f4142 UNKNOWN] (Minor Issues) kernel: REISERFS warning (device sda1): jdm-20002 reiserfs_xattr_get: Invalid hash for xattr (user.SAMBA_PAI) associated with [1919251317 1296126766 0x505f4142 UNKNOWN] (Minor Issues) kernel: REISERFS warning (device md2): jdm-20002 reiserfs_xattr_get: Invalid hash for xattr (user.SAMBA_PAI) associated with [1919251317 1296126766 0x505f4142 UNKNOWN] (Minor Issues) kernel: REISERFS warning (device md2): jdm-20002 reiserfs_xattr_get: Invalid hash for xattr (user.SAMBA_PAI) associated with [1919251317 1296126766 0x505f4142 UNKNOWN] (Minor Issues) sda1 is my cache drive, and md2 is the second non-parity disk in my array I'm guessing that the xattr issue is what's preventing the permission changes from being saved, but I have no idea what to do to investigate further or repair the extended attributes. Can anyone give me some ideas, or point me at some commands to check/repair the folder and file attributes? 3-Apr Update: After mucking around a bit more, I realized there might be a formatting problem. I think I had started with a clean 5.0beta14 build, formatted the drives, then switched to 4.7 after realizing that 5.0 doesn't work with AD (at least not with any of the versions available from the website). So I started from scratch with 4.7 and precleared all drives again. Following the guide at eyespytechnologies (which is a little outdated, even for 4.7), I joined the server to the domain with no issues. But then none of the shares are available from any domain computer -- and the flash share is only available to non-domain computers. At this point I've given up and I'm going back to regular Unraid-managed Users. Maybe I'll revisit this when we get a newer stable release that works with AD.