Since 2016, I’ve had a fileserver mostly just for backups. System is on 1 drive, RAID6 for files, and semi-annual cold backup.

I was playing with Photoprism, and their docs say “we recommend placing the storage folder on a local SSD drive for best performance.” In this case, the storage folder holds basically everything but the pictures themselves such as the database files.

Up until now, if I lost any database files, it was just a matter of rebuilding them by re-indexing my photos or whatever, but I’m looking for something more robust since I’ll have some friends/family using Pixelfed, Matrix, etc.

So my question is: Is it a valid strategy to keep database files on the SSD with some kind of nightly backup to RAID, or should I just store the whole lot on the RAID from the get go? Or does it even matter if all of these databases can fit in RAM anyway?

edit: I’m just now learning of ZFS caching which might be my answer.

    • ch00f@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 hour ago

      My new motherboard actually has a RAID controller for the M.2 slots. I know people frown on hardware raid, but given it’s the boot drive, it might just be easiest to count on it for daily operation and backup to the software RAID/something else every night.

  • one_knight_scripting@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    5 hours ago

    Hah. I see your looking into ZFS caching. Highly recommend. I’m running Ubuntu 24.04 Root on ZFS RAID10. Twelve each data drives and one nvme cache drive. Gotta say it’s performing exceptionally. ZFS is a bit tricky, it requires an HBA not a RAID card. You may to to flash the raid card to get it working like I did. After that, I have put together a GitHub for the install on ZFS RAID 10, but you should easily be able to change it to RAIDz2. Fair warning, it wipes the drives entirely.

    https://github.com/Reddimes/ubuntu-zfsraid10/

  • MangoPenguin
    link
    fedilink
    English
    arrow-up
    4
    ·
    8 hours ago

    Both your RAID and NVMe data should be getting backed up daily to 2 different destinations, if it’s irreplaceable.

    But to answer your question, just place the DB and cache files for Photoprism on the NVMe, and the photos themselves on the RAID.

    • ch00f@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      4 hours ago

      Can you suggest a method for two-destination daily backups that don’t involve a 3rd party service? At the moment, I’m doing every six months or so on two sets of cold storage, one offsite.

      • MangoPenguin
        link
        fedilink
        English
        arrow-up
        1
        ·
        4 hours ago

        That sounds reasonable, although I’d be worried about not having an extra local daily backup in case files get corrupted or accidentally deleted.

  • blackstrat@lemmy.fwgx.uk
    link
    fedilink
    English
    arrow-up
    5
    ·
    11 hours ago

    RAID gives you greater uptime. That is all. You should also have backups. So how much uptime do you need?

    • ch00f@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      4 hours ago

      I’ve heard that too. Hmm.

      Up until recently, the server mostly hosted a photo library and media library that didn’t tend to change very often. So a hdd in a fireproof save updated once a year was enough for me.

      I guess I’ll have to come up with a better solution. What would you recommend for automatic backups? I’m trying to avoid 3rd party services.

      • blackstrat@lemmy.fwgx.uk
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 hours ago

        I’ve switched to restic for my backups and have been very happy with it. Very fast, encrypted and snapshot history.

        • ch00f@lemmy.worldOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 hour ago

          So are you thinking like a raspberry pi with an 18TB hard drive accepting nightly backups through restic?

  • just_another_person@lemmy.world
    link
    fedilink
    English
    arrow-up
    8
    ·
    edit-2
    17 hours ago

    You may be confused about the terminology:

    RAID = many disks that help prevent data loss

    NVME = Just an SSD

    A collection of drives that are joined to a RAID group prevent data loss. An NVME drive is just a drive, which has no data loss prevention. If that drive dies, the data dies.

    If those docs say anything about SSD, it’s because their code is slow, and it will seem less obvious by using a faster disk.

    • ch00f@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      17 hours ago

      I understand all of that. Sorry I didn’t explain it well.

      I have a RAID6 for data and a single HDD for system files. I’d like to move the HDD to an NVME/SSD. I suppose I could make another RAID with an additional NVME, but I’ve found it easier to deal with booting off a traditional drive.

      My solution for redundancy for the NVME is to just backup the bits that I need every night. These are usually just a few hundred megabyte database files. I’m curious if that’s a typical solution.

      edit: to clarify, it’s a software raid with mdadm.

      • farcaller@fstab.sh
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        14 hours ago

        I just made a mirror out of two NVMes―they got cheap enough not to bother too much with the loss of capacity. Of course, that limits what I can put there, so I use a bit of a tiered storage between my NVMe and HDD pools.

        Just think in terms of data loss: are you going to be ok if you lost the data between backups? If the answer is yes, one NVMe is enough.

        • ch00f@lemmy.worldOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          14 hours ago

          Yeah, I’m only serving one timezone, so if I can swing nightly backups at periods of low activity, I’d only be out 1 day which isn’t that big.

  • haui@lemmy.giftedmc.com
    link
    fedilink
    English
    arrow-up
    2
    ·
    16 hours ago

    I‘m building this for some time now. I run a raid 1 on mechanical disks for file storage and have an ssd for the logic/database stuff. Have bought a second ssd and will put them in a raid as well bc limited lifespan.

    • ch00f@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      16 hours ago

      Hm… My new motherboard does actually have dual NVME M.2 slots. I might end up doing that (once my budget recovers a bit).

      • haui@lemmy.giftedmc.com
        link
        fedilink
        English
        arrow-up
        1
        ·
        14 hours ago

        You dont even need special nvme‘s. You can buy mid range ones.

        Best is if they dont fail together so they should best not be the same batch or have the same age and write amount.

        I do highly recommend to have a raid array for any server ssd since they fail unpredicably and without any signs.