Everything posted by gfjardim
-
ZFS plugin for unRAID
# source unRAID version . /etc/unraid-version download_install() { local dest="&plugin;/packages/${1}" local src="&repo;/packages/${1}" local md5=$2 if [ ! -f "${dest}" ]; then curl --location --silent --fail "${src}" --output "${dest}" fi file_md5=$(/usr/bin/md5sum ${dest}) if [ "${file_md5:0:32}" != "${md5:0:32}" ]; then echo "Wrong '${1}' package md5 hash." rm "${dest}" exit 1 else /sbin/installpkg "$dest" fi } if [ "$version" == "6.2.0-beta18" ]; then spl_pkg="spl-0.6.5.5-unRAID6.2.0-beta18.x86_64.tgz" spl_md5="6bab826e24b0c3ccc08b962e8a64058c" zfs_pkg="zfs-0.6.5.5-unRAID6.2.0-beta18.x86_64.tgz" zfs_md5="1ee9e5c1d85155ef87138aaee78aefb6" elif [ "$version" == "6.1.9" ]; then spl_pkg="spl-0.6.5.4-unRAID6.1.9.x86_64.tgz" spl_md5="ef09a51f6fcc069ad4897b5e06088d00" zfs_pkg="zfs-0.6.5.4-unRAID6.1.9.x86_64.tgz" zfs_md5="74ee8f3698cd6f64839bcdf09abe5534" elif [ "$version" == "6.1.8" ]; then spl_pkg="spl-0.6.5.4-unRAID6.1.8.x86_64.tgz" spl_md5="3ef7a7eb63bac07475dc7e9eee5132c5" zfs_pkg="zfs-0.6.5.4-unRAID6.1.8.x86_64.tgz" zfs_md5="ae2c5bd933f1376b52a73a07862db2bc" elif [ "$version" == "6.1.7" ]; then spl_pkg="spl-0.6.5.4-unRAID6.1.7.x86_64.tgz" spl_md5="288b0b4c242fe947f41a2a4a1f731982" zfs_pkg="zfs-0.6.5.4-unRAID.1.7.x86_64.tgz" zfs_md5="57e386538e4726dd222c8bd682975705" elif [ "$version" == "6.1.4" ]; then spl_pkg="spl-0.6.5.3-unRAID6.1.4.x86_64.tgz" spl_md5="41700aaec22f70d2ae257544d6f53695" zfs_pkg="zfs-0.6.5.3-unRAID6.1.4.x86_64.tgz" zfs_md5="31b8ee8c406f211a78c7dbf56ba2609e" elif [ "$version" == "6.1.3" ]; then spl_pkg="spl-0.6.5.3-unRAID6.1.3.x86_64.tgz" spl_md5="8b0c880280b722fb1948dd9d0e3362b9" zfs_pkg="zfs-0.6.5.3-unRAID6.1.3.x86_64.tgz" zfs_md5="33401b97ae99a5f17aef4524bd5122cc" elif [ "$version" == "6.1.2" ]; then spl_pkg="spl-0.6.5.1-unRAID6.1.2.x86_64.tgz" spl_md5="644f7c6a682b6b9d607f5a7337205d16" zfs_pkg="zfs-0.6.5.1-unRAID6.1.2.x86_64.tgz" zfs_md5="cdefbb81f0de70cdb876a4625abb4c88" else exit 1 fi download_install "${spl_pkg}" "${spl_md5}" download_install "${zfs_pkg}" "${zfs_md5}"
-
Preclear plugin
Here it is, guys: https://raw.githubusercontent.com/gfjardim/unRAID-plugins/master/plugins/preclear.disk.beta.plg It will add a Preclear Disk Beta icon under Settings. How to test it: 1) Pick a formatted disk or format it with Unassigned Devices and copy some files to it; 2) Go to Settings/PreclearBeta and start a Clear operation; 3) Once it's over, please run a Verify All the Disk operation; 4) If successful, please run both Test and Run the post-read verify operations from the older plugin; 5) If possible, assign the precleared disk to the array and start a Check Parity operation. All feedbacks are pretty much appreciated.
-
Preclear plugin
Seem like the timming is almost perfect. The new script is mostly completed. The only significant missing feature is the SMART relatories. Will try to speedup things.
-
Preclear plugin
I appreciate if you all can test it soon.
-
Preclear plugin
I'll license it under GPL like I did on Unassigned Devices. Developing a plugin is one task, it's concentrated in time, but bugfixes, improvements and support are long term tasks that may need some succession in development. Guys, I need some people to test/validate this new script. I'll release a testing version of the new Preclear Plugin within the next week or so.
-
Preclear plugin
I can't get in touch with him. He won't respond to PM or topic questions. I think he knows what I'm doing, but he won't participate. Either way, it's a bummer. The original script was written while unRAID used BASH 3.2., I guess. The code is linear, and it's difficult to modify one thing without borking others. It's more a rework of the original code, incorporating things like associative arrays and trying to contain the variables inside functions, avoiding the disseminated use of global variables. No other functionality is planned beyond the actual scope. They are basically the same code. When bjp999 took the code to improve it, he was hands tied. He couldn't modify it extensively, so he opted to use a binary executable to speedup the post-zeroing verification. The problem in the original code is that post-zeroing read executes two reads on the same area, so it actually reads twice the disk. It's not necessary and it makes the code confusing. I removed that part. Other problem I corrected is that some of the last blocks of the disk eventually weren't read, and that I got fixed too. I fixed that disks.cfg and super.dat problem too. I'm not removing the support to the original script right now. I'm proposing a new code that would eventually meet the same confidence we have in the current one. It need a lot more testing before we can pull the plug. And the confusion always exists. We can't make a omelet without breaking some eggs. Have you any real news about that?
-
Preclear plugin
Since I can't get authorization of Joe L. to distribute the preclear script, I'm writing a new script for it. Right now I have all the basic functionality working, aka preclear and test preclear. Since support all legacy functions takes time, I want to know if anyone is preclearing disks with partition starting on block 63, and if anyone have converted from block 64 to block 63 or vice versa in the last year.
-
[CONTAINER] CrashPlan & CrashPlan-Desktop
If your unRAID's time zone is set, CrashPlan should adopt it.
-
***GUIDE*** Passthrough Entire PCI USB Controller
USB3 is at 00.1a.0, and USB4 at 00.1d.0.
-
***GUIDE*** Passthrough Entire PCI USB Controller
USB3 and USB4 are on different pci devices....
-
***GUIDE*** Passthrough Entire PCI USB Controller
With some flash drives attached, please sun this: echo "unRAID - > " $(udevadm info -q path -n /dev/disk/by-label/UNRAID |grep -Po '0000:\K\w{2}:\w{2}\.\w{1}' ) for d in /dev/disk/by-id/usb-*; do echo "$d -> " $(udevadm info -q path -n $d |grep -Po '0000:\K\w{2}:\w{2}\.\w{1}')|column -t ; done See if any device is on a different PCI bus.
-
[CONTAINER] CrashPlan & CrashPlan-Desktop
This kind of problem usually is related to the Mover script moving files from the cache disk to the array... How do I stop this sorcery? Go to Shares, select appdata and then set Use cache disk: to Only. Hit apply and you're done.
-
[CONTAINER] CrashPlan & CrashPlan-Desktop
This kind of problem usually is related to the Mover script moving files from the cache disk to the array...
-
[CONTAINER] CrashPlan & CrashPlan-Desktop
It's just an alert to people; your question may being already answered, so take a look into the OP.
-
[CONTAINER] CrashPlan & CrashPlan-Desktop
Please, guys, always look at the OP before asking a question:
-
[CONTAINER] CrashPlan & CrashPlan-Desktop
Another script that will unmount the disk after server's backup using an Unassigned Devices disk: #!/bin/bash # Set UNRAID_ADDR to "172.17.42.1" and set UNRAID_PASS if your container's network is set to bridge. UNRAID_ADDR="127.0.0.1" UNRAID_PASS="" MOUNT="/backup" CHANNEL="1" # Available Channels # # 1 = notify using browser-popups only; # 2 = notify using e-mail only; # 3 = notify using browser-popups and e-mail; # 4 = notify using agents only; # 5 = notify using browser-popups and agents; # 6 = notify using e-mail and agents; # 7 = notify using browser popups, e-mail and agents; send_notify() { curl -s -d "cmd=add" \ -d "e=${1} " \ -d "s=${2}" \ -d "d=${3}" \ -d "i=normal ${CHANNEL}" \ -u "root:${UNRAID_PASS}" "http://${UNRAID_ADDR}/webGui/include/Notify.php" } unassigned_umount() { device=$(cat /proc/mounts 2>/dev/null|grep "${MOUNT}"|grep -v 'rootfs'|cut -d' ' -f1|head -n1) if [[ -n $device ]]; then send_notify "Unassigned Devices: umounting disk '$(basename ${device})'" \ "Unassigned Devices: the disk '$(basename ${device})' is being unmounted." curl -s -d "action=umount" \ -d "device=${device}" \ -u "root:${UNRAID_PASS}" "http://${UNRAID_ADDR}/plugins/unassigned.devices/UnassignedDevices.php" fi } CP_LOG="/config/log/history.log.0" while read line ; do # unRAID's backup finished if [[ $line =~ .?(Completed[[:space:]]backup[[:space:]]to[^:]*)(in .*) ]]; then send_notify "CrashPlan: Backup completed" "${BASH_REMATCH[1]}." "${BASH_REMATCH[@]}" unassigned_umount fi done < <(tail -fn0 $CP_LOG)
-
[CONTAINER] CrashPlan & CrashPlan-Desktop
Mainly two: short file path and in the flash filesystem all scripts have the execution bit already set.
-
[CONTAINER] CrashPlan & CrashPlan-Desktop
You're welcome! Just to help others, the problems were: 1) a script error, now fixed; 2) DOS line endings while saving the script. In this case, my advise is to open a SSH session using Putty and paste the content using VI or NANO. []'s
-
[CONTAINER] CrashPlan & CrashPlan-Desktop
Very strange.
-
[CONTAINER] CrashPlan & CrashPlan-Desktop
There's no need to cahnge the IP when you're using HOST network mode. When you change it, you must supply the webGui password too. Leave it as 127.0.0.1, it's the local IP address of your server. To test, simply start a backup.
-
[CONTAINER] CrashPlan & CrashPlan-Desktop
That's the Docker IP; obviously, you can change it with your server IP address. You -can- ? Or you should ? My server is hosted on 192.168.1.13. Should I use that IP address ? I think it will give you the same results, that's why I used "can" instead of "should". Use your server's IP address and let me know if it works.
-
[CONTAINER] CrashPlan & CrashPlan-Desktop
That's the Docker IP; obviously, you can change it with your server IP address.
-
[CONTAINER] CrashPlan & CrashPlan-Desktop
[glow=red,2,300]DISCLAIMER:[/glow] This is an advanced mod to this container, so don't attempt it if you don't know what you're doing... GOAL: add notifications to CrashPlan: 1) Add the code below in a script file on the flash drive (e.g. /boot/custom/crashplan_notify.sh): #!/bin/bash # Set UNRAID_ADDR to "172.17.42.1" and set UNRAID_PASS if your container's network is set to bridge. UNRAID_ADDR="127.0.0.1" UNRAID_PASS="" CHANNEL="1" # Available Channels # # 1 = notify using browser-popups only; # 2 = notify using e-mail only; # 3 = notify using browser-popups and e-mail; # 4 = notify using agents only; # 5 = notify using browser-popups and agents; # 6 = notify using e-mail and agents; # 7 = notify using browser popups, e-mail and agents; send_notify() { curl -d "cmd=add" \ -d "e=CrashPlan: ${1} " \ -d "s=${2}" \ -d "d=${3}" \ -d "i=normal ${CHANNEL}" \ -u "root:${UNRAID_PASS}" "http://${UNRAID_ADDR}/webGui/include/Notify.php" } CP_LOG="/config/log/history.log.0" while read line ; do if [[ $line =~ .?(Starting[[:space:]]backup[[:space:]]to[^:]*)(.*) ]]; then send_notify "Backup is starting" "${BASH_REMATCH[1]}." "${BASH_REMATCH[@]}" elif [[ $line =~ .?(Completed[[:space:]]backup[[:space:]]to[^:]*)(in .*) ]]; then send_notify "Backup completed" "${BASH_REMATCH[1]}." "${BASH_REMATCH[@]}" elif [[ $line =~ .?(Starting[[:space:]]backup[[:space:]]from[^:]*)(.*) ]]; then send_notify "Receiving backup" "${BASH_REMATCH[1]}." "${BASH_REMATCH[@]}" elif [[ $line =~ .?(Completed[[:space:]]backup[[:space:]]from[^:]*)(in .*) ]]; then send_notify "Received backup" "${BASH_REMATCH[1]}." "${BASH_REMATCH[@]}" fi done < <(tail -fn0 $CP_LOG) Note: set UNRAID_ADDR to "172.17.42.1" and set UNRAID_PASS if your container's network is set to bridge. 2) Edit the CrashPlan container, mapping the file above to the container's service dir (e.g. /boot/custom/crashplan_notify.sh -> /etc/service/notify/run) : 3) Hit Save and you're done.
-
[Plugin] IPMI for unRAID 6.1+
I noticed you board has the Supermicro OEM temp sensor for the CPU. Try adding --interpret-oem-data to the command. It would be nice if that works so I don't have to add individual sensor ids. If that doesn't work, try --interpret-oem-data --record-ids=71. Just curious, does 'ipmitool sdr' show a value for cpu temp? Here we go: root@Servidor:~# ipmi-sensors --output-sensor-thresholds --comma-separated-output --output-sensor-state --ignore-not-available-sensors --non-abbreviated-units --interpret-oem-data| column -s, -t ID Name Type State Reading Units Lower NR Lower C Lower NC Upper NC Upper C Upper NR Event 4 System Temp Temperature Nominal 42.00 degrees C -9.00 -7.00 -5.00 75.00 77.00 79.00 'OK' 71 CPU Temp OEM Reserved Warning N/A N/A N/A N/A N/A N/A N/A N/A 'High' 205 FAN 2 Fan Nominal 5535.00 RPM 405.00 540.00 675.00 29025.00 29160.00 29295.00 'OK' 406 FAN A Fan Nominal 2295.00 RPM 0.00 0.00 0.00 29025.00 29160.00 29295.00 'OK' 473 Vcore Voltage Nominal 1.23 Volts 0.64 0.66 0.69 1.34 1.41 1.47 'OK' 540 3.3VCC Voltage Nominal 3.36 Volts 2.82 2.88 2.94 3.58 3.65 3.71 'OK' 607 12V Voltage Nominal 12.19 Volts 10.49 10.60 10.71 13.09 13.20 13.30 'OK' 674 VDIMM Voltage Nominal 1.51 Volts 1.15 1.22 1.28 1.76 1.78 1.79 'OK' 741 5VCC Voltage Nominal 5.18 Volts 4.10 4.32 4.58 5.34 5.60 5.63 'OK' 808 -12V Voltage Nominal -11.87 Volts -13.42 -13.22 -13.03 -10.52 -10.33 -10.14 'OK' 875 VBAT Voltage Nominal 3.17 Volts 2.82 2.88 2.94 3.58 3.65 3.71 'OK' 942 VSB Voltage Nominal 3.34 Volts 2.82 2.88 2.94 3.58 3.65 3.71 'OK' 1009 AVCC Voltage Nominal 3.36 Volts 2.82 2.88 2.94 3.58 3.65 3.71 'OK' 1076 Chassis Intru Physical Security Nominal N/A N/A N/A N/A N/A N/A N/A N/A 'OK' root@Servidor:~# ipmi-sensors --output-sensor-thresholds --comma-separated-output --output-sensor-state --ignore-not-available-sensors --non-abbreviated-units --interpret-oem-data --record-ids=71| colum> ID Name Type State Reading Units Lower NR Lower C Lower NC Upper NC Upper C Upper NR Event 71 CPU Temp OEM Reserved Nominal N/A N/A N/A N/A N/A N/A N/A N/A 'Low' root@Servidor:~# ipmitool sdr System Temp | 43 degrees C | ok CPU Temp | 0x01 | ok FAN 1 | no reading | ns FAN 2 | 5670 RPM | ok FAN 3 | no reading | ns FAN 4 | no reading | ns FAN A | 2295 RPM | ok Vcore | 1.24 Volts | ok 3.3VCC | 3.36 Volts | ok 12V | 12.19 Volts | ok VDIMM | 1.51 Volts | ok 5VCC | 5.18 Volts | ok -12V | -11.87 Volts | ok VBAT | 3.17 Volts | ok VSB | 3.34 Volts | ok AVCC | 3.36 Volts | ok Chassis Intru | 0x00 | ok
-
Unassigned Devices - Managing Disk Drives and Remote Shares Outside of The Unraid Array
dlandon, Tested the USB auto mount yesterday and it worked like a charm, thank you for that.