Pinned [Tutorial][Experimental][Third-party Plugin available]Reducing OMV's disk writes, also to install it on USB flash

    • chefp wrote:

      I've been running with fs2ram for about a week. It was surprisingly simple to set up which hopefully would translate to being easy to integrate.


      If you post the commands/process you went through, I could tell you if it would work in plugin form.
      omv 4.1.14 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • ryecoaaron wrote:


      If you post the commands/process you went through, I could tell you if it would work in plugin form.

      I followed the steps in the OP. All credit goes to bobbafetthotmail. Commands should be run as root; sudo as necessary.

      To reduce the chance of people running out of RAM, it would be a good idea to require a minimum of 1GB.

      Edit /etc/fstab to add noatime & remove realtime, and disable swap (should this be a user option?). Could use sed '/realtime,errors=remount-ro/noatime,errors=remount-ro/' or whichever is your preferred string manipulator. I don't recall for sure if the default is "realtime,errors=remount-ro" or just "errors=remount-ro".
      Also add an entry to use tmpfs for /tmp.

      Source Code

      1. # <file system> <mount point> <type> <options> <dump> <pass>
      2. UUID=<MyUUID> / ext4 noatime,errors=remount-ro 0 1
      3. #UUID=<MySwapUUID> none swap sw 0 0
      4. tmpfs /tmp tmpfs defaults,noatime 0 0


      Install fs2ram. The download page with list of mirrors linked at packages.debian.org/sid/admin/fs2ram . I used the US mirror.

      Source Code

      1. wget http://ftp.us.debian.org/debian/pool/main/f/fs2ram/fs2ram_0.3.12_all.deb
      2. dpkg -i fs2ram*


      Edit /etc/fs2ram/fs2ram.conf . The entries were derived from bobbafett's script that detects the recently changed files on the fs. This is a precomputed list so could be altered if necessary, but it should be accurate for standard OMV installs. On my install I have an entry for the transmission dir, but not everyone uses that so I omitted it here.

      Source Code

      1. #<file system> <mount point> <script> <script option> <type> <options>
      2. tmpfs /var/cache keep_folder_structure - tmpfs
      3. tmpfs /var/log keep_file_structure - tmpfs
      4. tmpfs /var/tmp - - tmpfs
      5. tmpfs /var/lib/openmediavault/rrd keep_file_content - tmpfs
      6. tmpfs /var/spool keep_file_content - tmpfs
      7. tmpfs /var/lib/rrdcached/ keep_file_content - tmpfs
      8. tmpfs /var/lib/monit keep_file_content - tmpfs
      9. tmpfs /var/lib/php5 keep_folder_structure - tmpfs


      Since /var/cache holds the apt-get cache, it can grow quite big. Add a daily cron job:

      Source Code

      1. apt-get autoclean


      Finally,

      Source Code

      1. ln –sf /proc/mounts /etc/mtab


      Changes take effect on next boot. Pretty straight-forward, mostly config file manipulation.
    • Seems simple enough and should work as a plugin. Give me a few hours to come up with something.
      omv 4.1.14 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • tekkb wrote:

      OK, so for anyone that it is a money issue get a job... How's that?

      I think experimentation is fine but I don't want a few people leading nubbs into the mountain like the pied piper. We know what works and that is why we recommend what we do.


      Well, I have a job and it's not a money issue... I have a Sandisk 64 gb sd-xc-card in a Cubox-i4 Pro. One could argue my comparison of prices as Sandisk is an A-brand and Crucial maybe not so much but that 64 GB card is more expensive than a Crucial 64 GB SSD.

      Anyways, I have OMV installed on that card, I suspect SD-cards are the same as USB sticks when it comes to type of memory, right? Will I run into the same problems? Given more and more people start using SOC solutions for just about anything, I guess this topic becomes more and more relevant.
    • You are very correct about sd cards. Actually, I have killed more sd cards creating the RPi images than usb sticks. I am working on the fs2ram plugin with the help of this thread. So, hopefully it will solve this problem :)
      omv 4.1.14 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • Yeah, I understand your pain and have dealt with failed sd cards and failed compact flash. That is one reason I am so adamant against them as a primary medium. I just stated on another post that I wish the ARM manufacturer's would start to make devices with a good SATA controller and a few SATA ports at a minimum, mini pci-e would be nice too. I want to get more into ARM but for me it is just easier to spend more money. Time is money. I do love a lot of the ARM stuff though.
    • I have 2 nucs but 1 is an i5 used as primary PC, the i3 is used as voice recognition for home automation. The Cuboxes have a Sata port, I hooked it up to a 4-bay enclosure. I could probably install debian and OMV on 1 HDD but I only have been writing images to SD-cards with ARM devices. If this card dies on me, I'll probably have a look to put OMV on a SSD or HDD. There's lifetime warranty on Sandisk so it can die on me. :)

      On a spending money perspective: I thought about buying a Synology 4 bay quad-core processor NAS but those prices though... I like spending money on tech stuff, but paying over 500 € for basically a very low-end PC is not justifiable to me.
    • I bought a new laptop. Pulled the 4 GB ram and 750 GB hard drive. Put in 16 GB RAM and 500 GB SSD, both faster than what was pulled. So I had 4 gigs of DDR3L and and 2.5 inch drive laying around collecting dust. Spent a little more buying a Brix unit rather than an ARM device.

      I could not justify going ARM when I had good parts laying idle. I was going to give them away. More money spent but not the way you might of thought.
    • tekkb wrote:

      That is one reason I am so adamant against them as a primary medium.
      I can only agree. Guys, it happened to me only one time. Had a SanDisk Ready Cache as a system drive - never again. Sure it is "only" the system drive and you do not loose any data IF you have NO partitions on it. However you have to order a new system drive (i had a spare hdd at home) and reinstall from scratch...

      I´m very excited about the fs2ram plugin... ATM there is no real SoC available that would fit my needs. But as soon as there is a RasPi 2 like system with USB3 ports or with 3-4 Sata ports (2 would be enough, though)... Of course, for the same or a slightly higher price than a RasPi ;)
      OMV stoneburner | HP Microserver | 256GB Samsung 830 SSD for system | 4x 2TB in a RAID5
      OMV erasmus| Odroid XU4 | 5TB Data drive | 500GB Backup drive
    • @WastlJ I use a CUBOX-I4 with only 1 Sata port. Why would you want more? I connect it to amazon.de/gp/product/B00ORENYJ…oh_aui_detailpage_o00_s00 The cubox has a quad-core 1 Ghz processor and 2 gigs of ram.

      @tekkb My situation is the other way around. I had 2 Cuboxes for XBMC, problem is Netflix doesn't work in XBMC so I have 2 extra Roku's. Last week I bought 2 Amazon Fire TV's, rooted them to put XBMC on them so I now have 1 box to do XBMC and Netflix. My Qnap NAS is sloooooooow, getting SickRage and Couchpotato to work while there are NZB's unpacking was hell, so I put 1 of the cuboxes to use (the other one is used for Spielerei with Domoticz and Z-wave). The Qnap is just used as storage now.

      That leaves me with 2 Roku's. :) 2 more items for the "I'll keep it, just in case" closet.
    • openmediavault-flashmemory is in the testing repo. I built the Debian Sid package of fs2ram and put it in the testing repo as well. So, no need to install it manually. The plugin is very simple and just has an enable button. When you enable and apply, it will log you out of the web interface. After that, you should reboot.

      The plugin does not change fstab for you. It was just too risky especially on systems not installed with the OMV ISO. Adding noatime and commenting out the swap line are easy enough to do manually. Most arm systems already have noatime in the options (OMV RPi image does) and don't use a swap partition. So, it is already done on those systems.

      I tested in multiple VMs and I am currently testing this plugin on an RPi2 and my server at home that uses a 16 GB USB DOM. No issues yet.
      omv 4.1.14 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • OK, let's stop the off-topic stuff and the potential flame war (and this goes for moderators too).

      This thread is NOT for:
      • insulting people over their choices
      • explaining why you or why not you bought something
      • telling anecdotes (use the off-topic part of the forum for that)
      What this thread is for is to discuss ways to reduce the disk writes so that we as a community can benefit from it with the usage of flash based memory in all its forms (SSDs, USB-memories, SD-cards, etc).
    • Sorry, we are not playing "Simon Says"... :)


      There are hundreds of threads in this forum that stray off topic. Since when do you make policy HK? People should feel free to discuss ideas. If someone cannot take a little gibing maybe they should take a look in the mirror and ask why they are unhappy. Life is short. Don't sweat the small stuff.

      The post was edited 2 times, last by tekkb ().

    • Nope. You probably already have noatime in the options for the OS drive in /etc/fstab. If not, add it. Also, comment out the swap line in fstab if one exists.

      Example:

      Source Code

      1. # /etc/fstab: static file system information.
      2. #
      3. # Use 'blkid' to print the universally unique identifier for a
      4. # device; this may be used with UUID= as a more robust way to name devices
      5. # that works even if disks are added and removed. See fstab(5).
      6. #
      7. # <file system> <mount point> <type> <options> <dump> <pass>
      8. # / was on /dev/sdb1 during installation
      9. UUID=ccd327d4-a1ed-4fd2-b356-3b492c6f6c34 / ext4 noatime,errors=remount-ro 0 1
      10. # swap was on /dev/sdb5 during installation
      11. #UUID=a3c989d8-e12b-41d3-b021-098155d6b21b none swap sw 0 0
      12. tmpfs /tmp tmpfs defaults 0 0
      Display All
      omv 4.1.14 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • I have this when I nano fstab. Is this OK?

      Source Code

      1. /dev/mmcblk0p1 / ext4 defaults,noatime,nodiratime,data=writeback,commit=600,errors=remount-ro 0 0
      2. tmpfs /tmp tmpfs defaults 0 0
      3. # >>> [openmediavault]
      4. UUID=66b0a6d1-5130-43bf-8579-05d3112e1a17 /media/66b0a6d1-5130-43bf-8579-05d3112e1a17 xfs defaults,nofail,noexec,usrquota,grpquota 0 2
      5. # <<< [openmediavault]

      The post was edited 1 time, last by HK-47 ().