• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

ZFS per user not per dataset in jail.

bryn1u

Well-Known Member

Thanks: 9
Messages: 328

#1
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.
 

tobik@

Daemon
Developer

Thanks: 1,327
Messages: 1,908

#2
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
 

bryn1u

Well-Known Member

Thanks: 9
Messages: 328

#3
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 ?
 

Maxnix

Well-Known Member

Thanks: 173
Messages: 290

#4
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
 
Top