sinisterpisces
Dabbler
- Joined
- Jan 14, 2024
- Messages
- 17
Hello!
I'm still pretty new at TrueNAS/ZFS, so I apologize if I'm missing something obvious.
I'm setting up a dataset to store MariaDB files for a database server: "MariaDBStore."
It will have two child datasets (mostly so I can control how big they get and individually adjust recordsize), like this:
My SSD-backed pool has limited space, so I've set a reservation for dataset and all children on MariaDBStore.
I'm not quite sure how to do the rest to accomplish what I want. I've read up here on how to combine quotas and datasets, but it seems like there's a lot more tweak it 'till you make it involved than hard and fast best practices. ;)
I think what I need to do is this, given the reservation on the parent dataset:
I'm still pretty new at TrueNAS/ZFS, so I apologize if I'm missing something obvious.
I'm setting up a dataset to store MariaDB files for a database server: "MariaDBStore."
It will have two child datasets (mostly so I can control how big they get and individually adjust recordsize), like this:
Code:
MariaDBStore (125 GiB Max Space for Dataset and All Children) --> Logs (128k recordsize, 2 GiB max space) --> Data (16k recordsize for MariaDB data, SNAPSHOT YES)
My SSD-backed pool has limited space, so I've set a reservation for dataset and all children on MariaDBStore.
I'm not quite sure how to do the rest to accomplish what I want. I've read up here on how to combine quotas and datasets, but it seems like there's a lot more tweak it 'till you make it involved than hard and fast best practices. ;)
I think what I need to do is this, given the reservation on the parent dataset:
- Set a 2 GiB quota on Logs. I've already reserved the parent, so I don't think I have to reserve space inside the space I already reserved, just put an upper bound on it that's less than the reservation. Correct?
- Data, I'm confused on, mostly due to not undestanding Snapshots fully yet.
- I don't really want to set a bound on Data beyond the parent reservation itself. I plan to have one MariaDB VM handling multiple databases, to the extent I can get away with that, so I want it to have as much space as I can give it.
- But, I also want to use snapshots for Data. This will be my first time using snapshots on ZFS or TrueNAS, so I'm not really sure what I need to do here to make sure there's a decent amount of snapshot space to let me catch and roll-back issues within, like, the past week or two.
- Do I actually need to use a quota here to make sure there's sufficient snapshot space? (I'm coming from QNAP's non-ZFS OS, which requires me to manually manage "reserved snapshot space.")
- Or, do I just set up the snapshot schedule and retention policy I want when I set up the snapshots and just keep adjusting that until it's not taking up more space than I want?