flash memory plugin and nginx restart on clean install

  • I am trying to repurpose a macmini for omv (mainly for testing/learning). Have made good progress but have a couple of issues that I need a bit of help with.


    1. The omv iso installer creates a linux swap partition on the install disk (a usb flash drive). After a bit of work I have managed to remove the swap and clean up system (update-initramfs). Is there a way to run the standard install without creating a swap partition? Should I start with a debian netinstall then install OMV?


    2. After dealing with 1 above, i have installed the flash memory plugin. On restart the system comes up fine but I see that nginx does not start normally and monit restarts it. Any thoughts on why this is happening? The macmini is old (2012) so I thought it might have something to do with the RAM?


    Any advice appreciated.


    thanks.

    OMV 8 (latest) on N100 minipc (16GB) and rpi5 (8GB). OS on SSD/SD. System ext4 on SSD. Data BTRFS on HDDs

  • I have found some logs relating to nginx that might be helpful.


    But the file does exist (/var/log/nginx/error.log) but I think it is created when the service restarts...


    Code
    root@macmini:~#  journalctl -u nginx -b
    Jan 09 07:55:36 macmini systemd[1]: Starting nginx.service - A high performance web server and a reverse proxy server...
    Jan 09 07:55:37 macmini nginx[784]: 2025/01/09 07:55:36 [emerg] 784#784: open() "/var/log/nginx/error.log" failed (2: No such file or directory)
    Jan 09 07:55:37 macmini nginx[784]: nginx: configuration file /etc/nginx/nginx.conf test failed
    Jan 09 07:55:37 macmini systemd[1]: nginx.service: Control process exited, code=exited, status=1/FAILURE
    Jan 09 07:55:37 macmini systemd[1]: nginx.service: Failed with result 'exit-code'.
    Jan 09 07:55:37 macmini systemd[1]: Failed to start nginx.service - A high performance web server and a reverse proxy server.
    Jan 09 07:56:04 macmini systemd[1]: Starting nginx.service - A high performance web server and a reverse proxy server...
    Jan 09 07:56:04 macmini systemd[1]: Started nginx.service - A high performance web server and a reverse proxy server.

    OMV 8 (latest) on N100 minipc (16GB) and rpi5 (8GB). OS on SSD/SD. System ext4 on SSD. Data BTRFS on HDDs

  • Tried to redeploy nginx using omv-salt deploy run nginx


    It did make a few updates/changes but I still have the same issue on restart. Strange thing is that when monit attempts to restart nginx it is all fine.



    OMV 8 (latest) on N100 minipc (16GB) and rpi5 (8GB). OS on SSD/SD. System ext4 on SSD. Data BTRFS on HDDs

    • Official Post

    Is there a way to run the standard install without creating a swap partition?

    Nope


    Should I start with a debian netinstall then install OMV?

    Yes. you end up with basically the same results either way. That is what the install script was written for.


    After dealing with 1 above, i have installed the flash memory plugin. On restart the system comes up fine but I see that nginx does not start normally and monit restarts it. Any thoughts on why this is happening? The macmini is old (2012) so I thought it might have something to do with the RAM?

    Slow storage? Has nothing to do with the ram. If you shutdown improperly, the folder2ram sync is probably bad. If you fix the issue, I would manually run the sync in the flashmemory plugin.

    omv 8.0.8-1 synchrony | 6.17 proxmox kernel

    plugins :: omvextrasorg 8.0.2 | kvm 8.0.4 | compose 8.1.2 | cterm 8.0 | borgbackup 8.0.2 | cputemp 8.0 | mergerfs 8.0 | scripts 8.0.1 | writecache 8.1


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Thanks ryecoaaron.


    System boots fine with no issue with nginx when I uninstall the flash memory plugin. If I reinstall the plugin then the issue returns. I have tried to sync the flashmemory plugin but it doesn't fix the issue. It's a relatively new usb 3.2 sandisk flash drive so hope it is fast enough

    OMV 8 (latest) on N100 minipc (16GB) and rpi5 (8GB). OS on SSD/SD. System ext4 on SSD. Data BTRFS on HDDs

  • In relation to Q1 above. Can you confirm that if I use the debian netinstall I can customise the disk config to not include a swap partition? Then run the script to install OMV?

    OMV 8 (latest) on N100 minipc (16GB) and rpi5 (8GB). OS on SSD/SD. System ext4 on SSD. Data BTRFS on HDDs

  • In relation to Q1 above. Can you confirm that if I use the debian netinstall I can customise the disk config to not include a swap partition? Then run the script to install OMV?

    Fire up a VM and select manual partitioning.

    See if it is possible.


    I might do that tomorrow just for fun.

  • Fire up a VM and select manual partitioning.

    Doing a new install on another usb flash drive using the debian netinstall. I can confirm that you can use manual and guided partitioning and remove the swap partition as part of the process.


    Will continue to install OMV using the script and see if I can resolve this flash memory / nginx issue...

    OMV 8 (latest) on N100 minipc (16GB) and rpi5 (8GB). OS on SSD/SD. System ext4 on SSD. Data BTRFS on HDDs

  • Lost patience with installing OMV on usb flash drives... I already have 3 OMV servers on my network so I guess that is enough. LOL.


    So just installed Proxmox VE directly on the SSD on the mac. Working great. Will only switch it on to play/test stuff from time to time. Bit of a waste of a good bit of kit but better than dumping it in the garage.


    Thanks all

    OMV 8 (latest) on N100 minipc (16GB) and rpi5 (8GB). OS on SSD/SD. System ext4 on SSD. Data BTRFS on HDDs

  • jata1

    Added the Label resolved
    • Official Post

    So just installed Proxmox VE directly on the SSD on the mac.

    If you have an amd64 OMV server you don't need to do that. Just install the kvm plugin on OMV and make an OMV vm on it.

    • Official Post

    I have run omv on a 2012 mac mini but the OS was on an SSD. I run the flashmemory plugin on all of my systems. So, I don't know why you are having this issue. Something is starting or syncing slow.


    I have been running the new flashmemory plugin that uses zram instead of folder2ram on all of my systems. No issues that I have noticed. Since this is a test system, maybe you could try that? test new version of flashmemory plugin using zram


    It doesn't do a sync at startup since it is using overlayfs instead.

    omv 8.0.8-1 synchrony | 6.17 proxmox kernel

    plugins :: omvextrasorg 8.0.2 | kvm 8.0.4 | compose 8.1.2 | cterm 8.0 | borgbackup 8.0.2 | cputemp 8.0 | mergerfs 8.0 | scripts 8.0.1 | writecache 8.1


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Official Post

    test both plugins.

    While I don't mind the testing where you start with the folder2ram version and upgrade, I would avoid it.

    omv 8.0.8-1 synchrony | 6.17 proxmox kernel

    plugins :: omvextrasorg 8.0.2 | kvm 8.0.4 | compose 8.1.2 | cterm 8.0 | borgbackup 8.0.2 | cputemp 8.0 | mergerfs 8.0 | scripts 8.0.1 | writecache 8.1


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • While I don't mind the testing where you start with the folder2ram version and upgrade, I would avoid it.

    I have a clean omv installed from omv iso with omv extras installed on brand new USB flash drive. This setup includes the default swap partition as it is based on the omv 7 iso. I have used clonezilla to clone this baseline setup before installing any plugins.


    These are my test scenarios/process so far...


    1. baseline omv setup (working good - clean log)

    2. baseline with original folder2ram plugin (tested and working correctly)

    3. remove swap partition with folder2ram plugin running (tested and working without nginx restarting.)

    4. uninstall folder2ram and reboot (tested and working. no swap + nginx starting correctly)


    I did not expect test 3 to work like this. In previous tests nginx needed to be restarted by monit after a reboot. I am using a brand new sandisk USB flash (same type/capacity as the one I have been having trouble with - but it is shiny new from amazon today).


    Will now revert to my baseline using the image i created earlier and run same tests using the new flash plugin

    OMV 8 (latest) on N100 minipc (16GB) and rpi5 (8GB). OS on SSD/SD. System ext4 on SSD. Data BTRFS on HDDs

  • So another set of tests using the new flash memory plugin after restoring the original baseline using clonezilla.


    1. baseline omv setup (working good - clean log)

    2. baseline with new flash memory plugin (tested and working correctly)

    3. remove swap partition with flash memory plugin running (failed - issue running update-initramfs -u - complains about lack of space)


    So I am guessing test 3 is failing due to how the new flash memory is handling the update-initramfs command?


    Or it could be something different with baseline image that I restored.


    Code
    root@macmini:~# update-initramfs -u
    update-initramfs: Generating /boot/initrd.img-6.1.0-28-amd64
    cpio: write error: No space left on device
    E: mkinitramfs failure cpio 2
    update-initramfs: failed for /boot/initrd.img-6.1.0-28-amd64 with 1.
    root@macmini:~#

    OMV 8 (latest) on N100 minipc (16GB) and rpi5 (8GB). OS on SSD/SD. System ext4 on SSD. Data BTRFS on HDDs

    • Official Post

    So I am guessing test 3 is failing due to how the new flash memory is handling the update-initramfs command?

    Not exactly. The sizes of filesystems created by zram-config might be too small. I actually had to increase /var/tmp for an rpi upgrade. Not sure which filesystem filled on your system. What does your /etc/ztab look like?

    omv 8.0.8-1 synchrony | 6.17 proxmox kernel

    plugins :: omvextrasorg 8.0.2 | kvm 8.0.4 | compose 8.1.2 | cterm 8.0 | borgbackup 8.0.2 | cputemp 8.0 | mergerfs 8.0 | scripts 8.0.1 | writecache 8.1


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Here is ztab file contents after setting up the new flash memory plugin


    Also tried running update-initramfs -u and I do get the same error as I posted earlier.


    OMV 8 (latest) on N100 minipc (16GB) and rpi5 (8GB). OS on SSD/SD. System ext4 on SSD. Data BTRFS on HDDs

  • Another update from my testing is that when using folder2ram version of flash memory plugin I have reproduced the nginx not starting properly issue.


    I uninstalled the folder2ram flash memory plugin and installed the new version and I no longer have an issue with nginx not starting.


    Overall the new flash memory plugin is working well. I see it creates a 750mb swap. I guess it is doing this because I do not have a swap partition/file on this test system?

    OMV 8 (latest) on N100 minipc (16GB) and rpi5 (8GB). OS on SSD/SD. System ext4 on SSD. Data BTRFS on HDDs

    • Official Post

    I do get the same error as I posted earlier.

    you still have the /var/spool mount in that ztab. The saltstack cache needed to be cleared. Uninstalling the plugin seems to have worked though.

    Overall the new flash memory plugin is working well. I see it creates a 750mb swap. I guess it is doing this because I do not have a swap partition/file on this test system?

    The plugin doesn't check to see if there is swap already configured on the system. I need to add a checkbox for the plugin to disable/enable zram swap. I also want to make the filesystem sizes configurable. Just need to think who to do that.

    omv 8.0.8-1 synchrony | 6.17 proxmox kernel

    plugins :: omvextrasorg 8.0.2 | kvm 8.0.4 | compose 8.1.2 | cterm 8.0 | borgbackup 8.0.2 | cputemp 8.0 | mergerfs 8.0 | scripts 8.0.1 | writecache 8.1


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • The improvements / features you are thinking about sound good.


    I just ran all the apt package updates on this test system - there are a load of updates as a new kernel etc has been released. The update has updated all the packages but failed to execute the update-initramfs - same reason as reported above.


    So I uninstalled the flash memory plugin and this process forced the system to complete the update correctly.


    Can you explain what and how I can configure the new flash memory plugin to increase the size of the relevant temp ram fs?

    OMV 8 (latest) on N100 minipc (16GB) and rpi5 (8GB). OS on SSD/SD. System ext4 on SSD. Data BTRFS on HDDs

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!