Beiträge von willowen100

    Hi


    I have quite a severe problem in which USB HDDs connected to a USB hub are not spinning down when the computer shuts down. This of course leaves me to forcefully power off the drives while they are still spinning. I've seen on other forums mentioning the Power-Off_Retract_Count attribute within S.M.A.R.T goes up and an audible clanking noise is heard. The quote from ODROID forums explains this too.

    Zitat

    "Symptom:

    With my mechanical harddisk everytime I shutdown I hear a noticeable *clack* sound from the disk.

    Everytime this happens this increases the SMART attribute "Power-Off_Retract_Count" by 1.

    This is indicative of a "hard" power cut to the disk, meaning emergency head parking is performed, which reduces the lifespan of the disk faster than normal head parking."

    Users on the ODROID forum have managed a workaround by using 'hdparm'. They come up with a script like the one below which runs through all the block storage devices and issues the 'put drive to sleep' command.

    Now while this script powers down the HDD's I'm having a difficult time trying to get this to work when the system shuts down. I'm fairly good with Linux but I have no idea how to get shutdown scripts to work. I've done some reading on SysVinit versus Systemd I understand creating scripts in '/etc/init.d/' and making a symbolic links to found at '/etc/init.d/' to 'rc.d/'. Most Unix systems use 'systemd' so I've tried to create a shutdown service such as the one below. For testing purposes I've disconnected all but one HDD and targeted a specific HDD I can use to constantly spin up and down within the script as I rather not do damage to drive with my data on.

    Bash: /root/hdd-shutdown.sh
    #!/bin/sh  
    hdparm -Y /dev/sdb && sleep 3  

    I would have liked to use udisksctl as this a dedicated power-off command. Unfortunately it doesn't work with shutdown scripts according to a forum I found somewhere. Someone was saying it has something to do wit D-Bus shutting too early therefore when the shutdown script tries to run the dependencies are not there.


    Any ideas how I can a working shutdown script that will shutdown my HDDs safely?

    Or set the network on the cli with omv-firstaid.

    That restores creates two files at /etc/nteplan

    • 10-openmediavault-default.yaml
    • 20-openmediavault-eth0.yaml

    So there isn't any config conflicts between OMV's generated config I've renamed my /etc/netplan/eth0.yaml file to /etc/netplan/eth0.yaml.old.


    /etc/netplan/eth0.yaml


    For reference I've included the OMV generated config file

    /etc/netplan/20-openmediavault-eth0.yaml


    However, DNS is not behaving as I would expect. I think the /etc/resolv.conf file is still pulling in the DNS's from DHCP.

    If you are using such a simple config for networking, why are you skipping networking on the install script? It will convert to netplan. If you are doing this because your router hands out a different IP after, I don't think that is a good reason.

    When I installed the script the first time around purely for testing I didn't specify the skip the network setup (-n) parameter, therefore the web-GUI showed working DHCP and DHCPv6. I found that when I moved over to Netplan DHCPv6 wouldn't work despite the web-GUI saying it was. Is there a way to configure Netplan on my currently installed system; is it a case of re-running the install script?

    DNS name resolution keeps dropping from my server but I'm unsure what's causing it.


    Prior to running the OMV install script I created the config file to configure the network interface(s).

    /etc/network/interfaces.d/eth0

    Code
    allow-hotplug eth0
    auto eth0
    iface eth0 inet dhcp
    #       dns-nameservers 172.16.101.1
    iface eth0 inet6 dhcp
            accept_ra 2
    #       dns-nameservers fdb0:dead:beef:101::1


    Both DHCP and DHCPv6 are working, I'm able to ping both addresses from another PC and also do DNS lookups on both protocols from the server too. When I executed the script I ran it with the skip the network setup (-n) and enable using IPv6 for apt (-i) parameters.

    Code
    wget https://github.com/OpenMediaVault-Plugin-Developers/installScript/raw/master/install
    chmod +x install
    sudo ./install -n -i


    With OMV now installed, in regards to DNS the first problem I have is /etc/resolv.conf only shows the IPv6 DNS IP address yet I would like to show the IPv4 too so it can fallback to IPv4 in the event IPv6 has a hiccup.

    Code
    $ ls -la /etc/resolv.conf 
    lrwxrwxrwx 1 root root 32 Apr 13 11:50 /etc/resolv.conf -> /run/systemd/resolve/resolv.conf
    $ nano /etc/resolv.conf
    nameserver fdb0:dead:beef:101::1


    However, after several minutes /etc/resolv.conf gets overwritten and breaks all DNS functionality.


    Any ideas how I can get /etc/resolv.conf to pull the DNS servers from DHCP/DHCPv6 and list both nameservers after one another?

    Sorry for the late reply. Unfortunately I'm not having any luck updating the webgui after making changes to files done via CLI. If I inspect the /etc/systemd/logind.conf file HandlePowerKey = ignore  matches with the webGUI.

    51993281655_cb75c78c37.jpg


    However, if I change HandlePowerKey = ignore to HandlePowerKey = poweroff[tt] using the following command[tt]sed -i 's/^#*HandlePowerKey.*/HandlePowerKey = poweroff/' "/etc/systemd/logind.conf"

    the webGUI is not updating.


    I've tried all sorts of the omv-salt commands and all I am aware of is the delpoy command replaces the parameter within the /etc/systemd/logind.conf file with the default OMV settings.

    I have a lengthy post-install script for my Debian server in which I also install OMV onto. I'm trying to make some modifications to config files from CLI but they aren't updating on the OMV web-GUI and this means I constantly see the 'Apply' configuration button.


    Is there anyway of updating the front-end so that it reflects the changes done in the back-end via CLI?

    I've recently re-formatted two USB 3 HDD's through CLI using parted, fdisk and mkfs.ext4 but I'm having issues actually mounting it with OpenMediaVault. The partition I'm trying to mount is /dev/sdb1 which has a EXT4 label DATA1.



    As soon as I apply the changes I'm presented with a large error message referring to quotas.


    The full error log can be seen below.

    https://pastebin.com/vQ0Cdprt


    Could someone explain what's going on here please?

    Hi


    Is there a way reconfiguring the install button for Portainer on the web-UI found under System > omv-extras >Portainer?

    I would like to modify the Docker run command to use a different bind mount.

    I would like to modify the Docker run command to something like this:

    Code
    docker run -d -p 9000:9000 -p 8000:8000 --name portainer --restart always \
    -v "/srv/docker/appdata/portainer/data:/data" \ 
    -v "/var/run/docker.sock:/var/run/docker.sock" \
    portainer/portainer-ce

    The days of manually "parking heads" before shutdown are long over. If power is removed from modern hard drives, as in the PC's cord is yanked from the wall or a power of is forced with the power button, hard drives are designed to autopark their heads while gliding on the cushion of air created by the still spinning platters. It works quite well.

    That sounds relieving. Is there a way I can diagnose why my USB switch that has the HDDs attached to it doesn't spin the HDDs down when my SoC shuts down?

    Hi


    I have a scheduled job that automatically shuts down my Rock64 running OMV 5 at a specific time at night. Sadly my Rock64 doesn't support automatic startup so the only way to power it on is manually either using the physical power button or removing complete power (also pulling out the power barrel connector) and restoring the power. To get around this I use smart plugs to wake it up again.


    Now, powering on and off the equipment with the smart plugs isn't a problem except that when OMV shutdowns it's not safely powering off the HDDs too. This means when my smart plugs eventually power off the powered, USB 3 hub a couple of minutes later with the HDDs connected to it, it is forcefully cutting the power to fully spinning HDDs.


    I can rule out the hub not being the problem because safely ejecting the device in Windows gracefully spins down the HDDs.


    The automatic shutdown feature found at `System > Power Management` is very basic. Obviously first of all it's not spinning down the HDDs properly and secondly when a data transfer on SMB for example is in progress the automatic shutdown proceeds anyway without checking for system activity.


    I thought about using an additional Cron job to unmount and sleep the drives using `sudo hdparm -y /dev/sda1` but that caused issues when rebooting just the Rock64 alone. The HDDs seemed to be stuck in an infinite sleep and the Rock64 was unreachable until I completely power cycled the HDDs off and back on.


    The interesting thing is if I connect the external HDDs directly to the Rock64 eliminating the USB 3 hub, when I shutdown the Rock64 the HDDs do in fact power off but they don't do it gracefully and it's as though I'm just ripping the power out while they are running at full RPM, very much like what the smart plug does. Conversely, I would expect the shutdown stage to spin the HDD down then power off. All of this sudden powering off to the HDDs won't do the HDD heads any good.


    Any ideas how to get this working please?

    Leaving the box blank didn't work on the version of OMV I was running at the time of writing the post hence why I had to specify the full path manually. The good news is that it seems to working now, now that I've done a clean install of OMV to the latest version. The only change with the configuration is shared folder paths now use UUID's.


    Below are the steps I have taken to change the default path for Docker:

    1) I created a directory 'docker' at '/etc'

    2) I created a file daemon.json at '/etc/docker' and set permissions to that I could write to the file over a SFTP client

    3) I used a SFTP client on Windows to edit the file and entered the following:

    Code
    {  "data-root": "/srv/dev-disk-by-uuid-dceac721-a86b-4d95-9866-c79109fbe9ca/AppData/Docker"}

    4) I went to the web-GUI > OMV Extras > Docker, cleared the 'Docker Storage' field and clicked the 'Save' button.

    5) After the settings had been applied I clicked install

    6) Docker is successfully installed and running

    I'm trying to install Docker to a custom folder rather at the default location of /var/lib/docker. The official Docker documentation says you can specify the default location by specifying data-root in the daemon.json file located /etc/docker/daemon.json. More info can be found here.


    In the OMV web-GUI the Docker storage field says "Leave blank to use custom /etc/docker/daemon.json." which I have done but Docker never seems to be able to install and start. Below is the contents of the daemon.json file:

    Code
    {
      "data-root": "/srv/dev-disk-by-label-DATA1/AppData/Docker"
    }

    However, specifying the new Docker installation path in the field as detailed in the guide here allows Docker to be installed and start up.

    50938529858_507f68cb7c_b.jpg


    Any idea what's going on here?

    /var/log/nginx/openmediavault-webgui_access.log



    /var/log/auth.log


    Code
    Dec  1 18:41:44 OMV-SERVER openmediavault-webgui[3763]: Authorized login from ::ffff:192.168.1.100 [username=admin, user-agent=Mozilla/5.0 (Android 8.1.0; Mobile; rv:83.0) Gecko/83.0 Firefox/83.0]
    Dec  1 18:42:01 OMV-SERVER CRON[3775]: pam_unix(cron:session): session opened for user root by (uid=0)
    Dec  1 18:42:01 OMV-SERVER CRON[3775]: pam_unix(cron:session): session closed for user root

    Hi


    I've recently installed OMV 5 onto my Rock64 running Debian Buster using the script found on GitHub.


    I'm trying to access the WebGUI via my mobile phone on Firefox's mobile browser app, but every time I login it loops back to login screen. Weirdly I can access and log into the WebGUI with Google Chrome and Microsoft Edge perfectly fine, but Firefox is my preferred browser but it's not working. I never had any of these problems with OMV 4, however, Firefox mobile was using its old code at the time compared to the current version of Firefox which within the last couple of months the app has been redesigned so it could be that too. It's like something configured on the web server Firefox doesn't like.


    Has anyone else experience this?