Question about what to put on RAID and what to put on NVME
-
[email protected]replied to [email protected] last edited by
Hm... My new motherboard does actually have dual NVME M.2 slots. I might end up doing that (once my budget recovers a bit).
-
[email protected]replied to [email protected] last edited by
Basically, you want to shut down the database before backing up. Otherwise, your backup might be mid-transaction, i.e. broken. If it's docker you can just docker-compose down it, backup, and then docker-compose up, or equivalent.
-
[email protected]replied to [email protected] last edited by
If your device permits it, run raid on disc, and use nnme as cache. My Synology does this.
-
[email protected]replied to [email protected] last edited by
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.
-
[email protected]replied to [email protected] last edited by
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.
-
[email protected]replied to [email protected] last edited by
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.
-
[email protected]replied to [email protected] last edited by
Alternatively, if your databases are on a filesystem that supports snapshots (LVM, btrfs or ZFS for instance), you can make a snapshot of the filesystem, mount the snapshot and backup thame database from it. This will ensure the backup is consistent with itself (the backed up directory was not written to between the beginning and the end of the backup)
-
[email protected]replied to [email protected] last edited by
RAID gives you greater uptime. That is all. You should also have backups. So how much uptime do you need?
-
[email protected]replied to [email protected] last edited by
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.
-
[email protected]replied to [email protected] last edited by
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.
-
[email protected]replied to [email protected] last edited by
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.
-
[email protected]replied to [email protected] last edited by
Picked up a LSI SAS 9305-16I. I was always planning to do software raid, so I think it’ll do the trick for zfs.
-
[email protected]replied to [email protected] last edited by
That sounds reasonable, although I'd be worried about not having an extra local daily backup in case files get corrupted or accidentally deleted.
-
[email protected]replied to [email protected] last edited by
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.
-
[email protected]replied to [email protected] last edited by
Hell yeah, it will. I need one of those bad boys.
-
[email protected]replied to [email protected] last edited by
I've switched to restic for my backups and have been very happy with it. Very fast, encrypted and snapshot history.
-
[email protected]replied to [email protected] last edited by
Building RAID on top of SSDs is an answer.
-
[email protected]replied to [email protected] last edited by
Spinning disks can perform well if you do it right
-
[email protected]replied to [email protected] last edited by
It also can improve performance when done with enough disks
-
[email protected]replied to [email protected] last edited by
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.