Beiträge von ravennevar

    Thanks for letting me know! That's a great news! :) I have updated the script. Can you please try the latest version? I've made also some formatting improvements. Just replace the script file and use your current config file.

    Sorry this took a while, but it was a busy week for me. I've tested the new version of the script with my original config file and everything works great! Disks spinning down as expected. Please let me know if you need additional assistance testing anything. Thanks again for your efforts on this script!

    You can use hd-idle on its own.

    The script could also use hd-idle to immediately spin down drives after operations, but this part doesn't work: spins down but immediately after the drives are enabled. I still haven't managed to sort this issue :(

    Not sure if this will help or not, but this is what I did. Before even setting up SnapRAID I had installed hd-idle many months ago per your instructions (Thanks!!) and it was working fine. It was working fine with SnapRAID set up too. Now, once I began running the SnapRAID script, the drives were not spinning down. First thing I did was double-check the script config file and I had it set up to not spin down, so I obviously changed it. That did not change the outcome. It showed in the log file as spinning the disks down, but they never did. All along, hd-idle had been running in the system. Next, I checked the script file and realized that the spindown method 1 was the one that was set active by default. I commented it out and set the method 3 for hd-idle as the active one. It started working after that without issues. Have tested it about 8 times already, with multiple reboots. In summary: Method 1 (SnapRAID spindown) + hd-idle (previously set up and configured) = not working; Method 3 (hd-idle spindown) + hd-idle (previously set up and configured) = working!

    Yes, the device appeared under Disks in OMV. When I ran blkid the hard drive was showing. When I ran lsblk the hard drive was showing but had no partition associated with it. It is as if it lost the partition. I am sure my data was there. Is there a way to recreate the reference to a partition in this type of situation? After SnapRAID restore, hard drive has been working fine, just as before. I am really not sure what happened here, since all I did was unplug and then later replug a drive while the server was powered off.


    Next, I will try the to restore a missing drive to the available space on my disks and will post of any issues.


    auanasgheps


    The SnapRAID script is working wonders! I understand that there is an issue with hd-idle when the SnapRAID script is used. I have hd-idle set up and it was working as expected, but when the SnapRAID script wakes up the disks, they fail to spin down again after the script is done and the allotted time has passed. EDIT: I have tested it several times and it is working fine. HDDs spin down after the SnapRAID script runs and the allotted hd-idle time runs out.


    Thanks everyone!

    Thank you for the information gderf ! It ended up being very useful.


    In a way I was "forced" to restore the full drive. I was initially going to do this and disconnected the drive to simulate a failure. However, I decided against it and just test out the "undelete" option on a few files. The thing is, when I reconnected the drive it was showing in OMV, but the file system was missing. I searched but could not find a way to tell OMV that this disk already had a file system and files on it. So I ended up wiping it and restoring from SnapRAID, which took a while and worked fine.


    Now, I have two questions:


    1. First, in the event this ever happens to me again, either by my own making or some failure, what would have been the proper steps to get my partition mounted again in OMV without having to format the drive? My data was there for sure and the drive was properly partitioned (I just unplugged and replugged it when the server was shut down), but I believe OMV lost the connection to the partition when the drive was assigned a new UUID upon reconnection.
    2. What would be the process to restore the data to the space left on my other to HDDs? Right now I have 5 8TB disks. Three of them are in mergerfs and these are set up properly with SnapRAID. The other two are parity drives. With the way I have mergerfs set up, each drive has about 3TB of data in it. If I remove one of them permanently, how do I restore that data to the available space in one of my other data HDDs (which should be sufficient for the 3TB)?

    Thank you!

    I have read the SnapRAID manual, but that does not mean someone without much experience (like me) will be able to understand all of the things that are mentioned there, especially when it is written from a CLI standpoint. Hence, I come to these forums for assistance before I mess up something and make my data unrecoverable.


    You are very likely referring to the 4.4.1 -Reconfigure Step. For example, it states "Change the SnapRAID configuration file to make the "data" or "parity" option of the failed disk to point to the place where you have enough empty space to recover the files". The first issue is that I have no idea where to find and how to modify the SnapRAID configuration file. Can this be done from the GUI? The other question that I have is regarding the space. Yes, I know I need to find a location for the files to be rebuilt that has enough space for those files. The problem is, how do I tell SnapRAID from the GUI to rebuild what used to be sdc into the space that is left in both sda and sdb, which are part of my original 3 content and data disks in SnapRAID (i.e., sda, sdb, and sdc)? I mention both sda and sdb, because I may not have enough space for the data that was on sdc in one of those single drives. Let's look at a different scenario and say there is enough space. How do I modify the SnapRAID configuration file that currently points to sdc as a data/content disk to now point to sda for the place to recreate that data? Should I just edit sdc under Drives and change the drive to sda? Will I end up with 2 sda drives in the SnapRAID configuration?


    I think these are valid questions and I have always appreciated the support I have received in these forums. Again, this is just an exercise to make sure I am able to handle an actual failure when it happens.


    Thanks in advance for your help!

    auanasgheps


    Thanks for the info! I think I may have to properly configure SMTP for the email aspect of it to work.


    Regarding simulating a hard drive failure, I am a bit confused. I started by disconnecting one drive that contains data and powering on the server. It shows as missing from the File Systems area and "n/a" under Branches in the Union Filesystems area. If I run a Status command under SnapRAID in OMV, no issues show up and the drive still shows when I run a Devices command. Now, if I run a Fix command, I get the following error:


    Code
    Reading data from missing file '/srv/dev-disk-by-label-sdc/Media/Movies/movie.avi' at offset 1696858112.
    Error writing file '/srv/dev-disk-by-label-sdc/Media/Movies/movie.avi'. No such file or directory.
    WARNING! Without a working data disk, it isn't possible to fix errors on it.
    Stopping at block 16499
    
        6474 errors
        6473 recovered errors
           1 UNRECOVERABLE errors
    DANGER! There are unrecoverable errors!


    So it detects that a file is missing and starts writing it back but it fails. Is this due to not having replaced the disk that was removed to simulate the failure with another working disk? If so, does the disk need to be the same size as the previous one or can it be smaller as long as the data being replaced fits on it? Will SnapRAID just rebuild the files onto that disk or can it rebuild them onto other disks in the mergefs setup?

    auanasgheps


    Thank you so much for your response! I was able to run the script and this is what I got:


    Code
    [2021-09-12 03:00:01] snapraid-aio-script.sh: INFO: 'SnapRAID Script Job started'
    [2021-09-12 03:00:01] snapraid-aio-script.sh: INFO: 'Running SnapRAID version 11.5 '
    [2021-09-12 03:00:01] snapraid-aio-script.sh: INFO: 'SnapRAID Script version 3.1.DEV4'
    [2021-09-12 03:00:01] snapraid-aio-script.sh: INFO: 'Script configuration file found.'
    [2021-09-12 03:00:01] snapraid-aio-script.sh: INFO: 'Checking SnapRAID disks'
    [2021-09-12 03:00:01] snapraid-aio-script.sh: INFO: 'Checking if all parity and content files are present.'
    [2021-09-12 03:00:10] snapraid-aio-script.sh: WARN: 'Parity file (/srv/dev-disk-by-uuid-5b81f063-1e18-4988-b250-22b75df42ce3/snapraid.parity) not found!'
    [2021-09-12 03:00:10] snapraid-aio-script.sh: WARN: 'Please check the status of your disks! The script exits here due to missing file or disk.'


    I currently have no files on those disks. Is that the reason it failed? I am moving some files now from another location and should be able to test the script again afterwards. EDIT: I added the files and had the same result. Does the sync need to be run manually once before the script takes over?


    Is it normal to not receive an email if the script fails? Also, is the email in the config script supposed to include the "" (e.g., "myemail@email.com") or entered without them?


    Do you know if there is a guide out there somewhere about what to do with SnapRAID from the OMV5 GUI in case of a disk failure? I was thinking that since I am migrating data from another OMV installation running SnapRAID, that I could use that hardware to simulate a drive failure and see how the process would flow. This would help me be ready in case it ever happens in real life.

    auanasgheps Thanks for this script! I have been looking for a way to automate SnapRAID in OMV5.


    I downloaded your script on my PC (Win10) and would like to customize and deploy it to my OMV5 installation. Could you provide more detailed steps on how to achieve that? I know that I can very likely customize it using Notepad++, but I have absolutely zero clue how to deploy it to OMV and schedule it. As you can tell, my experience with Linux is limited, but I can make things work with some guidance. Any help is appreciated. Thanks!

    Plex seems to be working again now. But still having issues with krusader and FileZilla. It still feels like permissions were affected when I updated, since folders that were previously used with these two dockers are no longer accessible even though there is data in there. Is there a way to list the most recently installed updates?

    Reinstalled krusader docker to no avail. Now also having issues with Plex docker. Does this have anything to do with a new kernel? If so, how do I fix this? My current OMV version is "4.1.26-1 (Arrakis)" and kernel is "Linux 4.19.0-0.bpo.6-amd64". Any other ideas are appreciated. Thank you!

    Hello,


    I just ran a set of upgrades that were found by OMV. They installed fine. However, I am now having issues with the FileZilla and Krusader dockers. It seems like permissions are all messed up. I lost access to my "downloads" folder under the "sharedfolders" and the only way I can gain access to it is if I point the docker to the actual folder under "srv". I have tried doing the same for Krusader, but it does not work anymore. Using WinSCP is also causing some issues. I am accessing using root and am not able to access my "downloads" folder, except by going to the actual folder in "srv", again. I ran updates about a month ago without issues. I am running mergerFS and SnapRAID. Any help is appreciated, as I do not want to go about making changes without some guidance. Wouldn't want to mess this up more than it is at the moment.


    Thanks!

    In your VPN settings under routing you have 172.17.0.0/16. Where did that come from? I would have the private network of the machine there.


    But I do not use this VPN setup myself. If I needed inward VPN access to my network, it would be running on the router.

    @gderf: That address is added by the OpenVPN server. In your opinion, are there any specific advantages/disadvantages to having the OpenVPN running on the router vs. OMV? This may be something that I could also try. Thank you for your help.


    After reviewing all of the steps in the setup video and looking into other areas of the OpenVPN admin page, there is one thing that is missing from the video which I believe is critical for users to be able to access their OMV admin page. Under Configuration -> VPN Settings -> Routing, you need to specify the private subnets to which OpenVPN clients will have access to, otherwise any valid connection to the OpenVPN server will only have access to the OpenVPN-created network (172.27.224.0, see picture above). So basically, you need to add your local network and subnet mask in that box (e.g. 192.168.1.0/24, or whatever your local network address is). This should allow you to connect using OpenVPN and access your different internal IP addresses.


    My next step is to figure out how to use an SSL certificate created with the Letsencrypt Docker in OMV. I would like to first start with the OMV admin page, so that I can connect using https. I know how to switch to https, but cannot find a way to add the Letsencrypt certificate.

    Yes, I am using the exact IP address that I use for connecting to my OMV from my LAN. I am also trying this from two totally different networks, including a cell phone. Both the cell phone and Windows clients can establish a connection to OpenVPN-as on my OMV server (I can confirm the clients are connected on the OpenVPN admin page). Port is forwarded in the router. Please see attached. These are the VPN settings for the OpenVPN server. Is the Routing part, private subnets, set correctly or does my local subnet need to be added there too?

    Thank you @gderf for your response. I have tried my local OMV IP as "https://192.168.x.x:943/admin" when connected through OpenVPN and it still does not work. But then again, 192.168.x.x:943 is the OpenVPN address on my local network on OMV. Even if I do just https://192.168.x.x, I get nothing and that would be the address to my OMV. I am currently connected using OpenVPN and it is assigning me an IP in the 172.27.224.x range, which is apparently what it defaults to. Could this be the problem? Any other suggestions? Thank you.

    Can you please define "securely" ?


    port forward from your router to the installation of OMV ( I assume it is https:// and you are not using default password) done
    Are you afraid of exposing OMV to internet ? Why? Change port for more obscurity

    The security part is already taken care of with OpenVPN. The problem is that I still cannot figure out how to access my OMV admin panel. I can connect with OpenVPN (so far it has been running for 4 days without issues), but I am not sure if I am missing something that is causing me to not be able to access the admin page. I have followed @TechnoDadLife's guide completely.

    Hi @TechnoDadLife! I managed to follow your tutorial but I am encountering two issues. First, I can get Openvpn-as installed and connectable. However, after an unspecified amount of time, it is no longer accessible even though the Docker image is still running and DuckDNS is working fine. I have restarted the image and OMV server to no avail. The only way I have found to fix this is deleting the running image and creating a new one based on your steps. It then becomes accessible again for an unknow amount of time (but with new profiles that need download, etc.). Any idea why this might be happening? I would love to have it stable, but so far I have had to reinstall 4 times to get it back up and working. I reinstalled one day ago and it is still working.


    The other issue that I am having is that once I get it working (for whatever limited time) I am not really sure how to access my OMV admin panel, as well as other services running on the server and my network. I have tried https://myduckdnsname.duckdns.org:943/admin and I get nothing. I have also tried my actual IP and get the same. Is there something I may have missed during installation? I believe I followed all steps 100%. The OpenVPN application automatically assigns an IP in the 172.27.224.0 range. Not sure what else needs to be done or enabled to be able to reach and manage my OMV install.


    Thanks in advance for anyone's assistance.

    Hello,


    I have been looking for a guide to set up remote management securely on my OMV installation, but have not been successful. I have read about using OpenVPN but can't seem to find a post, document, or video that would guide me in accomplishing this. I need to be able to manage my installation from a remote location. Any pointers are appreciated.


    Thanks!