ZFS per user not per dataset in jail.

Hello,

Im trying set quota for users in home directory.
The only way for me which work is create dataset directly to the user for example:
Code:
root# zfs create zroot/jails/Jail1/home/user1
and then
Code:
root# zfs set quota=10MB zroot/jails/Jail1/home/user1
And yes it's working. But i have read about something like global quota for user.
zfs set userquota@joe=50G
But it doen't work. Im getting list with zfs features. Has someone done it before and can share with me ? I would be graceful.
 
And yes it's working. But i have read about something like global quota for user.
It's not global. It's still local to a dataset. I think you're getting a "list of zfs features" (not exactly sure what you mean by that) because you haven't given zfs set a dataset to apply the property to and it prints a usage message with some useful properties.
Code:
zfs set userquota@joe=50G zroot/jails/Jail1/home/user1
 
It's not global. It's still local to a dataset. I think you're getting a "list of zfs features" (not exactly sure what you mean by that) because you haven't given zfs set a dataset to apply the property to and it prints a usage message with some useful properties.
Code:
zfs set userquota@joe=50G zroot/jails/Jail1/home/user1

@tobik
So, the only way to set properly user quota is create dataset per user ? 3x users = 3x dataset ?
 
You are able to choose between setting a quota for each user on the zroot/jails/Jail1/home dataset
Code:
zfs set userquota@user1=50G zroot/jails/Jail1/home
zfs set userquota@user2=50G zroot/jails/Jail1/home
zfs set userquota@user3=50G zroot/jails/Jail1/home
or, as you said, create three dataset, one for each user, and assign quotas individually
Code:
zfs set quota=50G zroot/jails/Jail1/home/user1
zfs set quota=50G zroot/jails/Jail1/home/user2
zfs set quota=50G zroot/jails/Jail1/home/user3

HTH
 
Back
Top