Everything posted by inh
-
Additional Scripts For User.Scripts Plugin
This script looks good but it still loops through every drive, so it always wants to clear my highest numbered data drive. Very scary. This is on 6.10.3 Edit: Here is my fixed version: #!/bin/bash # A script to clear an unRAID array drive. It first checks the drive is completely empty, # except for a marker indicating that the user desires to clear the drive. The marker is # that the drive is completely empty except for a single folder named 'clear-me'. # # Array must be started, and drive mounted. There's no other way to verify it's empty. # Without knowing which file system it's formatted with, I can't mount it. # # Quick way to prep drive: format with ReiserFS, then add 'clear-me' folder. # # 1.0first draft # 1.1add logging, improve comments # 1.2adapt for User.Scripts, extend wait to 60 seconds # 1.3add progress display; confirm by key (no wait) if standalone; fix logger # 1.4only add progress display if unRAID version >= 6.2 # 2.0 - This is an update/fork of RobJ script by user Majyk Oyster on forums.unraid.net. #Change log : #Version check adapted for Unraid 6.10 and up. #Check if unmount successful before clearing. #Send mail notification when clearing finished. #Script adapted for more then 9 drives. #Dead code removed. #Code simplified and optimized. #Ambiguous variables renamed. #Progression of the dd command sent to the GUI log # 2.1 - Fix to clear the found disk ############# # Functions # ############# funDisplay () { echo -e "\n`date +%d/%m" "%T` : $1\n" logger -t$tag "$2" } funMail() { /usr/local/emhttp/webGui/scripts/notify -i normal -s "$1" -d "$2" } ############# # Variables # ############# scriptVersion="2.0" marker="clear-me" tag="clear_array_drive" started=0 ddArg="" #used for dd command found=0 wait=60 scriptDir=$(dirname "$0") userscriptstDir="/tmp/user.scripts" # Colors management if [[ "$scriptDir" == "$userscriptstDir"* ]]; then # running from User.Scripts GUI. Sets html colors. colorStart="<font color=blue>" colorFinish="</font>" else # running from CLI. Sets shell colors colorStart="\x1b[36;01m" colorFinish="\x1b[39;49;00m" fi ########## # Checks # ########## funDisplay "Clear an unRAID array data drive v$scriptVersion." # check unRAID version unraidVersion=`cat /etc/unraid-version | cut -d '"' -f 2` majorVersion=`echo $unraidVersion | cut -d "." -f 1` minorVersion=`echo $unraidVersion | cut -d "." -f 2` if [ $majorVersion -eq 6 -a $minorVersion -ge 2 ]; then ddArg="status=progress" else funDisplay "This script was not validated for this version of Unraid ($majorVersion.$minorVersion.x)." if [[ "$scriptDir" == "$userscriptstDir"* ]]; then # running in User.Scripts funDisplay "You have $wait seconds to cancel this script (click the red X, top right)\n" sleep $wait else #running from CLI echo "Press ! to proceed. Any other key aborts, with no changes made. " ch="" read -n 1 ch echo -e -n "\r \r" if [ "$ch" != "!" ]; then exit fi fi fi # checks if array is started disks=`ls -d /mnt/* | grep disk | grep -v disks` drivesNumber=`echo "$disks" | wc -l` if [ $drivesNumber == 0 ]; then funDisplay "ERROR: Array must be started before using this script. Exiting." exit fi # checks if a disk is ready for clearing funDisplay "Checking all array data drives (may need to spin them up)..." for disk in $disks; do itemsList=`ls -A $disk 2> /dev/null` itemsNumber=`echo "$itemsList" | wc -l` # test for marker and emptiness if [ $itemsNumber -eq 1 -a "$itemsList" == "$marker" ]; then itemsSize=`du -s $disk | awk '{print $1}'` if [ $itemsSize -eq 0 ]; then foundDisk=$disk ((found++)) fi fi done # No drive or multiple drives found to clear if [ $found -eq 0 ]; then funDisplay "Checked $drivesNumber drives, did not find an empty drive ready and marked for clearing! To use this script, the drive must be completely empty first, no files or folders left on it. Then a single folder should be created on it with the name 'clear-me', exactly 8 characters, 7 lowercase and 1 hyphen. This script is only for clearing unRAID data drives, in preparation for removing them from the array. It does not add a Preclear signature." exit elif [ $found -ge 2 ]; then funDisplay "Checked $drivesNumber drives, found multiple empty drives ready and marked for clearing! To use this script, the drive must be completely empty first, no files or folders left on it. Then a single folder should be created on it with the name 'clear-me', exactly 8 characters, 7 lowercase and 1 hyphen. This script is only for clearing unRAID data drives, in preparation for removing them from the array. It does not add a Preclear signature." exit else disk=$foundDisk deviceNumber=`echo $disk | cut -d "/" -f 3 | cut -c 5- ` device="/dev/md$deviceNumber" funDisplay "Device found : $colorStart $device $colorFinish" fi ############ # Warnings # ############ # First, warn about the clearing, and give them a chance to abort funDisplay "Found a marked and empty drive to clear: $colorStart Disk $deviceNumber $colorFinish ( $device ) * Disk $disk will be unmounted first. * Then zeroes will be written to the entire drive. * Parity will be preserved throughout. * Clearing while updating Parity takes a VERY long time! * The progress of the clearing will not be visible until it's done! * When complete, Disk $disk will be ready for removal from array. * Commands to be executed: \t* $colorStart umount $disk $colorFinish \t* $colorStart dd bs=1M if=/dev/zero of=$device $ddArg $colorFinish" if [[ "$scriptDir" == "$userscriptstDir"* ]]; then # running in User.Scripts funDisplay "You have $wait seconds to cancel this script (click the red X, top right)\n" sleep $wait else #running from CLI funDisplay "Press ! to proceed. Any other key aborts, with no changes made. " ch="" read -n 1 ch echo -e -n "\r \r" if [ "$ch" != "!" ]; then exit fi fi ############# # Preparing # ############# funDisplay "Unmounting $disk ... \r" funDisplay "Unmounting Disk $disk (command: umount $disk ) ..." if `umount $disk`; then # unmount success funDisplay "Disk $disk unmounted successfully." else # unmount failure funDisplay "Disk $disk unmount failed. Exiting." exit fi ############ # Clearing # ############ funDisplay "Clearing Disk $disk (command: dd bs=1M if=/dev/zero of=$device $ddArg ) ..." startTime="`date +%c`" if [ ! -z `cat $userscriptstDir/tmpScripts/*/log.txt 2> /dev/null | grep "Clear an unRAID array data drive"`]; then logFile="ls $userscriptstDir/tmpScripts/*/log.txt" dd bs=1M if=/dev/zero of=$device $ddArg >> $logFile else dd bs=1M if=/dev/zero of=$device $ddArg fi endTime="`date +%c`" ######## # Done # ######## funDisplay "Clearing Disk $disk is complete" funDisplay "Started @ $startTime\nFinished @ $endTime" echo -e "A message saying \"error writing ... no space left\" is expected, NOT an error. Unless errors appeared, the drive is now cleared! Because the drive is now unmountable, the array should be stopped, and the drive removed (or reformatted)." funMail "Clearing complete on $device." "Clearing complete on $device.\nStarted @ $startTime\nFinished @ $endTime"
-
[Support] A75G Repo
Having issues like others getting the matrix image working. I followed your quick guide about changing IP to 0.0.0.0 and such, but still wont work. Here's the log: -=> start turn -=> start matrix Cannot create pid file: /var/run/turnserver.pid: Permission denied socket: Protocol not supported socket: Protocol not supported socket: Protocol not supported socket: Protocol not supported socket: Protocol not supported socket: Protocol not supported socket: Protocol not supported socket: Protocol not supported This server is configured to use 'matrix.org' as its trusted key server via the 'trusted_key_servers' config option. 'matrix.org' is a good choice for a key server since it is long-lived, stable and trusted. However, some admins may wish to use another server for this purpose. To suppress this warning and continue using 'matrix.org', admins should set 'suppress_key_server_warning' to 'true' in homeserver.yaml.
-
[Support] Djoss - Nginx Proxy Manager
Ah look at that. Guess I got some work to do. Thank you!
-
[Support] Djoss - Nginx Proxy Manager
Cant seem to get it to start on a fresh unraid install: [s6-init] making user provided files available at /var/run/s6/etc...exited 0. [s6-init] ensuring user provided files have correct perms...exited 0. [fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] 00-app-niceness.sh: executing... [cont-init.d] 00-app-niceness.sh: exited 0. [cont-init.d] 00-app-script.sh: executing... [cont-init.d] 00-app-script.sh: exited 0. [cont-init.d] 00-app-user-map.sh: executing... [cont-init.d] 00-app-user-map.sh: exited 0. [cont-init.d] 00-clean-logmonitor-states.sh: executing... [cont-init.d] 00-clean-logmonitor-states.sh: exited 0. [cont-init.d] 00-clean-tmp-dir.sh: executing... [cont-init.d] 00-clean-tmp-dir.sh: exited 0. [cont-init.d] 00-set-app-deps.sh: executing... [cont-init.d] 00-set-app-deps.sh: exited 0. [cont-init.d] 00-set-home.sh: executing... [cont-init.d] 00-set-home.sh: exited 0. [cont-init.d] 00-take-config-ownership.sh: executing... [cont-init.d] 00-take-config-ownership.sh: exited 0. [cont-init.d] 00-xdg-runtime-dir.sh: executing... [cont-init.d] 00-xdg-runtime-dir.sh: exited 0. [cont-init.d] nginx-proxy-manager.sh: executing... [cont-init.d] nginx-proxy-manager.sh: Initializing database data directory... [cont-init.d] nginx-proxy-manager.sh: exited 1. [services.d] stopping services [services.d] stopping s6-fdholderd... [cont-finish.d] executing container finish scripts... [cont-finish.d] done. [s6-finish] syncing disks. [s6-finish] sending all processes the TERM signal. [s6-finish] sending all processes the KILL signal and exiting. This is from the init_db log: Installing MariaDB/MySQL system tables in '/config/mysql' ... 2020-03-22 18:08:12 0 [ERROR] InnoDB: preallocating 12582912 bytes for file ./ibdata1 failed with error 95 2020-03-22 18:08:12 0 [ERROR] InnoDB: Could not set the file size of './ibdata1'. Probably out of disk space 2020-03-22 18:08:12 0 [ERROR] InnoDB: Database creation was aborted with error Generic error. You may need to delete the ibdata1 file before trying to start up again. 2020-03-22 18:08:13 0 [ERROR] Plugin 'InnoDB' init function returned error. 2020-03-22 18:08:13 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 2020-03-22 18:08:13 0 [ERROR] Unknown/unsupported storage engine: InnoDB 2020-03-22 18:08:13 0 [ERROR] Aborting After more digging in this thread, it appears that this is because my filesystem is ReiserFS and this container is incompatible with it. Did anyone ever fix this glaring oversight?
-
OwnCloud Setup - PHP Moudles enable??
- Preclear.sh results - Questions about your results? Post them here.
Ah well that makes sense then. This should probably be clarified in the first post and the -h option of the script Thank you!- Preclear.sh results - Questions about your results? Post them here.
Here is a report from one of the drives if it helps: root@Tower:/boot/preclear_reports# cat preclear_rpt_\ WD-WCAWZ1116457_2011-09-26 ========================================================================1.13 == invoked as: ./preclear_disk.sh /dev/sdd == WDC WD30EZRX-00MMMB0 WD-WCAWZ1116457 == Disk /dev/sdd has been successfully precleared == with a starting sector of 1 == Ran 1 cycle == == Using :Read block size = 8225280 Bytes == Last Cycle's Pre Read Time : 8:57:54 (92 MB/s) == Last Cycle's Zeroing time : 10:32:46 (79 MB/s) == Last Cycle's Post Read Time : 18:46:40 (44 MB/s) == Last Cycle's Total Time : 38:18:19 == == Total Elapsed Time 38:18:19 == == Disk Start Temperature: 27C == == Current Disk Temperature: 33C, == ============================================================================ ** Changed attributes in files: /tmp/smart_start_sdd /tmp/smart_finish_sdd ATTRIBUTE NEW_VAL OLD_VAL FAILURE_THRESHOLD STATUS RAW_VALUE Temperature_Celsius = 119 125 0 ok 33 No SMART attributes are FAILING_NOW 0 sectors were pending re-allocation before the start of the preclear. 0 sectors were pending re-allocation after pre-read in cycle 1 of 1. 0 sectors were pending re-allocation after zero of disk in cycle 1 of 1. 0 sectors are pending re-allocation at the end of the preclear, the number of sectors pending re-allocation did not change. 0 sectors had been re-allocated before the start of the preclear. 0 sectors are re-allocated at the end of the preclear, the number of sectors re-allocated did not change. ============================================================================ Checking if it's cleared with -t: Pre-Clear unRAID Disk /dev/sdd ################################################################## 1.13 Device Model: WDC WD30EZRX-00MMMB0 Serial Number: WD-WCAWZ1116457 Firmware Version: 80.00A80 User Capacity: 3,000,592,982,016 bytes Disk /dev/sdd: 3000.6 GB, 3000592982016 bytes 255 heads, 63 sectors/track, 364801 cylinders, total 5860533168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sdd1 1 4294967295 2147483647+ 0 Empty Partition 1 does not end on cylinder boundary. Partition 1 does not start on physical sector boundary. ######################################################################## ========================================================================1.13 == == DISK /dev/sdd IS PRECLEARED with a GPT Protective MBR == ============================================================================ Trying to convert with -C 64: Pre-Clear unRAID Disk /dev/sdd ################################################################## 1.13 Device Model: WDC WD30EZRX-00MMMB0 Serial Number: WD-WCAWZ1116457 Firmware Version: 80.00A80 User Capacity: 3,000,592,982,016 bytes ######################################################################## Converting existing pre-cleared disk to start partition on sector 64 ========================================================================1.13 Step 1. Verifying existing pre-clear signature prior to conversion. DONE ========================================================================1.13 == == DISK /dev/sdd IS PRECLEARED with a GPT Protective MBR == Conversion not possible == ============================================================================ -C 63 nets the same thing..- Preclear.sh results - Questions about your results? Post them here.
Question! So I spent 40 hours running one preclear cycle on my drives, and I recall having to specify the -A to get the 4k alignment. I couldn't find the settings section that would let me specify what I want unRAID to use anywhere in the web interface (on the latest beta.) My drives are about to finish their last cycle any moment now and I just remembered I didn't specify -A.... Is there any way to check to see how they were formatted? edit: found this: http://lime-technology.com/forum/index.php?topic=12963.msg123077#msg123077 Could I use that once my preclear is finished since I missed the -A switch initially? edit again: now that im home, -C 64 and -C 63 both fail with: I hope I don't have to preclear again with -A - Preclear.sh results - Questions about your results? Post them here.