Since it is still related to the post thematology, after reading all https://www.freebsd.org/cgi/man.cgi?query=zfs&sektion=8&manpath=FreeBSD+7.0-RELEASE for Datasets and my head melted from terminologies/options/parameters/etc..... please enlighten me in this use case of a Dataset.
man zfsprops
and man zfs-create
might be more appropriate, since those match your local system.Assuming I have created a zpool (zvolume) of 2Tb with name HH and inside there I need to create a Dataset for proxmox with name bckup and capacity of 500G to have space for VM/LXC backups.
So by running
zfs create -o=mountpoint=/...... HH/bckup (I typed ..... on purpose because if I dont specify mountpoint, automatically it will mount it HH/bckup right? Do I have the option to mount it in wahtever path I choose even if it is to /mnt/backups? which links to another zpool-
the main one?)
if you leave the mountpoint out, it will depend on the parent dataset(s) (properties are inherited if not set explicitly). the default mountpoint is
$POOL/$DATASET
, so in your case /HH/bckup
. but if for example, you set the mountpoint of HH/bckup
to /mnt/backups
, and then add another dataset HH/bckups/foobar
without specifying a mountpoint, it will be mounted under /mnt/backup/foobar
.zfs set quota=500G HH/bckup (but how to force that dataset not to exceed the 85% of that space, cant find the command for that)
zfs set compression=on HH/bckup (or better from scratch set compression=lz4 which is the default value)
why would you want to set a quota, and then enforce another limit below that quota? that is what the quota is for
....and last questions follows up
- Do I need to (after Dataset creation) create seperate folders inside for daily/weekly/monthly backups or it will be done automatically by proxmox
when I present that bckup space to it? I mean there is got to be a way for things inside backups to be organized and my assumption is that prox
will create default folders for that. Right? Do we know how these paths would be named?
PVE will create directories below the storage mountpoint like 'dump', 'images', .. there are no separate directories for daily/weekly/monthly backups, pruning works just by thinning out ALL backups.
- Even though it explains a way to run all the above options as one command line I didnt found an example of doing that instead it creates the
Dataset and then begins issuing the set sub command. Should I use -o for each option like
zfs create -o mountpoint=.... -o quote=.... -o compression=..... HH/bckup
you can do that, the result will be the same.
- Is the default recordsize during Dataset creation 128k (Is there a better number for Dataset for backups on disks with 512b logical and
4096physical? disk attributes)
128k should be fine for most cases (it's just an upper limit, smaller files won't waste that much space!). you can enable larger dnodes if your workload benefits from it (a dataset solely used for backups might, since it has less metadata overhead when mostly storing large files), but then your pool might be incompatible with older ZFS releases.