Jump to content

CS01-HS

Members
  • Posts

    479
  • Joined

  • Last visited

Posts posted by CS01-HS

  1. I experienced the problem below with my Cyberpower 685AVR and had to switch to the NUT plugin to work around it, which took some work. It's only an issue if you want your UPS to turn on after shutdown when power returns (so your devices boot automatically.) Otherwise I've been happy with it.

     

    From what I understand APC units don't have this problem.

     

  2. 6 hours ago, philippneistat said:

     

    I have binhex-qbittorrentvpn installed with a pia vpn, that so far works flawlessly.

    However, i tried to map another container's network to that of the binhex-qbittorrentvpn, Jdownloader2, with --network=container:binhex-qbittorrentvpn.

    But with Jdownloader i can't access the web-gui and it doesnt recieve any ports or ip.

    You need to delete the port mappings from the Jdownloader container and add them instead to the qbittorrentvpn container, instructions here: https://www.reddit.com/r/unRAID/comments/ejeo20/how_to_pass_any_docker_container_through_a_vpn_on/

  3. I use Duplicacy for local backups (network share and USB.) I recently restored two ~60GB VMs as a test, one from each source. Worked fine although you can't navigate away from the restore screen or it'll stop. Other than that and the hassle of the initial setup it's worked fairly well.

     

    Add the password as a container variable or automated backups after a container update will fail pending manual log in.554097545_ScreenShot2020-09-01at8_41_59PM.thumb.png.9eeadbc1dd44ededabd58d99ec455fba.png 

    • Thanks 1
    • Upvote 1
  4. 3 hours ago, David Spivey said:

    The main reason I intend to use unraid is because of dual parity and flexibility for swapping drives / adding drives as necessary.

    Right I was asking what you'd use it for. If, for example it's movie storage, a raspberry pi with a single external drive would be very low-power. I don't think many setups run 3 data and 2 parity so you may want to research the pros and cons.

     

    4 hours ago, SiNtEnEl said:

    Im running a low power NAS on a pentium chip, about 25watt idle with 6 disks incl. 1 cache SSD.

    That's impressive. I'm about 24W with 6 2.5", 2 cache but no ECC.

  5. 2 hours ago, harmar21 said:

    Am I missing something? Is there anyway I can pass through a controller without buying a new motherboard or sacrificing my one and only PCI slot (which I need for video card)?

     

    I have a Asrock asrock z490m-itz/ac motherboard

     

    I got around it using the M.2 slot (mine was limited to Key A+E)

     

  6. Today I saw evidence of AVR kicking.

    Voltage at the wall outlet was ~104V

    Voltage at the UPS was ~116V

     

    My UPS is set to High Sensitivity

     

    1675999593_ScreenShot2020-08-09at3_27_53PM.png.570db0f0efd7cab2a7397dcd365d6b1e.png

    $ upsc cyberpower | grep 'ups.status'
    Init SSL without certificate database
    ups.status: OL BOOST

     

     

  7. Purpose: Shut down MacOS gracefully prior to system shutdown to extend battery runtime

     

    Setup: 

     

    Requirements:

    • Xcode
    • Xcode command line tools
    • Macports

     

     

    1. Update macports

    sudo port selfupdate
    sudo port upgrade

     

    2. Install NUT

    sudo port install nut

     

    3. Create graceful shutdown script

    This will mimic Apple Menu -> Shutdown

    The upside: A clean startup (i.e. running apps won't be reopened on startup)

    The downside: User dialogs like save prompts will prevent shutdown

    sudo emacs /opt/local/etc/shutdown.applescript

    Paste:

    #!/usr/bin/osascript
    tell application "loginwindow" to «event aevtrsdn»

     

    4. Configure NUT client

    sudo cp /opt/local/etc/upsmon.conf.sample /opt/local/etc/upsmon.conf
    sudo emacs /opt/local/etc/upsmon.conf

    Change/add the following values, substituting mac-username, ups-name, nut-ip, remote-nutuser and remote-nutuser-password

    # Increase slave shutdown wait period
    HOSTSYNC 120
    
    # Works with pollinterval setting to prevent disconnection
    DEADTIME 25
    
    # Alerting twice/day about a battery change is excessive, make it once
    RBWARNTIME 86400
    
    # Replace (graceful shutdown)
    SHUTDOWNCMD "sudo -u mac-username osascript /opt/local/etc/shutdown.applescript"
    
    # Add monitor
    MONITOR ups-name@nut-ip 1 remote-nutuser remote-nutuser-password slave

     

    5. LaunchDaemon to run NUT on startup

    sudo emacs /Library/LaunchDaemons/org.networkupstools.upsmon.plist

    Paste:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
            <key>EnvironmentVariables</key>
            <dict>
              <key>PATH</key>
              <string>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/local/sbin:</string>
            </dict>
            <key>Label</key>
            <string>org.networkupstools.upsmon</string>
            <key>UserName</key>
            <string>root</string>
            <key>GroupName</key>
            <string>wheel</string>
            <key>ProgramArguments</key>
            <array>
                    <string>/opt/local/sbin/upsmon</string>
                    <string>-D</string>
            </array>
            <key>KeepAlive</key>
            <false/>
            <key>RunAtLoad</key>
            <true/>
    </dict>
    </plist>

    Enable:

    sudo launchctl load -w /Library/LaunchDaemons/org.networkupstools.upsmon.plist

     

    6. Configure upssched to trigger shutdown 5 minutes (300 seconds) after power loss

    sudo emacs /opt/local/etc/upsmon.conf

    Update/add the following:

    NOTIFYCMD "/opt/local/sbin/upssched"
    
    NOTIFYFLAG ONLINE SYSLOG+EXEC
    NOTIFYFLAG ONBATT SYSLOG+EXEC
    NOTIFYFLAG LOWBATT SYSLOG+EXEC

    Create the schedule config

    sudo cp /opt/local/etc/upssched.conf.sample /opt/local/etc/upssched.conf
    sudo emacs /opt/local/etc/upssched.conf

    Update/add the following:

    PIPEFN /opt/local/var/db/ups/upssched/upssched.pipe
    LOCKFN /opt/local/var/db/ups/upssched/upssched.lock
    
    # Start 5 minute shutdown timer when power's lost
    AT ONBATT * START-TIMER onbattwarn 300
    
    # Cancel timer if power comes back
    AT ONLINE * CANCEL-TIMER onbattwarn

    Create the pipe/lock directory

    sudo mkdir /opt/local/var/db/ups/upssched
    sudo chown _nut:_nut /opt/local/var/db/ups/upssched

    Create the command file

    sudo cp /opt/local/bin/upssched-cmd /opt/local/bin/upssched-cmd.orig
    sudo emacs  /opt/local/bin/upssched-cmd

    Paste:

    #! /bin/sh
    #
    # This script should be called by upssched via the CMDSCRIPT directive.
    #
    # Here is a quick example to show how to handle a bunch of possible
    # timer names with the help of the case structure.
    #
    # This script may be replaced with another program without harm.
    #
    # The first argument passed to your CMDSCRIPT is the name of the timer
    # from your AT lines.
    
    case $1 in
            onbattwarn)
                    logger -t upssched-cmd "Received signal: $1 ; Executing shutdown"
                    /opt/local/sbin/upsmon -c fsd
                    ;;
            *)
                    logger -t upssched-cmd "Unrecognized command: $1"
                    ;;
    esac

     

    7. (OPTIONAL) Prevent apps from re-opening after dirty shutdown

    If you have your iTunes or iPhoto libraries on networked drives and they open before the drive is mounted it will cause problems, so let's prevent that permanently by blanking the "open apps" files then making them un-writable

    sudo echo > ~/Library/Preferences/ByHost/com.apple.loginwindow*
    sudo chown root ~/Library/Preferences/ByHost/com.apple.loginwindow*
    sudo chmod 000 ~/Library/Preferences/ByHost/com.apple.loginwindow*

     

    8. Restart and confirm NUT client (upsmon) is running

    Apple Menu -> Restart

    ps -ef | grep upsmon

    All done!

     

     

    References:

    https://gist.github.com/hdml/fcad80f6d483709f5e51133669e8b7ca

    https://apple.stackexchange.com/questions/129327/avoiding-all-apps-reopening-when-os-x-crashes

    https://alvinalexander.com/mac-os-x/launchd-examples-launchd-plist-file-examples-mac/

    https://networkupstools.org/docs/user-manual.chunked/ar01s07.html

  8. I just updated and tested. (1) and (3) are fixed but re: (2) it looks like PAUSE (correctly) references the highest temperature disk but RESUME references the lowest temperature disk (it should be highest). Still, plenty good enough. Thank you.

    Aug  1 12:20:01 NAS parity.check.tuning.php: DEBUG: -----------MONITOR start------
    Aug  1 12:20:01 NAS parity.check.tuning.php: TESTING: parity temp=38 (settings are: hot=40, cool=35))
    Aug  1 12:20:01 NAS parity.check.tuning.php: TESTING: disk1 temp=40 (settings are: hot=40, cool=35))
    Aug  1 12:20:01 NAS parity.check.tuning.php: TESTING: disk2 temp=41 (settings are: hot=40, cool=35))
    Aug  1 12:20:01 NAS parity.check.tuning.php: DEBUG: array drives=3, hot=2, warm=1, cool=0
    Aug  1 12:20:01 NAS parity.check.tuning.php: Paused Non-Correcting Parity Check  (86.5% completed) : Following drives overheated: 40 41
    Aug  1 12:20:01 NAS parity.check.tuning.php: DEBUG: written PAUSE (HOT) record to  /boot/config/plugins/parity.check.tuning/parity.check.tuning.progress
    Aug  1 12:20:01 NAS parity.check.tuning.php: DEBUG: -----------MDCMD start------
    Aug  1 12:20:01 NAS parity.check.tuning.php: DEBUG: detected that mdcmd had been called from sh with command mdcmd nocheck PAUSE
    Aug  1 12:20:01 NAS parity.check.tuning.php: DEBUG: -----------MDCMD end-------
    Aug  1 12:20:01 NAS kernel: mdcmd (169): nocheck PAUSE
    Aug  1 12:20:01 NAS kernel:
    Aug  1 12:20:02 NAS kernel: md: recovery thread: exit status: -4
    Aug  1 12:20:02 NAS parity.check.tuning.php: TESTING: Heat notifications disabled so Pause Following drives overheated: 40 41  not sent
    Aug  1 12:20:02 NAS parity.check.tuning.php: DEBUG: -----------MONITOR end-------
    Aug  1 12:35:01 NAS parity.check.tuning.php: DEBUG: -----------MONITOR start------
    Aug  1 12:35:01 NAS parity.check.tuning.php: DEBUG: Parity check appears to be paused
    Aug  1 12:35:01 NAS parity.check.tuning.php: TESTING: parity temp=38 (settings are: hot=40, cool=35))
    Aug  1 12:35:01 NAS parity.check.tuning.php: TESTING: disk1 temp=40 (settings are: hot=40, cool=35))
    Aug  1 12:35:01 NAS parity.check.tuning.php: TESTING: disk2 temp=41 (settings are: hot=40, cool=35))
    Aug  1 12:35:01 NAS parity.check.tuning.php: DEBUG: array drives=3, hot=2, warm=1, cool=0
    Aug  1 12:35:01 NAS parity.check.tuning.php: DEBUG: Array operation paused but drives not cooled enough to resume
    Aug  1 12:35:01 NAS parity.check.tuning.php: DEBUG: -----------MONITOR end-------
    Aug  1 12:40:02 NAS parity.check.tuning.php: DEBUG: -----------MONITOR start------
    Aug  1 12:40:02 NAS parity.check.tuning.php: DEBUG: Parity check appears to be paused
    Aug  1 12:40:02 NAS parity.check.tuning.php: TESTING: parity temp=36 (settings are: hot=40, cool=35))
    Aug  1 12:40:02 NAS parity.check.tuning.php: TESTING: disk1 temp=34 (settings are: hot=40, cool=35))
    Aug  1 12:40:02 NAS parity.check.tuning.php: TESTING: disk2 temp=38 (settings are: hot=40, cool=35))
    Aug  1 12:40:02 NAS parity.check.tuning.php: DEBUG: array drives=3, hot=0, warm=2, cool=1
    Aug  1 12:40:02 NAS parity.check.tuning.php: Resumed Non-Correcting Parity Check  (86.5% completed)  as drives now cooled down
    Aug  1 12:40:02 NAS parity.check.tuning.php: DEBUG: written RESUME (COOL) record to  /boot/config/plugins/parity.check.tuning/parity.check.tuning.progress
    Aug  1 12:40:02 NAS parity.check.tuning.php: DEBUG: -----------MDCMD start------
    Aug  1 12:40:02 NAS parity.check.tuning.php: DEBUG: detected that mdcmd had been called from sh with command mdcmd check RESUME
    Aug  1 12:40:02 NAS parity.check.tuning.php: DEBUG: -----------MDCMD end-------
    Aug  1 12:40:02 NAS kernel: mdcmd (170): check RESUME
    Aug  1 12:40:02 NAS kernel:
    Aug  1 12:40:02 NAS kernel: md: recovery thread: check P ...
    Aug  1 12:40:02 NAS parity.check.tuning.php: TESTING: Heat notifications disabled so Resume Drives cooled down not sent
    Aug  1 12:40:02 NAS parity.check.tuning.php: DEBUG: -----------MONITOR end-------

     

  9. 14 minutes ago, itimpi said:

    Any chance you can ssh into your system and make a copy of the file /var/local/emhttp/disks.ini.

    Happy to. Attached with identifying information anonymized (I think.)

    14 minutes ago, itimpi said:

    missing ‘$’ on a variable name so easy to fix.

    If I had a nickel...

    14 minutes ago, itimpi said:

    BTW:  Much as I would like to take credit the MacVM docker is nothing to do with me.

    Ha! Yeah I realized I confused you two and edited my post but not in time (my apologies.)

    disks.ini.txt

  10. First, thanks for this very handy plugin.

    I think there are minor bugs in the temperature-pausing code:

    1. The assigned-slots check (which I believe you just added) reports an incorrect total. I have 3 array disks, 2 cache disks and 4 Unassigned Devices disks. The plugin shows 4 total (I assume array) disks
    2. Parity check is paused with hot=1, warm=2, cool=1 and resumed with hot=1, warm=1, cool=2. Seems like pause/resume should be based on hot alone
    3. The PAUSE debug reports the label of the overheated drive as "temp"
    Aug  1 07:50:01 NAS parity.check.tuning.php: DEBUG: -----------MONITOR start------
    Aug  1 07:50:01 NAS parity.check.tuning.php: DEBUG: Parity check appears to be paused
    Aug  1 07:50:01 NAS parity.check.tuning.php: DEBUG: drives=4, hot=1, warm=2, cool=1
    Aug  1 07:50:01 NAS parity.check.tuning.php: Resumed Non-Correcting Parity Check  (57.8% completed)  as drives now cooled down
    Aug  1 07:50:01 NAS parity.check.tuning.php: DEBUG: written RESUME (COOL) record to  /boot/config/plugins/parity.check.tuning/parity.check.tuning.progress
    Aug  1 07:50:01 NAS parity.check.tuning.php: DEBUG: -----------MDCMD start------
    Aug  1 07:50:01 NAS parity.check.tuning.php: DEBUG: detected that mdcmd had been called from sh with command mdcmd check RESUME 
    Aug  1 07:50:01 NAS parity.check.tuning.php: DEBUG: -----------MDCMD end-------
    Aug  1 07:50:01 NAS kernel: mdcmd (162): check RESUME
    Aug  1 07:50:01 NAS kernel: 
    Aug  1 07:50:01 NAS kernel: md: recovery thread: check P ...
    Aug  1 07:50:01 NAS parity.check.tuning.php: DEBUG: -----------MONITOR end-------
    Aug  1 07:55:01 NAS parity.check.tuning.php: DEBUG: -----------MONITOR start------
    Aug  1 07:55:01 NAS parity.check.tuning.php: DEBUG: drives=4, hot=1, warm=1, cool=2
    Aug  1 07:55:01 NAS parity.check.tuning.php: Paused Non-Correcting Parity Check  (58.4% completed) : Following drives overheated: temp 
    Aug  1 07:55:01 NAS parity.check.tuning.php: DEBUG: written PAUSE (HOT) record to  /boot/config/plugins/parity.check.tuning/parity.check.tuning.progress
    Aug  1 07:55:01 NAS parity.check.tuning.php: DEBUG: -----------MDCMD start------
    Aug  1 07:55:01 NAS parity.check.tuning.php: DEBUG: detected that mdcmd had been called from sh with command mdcmd nocheck PAUSE 
    Aug  1 07:55:01 NAS parity.check.tuning.php: DEBUG: -----------MDCMD end-------
    Aug  1 07:55:01 NAS kernel: mdcmd (163): nocheck PAUSE
    Aug  1 07:55:01 NAS kernel: 
    Aug  1 07:55:01 NAS kernel: md: recovery thread: exit status: -4
    Aug  1 07:55:01 NAS parity.check.tuning.php: DEBUG: -----------MONITOR end-------

     

  11. 42 minutes ago, jwolfe said:

    Sure. Here are the two scripts I use to take drive temp and also to see if the disk is spun up.

    Thanks, I meant the Grafana pane settings, maybe a screenshot of the query and customizations if you don't mind?

     

    I'm collecting the relevant data with the HDDTemp docker and have everything displaying properly except for spin-up which I couldn't figure out.

     

    1802480241_ScreenShot2020-07-27at12_37_50PM.thumb.png.be17a62fee1917c295429edc1f72af03.png

    • Like 1
  12. I've got PCI passthrough working for a USB controller (Renesas uPD720202) with the following XML. Mojave recognizes it but performance is terrible, it can't even keep up with mouse movements.

     

    Is there a known solution or path to investigate?

        <hostdev mode='subsystem' type='pci' managed='yes'>
          <driver name='vfio'/>
          <source>
            <address domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
          </source>
          <alias name='hostdev1'/>
          <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
        </hostdev>

     

  13. Rebuild-DNDC will automatically restart the main container (qBittorrent) as well so it'd help if you lose connectivity but it looks like you haven't since the curl command returns your VPN IP.

     

    I don't see any inactivity timeouts in my log just a series of successful curl commands to portchecker.co

     

    Sorry I can't help more.

  14. Next time it happens test container connectivity by running something like:

    docker exec -it vpn curl ipinfo.io

    I renamed my container vpn. Substitute whatever name you have in the command above. If everything's working it should return your VPN IP and additional details.

     

    To test the connection and restart containers automatically you can run Rebuild-DNDC available in the Community Apps. Detailed description here:

    https://github.com/elmerfdz/rebuild-dndc

×
×
  • Create New...