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

  • 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 5.3.9 usul | 64 bit | 5.3 proxmox kernel | omvextrasorg 5.2.6
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • 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.


  • 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.

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


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

    Code
    wget http://ftp.us.debian.org/debian/pool/main/f/fs2ram/fs2ram_0.3.12_all.deb
    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.

    Code
    #<file system> <mount point> <script> <script option> <type> <options>
    tmpfs /var/cache keep_folder_structure - tmpfs
    tmpfs /var/log keep_file_structure - tmpfs
    tmpfs /var/tmp - - tmpfs
    tmpfs /var/lib/openmediavault/rrd keep_file_content - tmpfs
    tmpfs /var/spool keep_file_content - tmpfs
    tmpfs /var/lib/rrdcached/ keep_file_content - tmpfs
    tmpfs /var/lib/monit keep_file_content - tmpfs
    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:

    Code
    apt-get autoclean


    Finally,

    Code
    ln –sf /proc/mounts /etc/mtab


    Changes take effect on next boot. Pretty straight-forward, mostly config file manipulation.

  • 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 5.3.9 usul | 64 bit | 5.3 proxmox kernel | omvextrasorg 5.2.6
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    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.

  • 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 4.x| HP Microserver | 256GB Samsung 830 SSD for system | 4x 2TB in a RAID5
    OMV 4.x| Odroid XU4 | 5TB Data drive | 500GB Backup drive
    OMV 5.x| Raspberry Pi 4 | 6TB Data drive | 500GB SSD drive

  • @WastlJ I use a CUBOX-I4 with only 1 Sata port. Why would you want more? I connect it to http://www.amazon.de/gp/produc…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 5.3.9 usul | 64 bit | 5.3 proxmox kernel | omvextrasorg 5.2.6
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    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.

  • 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:


    omv 5.3.9 usul | 64 bit | 5.3 proxmox kernel | omvextrasorg 5.2.6
    omv-extras.org plugins source code and issue tracker - github


    Please read this before posting a question.
    Please don't PM for support... Too many PMs!

  • I have this when I nano fstab. Is this OK?

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

Participate now!

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