These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for ZFS home directories on the new forum.
Hi,
I would like to create the home directories in a ZFS pool, is there a way to configure this? Also it would be nice to use the zfs quota functionality.
If it is not supported in which .pl file are the new home directories created?
thanks, Martijn
I dunno. We're pretty friendly to Solaris, and I know many folks are using Virtualmin on Solaris, but I'm not sure about ZFS.
Does it use some other quota configuration commands than the standard ones for Solaris? (If so, why would they do that?)
Anyway, if they do use a different set of commands, you can add custom commands to setup different types of quotas. Some customers are using it to setup quotas for NFS mounted homes. No need to modify code for this purpose. Have a look in the Module Configuration under Quota Commands. The popup help for those options provides the options your custom commands need to deal with (so you might need a simple shell wrapper if the commands you're using need some other format).
--
Check out the forum guidelines!
Hi Joe,
Thank you for the reply! I'm using the setup as described on
http://www.solarisinternals.com/wiki/index.php/ZFS_Best_Practices_Guide
[code:1]
zfs create tank/home/munnik
useradd -g users -d /home/munnik munnik
chown -R munnik:user /export/home/munnik
[/code:1]
The zfs filesystem tank/home is mounted on /export/home which is mounted (using automount) on /home.
I use zfs quotas and reservations for the home directories. I'll try to implement the commands on the quota module config.
Thanks,
Martijn
I tried to configure the zfs home directories with the before and after command in
Webmin -> Users and groups -> Module config -> Before and after commands
Command to run before making changes [code:1]/usr/sbin/zfs create tank{$HOME}[/code:1]
Command to run after making changes [code:1]/usr/bin/chown -R ${USER}:${GROUP} /export{$HOME}[/code:1]
But this doesn't work? Are the template variables available with this command and when are they precisely executed and when is useradd executed?
I tried to configure the zfs home directories with the before and after command in
Webmin -> Users and groups -> Module config -> Before and after commands
Command to run before making changes [code:1]/usr/sbin/zfs create tank{$HOME}[/code:1]
Command to run after making changes [code:1]/usr/bin/chown -R ${USER}:${GROUP} /export{$HOME}[/code:1]
But this doesn't work? Are the template variables available with this command and when are they precisely executed and when is useradd executed?
I'll think a need a pre and post script which will do the actions for adding/modifying/deleting the account. How can I check what action is done? Can I also pass the group of the user?
Thanks,
Martijn
You can check what action is done by looking at the USERADMIN_ACTION environment variable, which will be set to one of CREATE_USER, MODIFY_USER or DELETE_USER .
You can get the group ID from the variable USERADMIN_GID , and in a shell script convert that to the group name with code like :
groupname=`grep ":$USERADMIN_GID:" /etc/group | cut -d : -f 1`
--
Check out the forum guidelines!
I'll ask Jamie to chime in...I'm not sure if the template variables are available at this point in the process, now that I think of it. But the template variable processor has been merged down into Webmin, so it seems like maybe this sort of thing would have been the reason behind that push down into Webmin core.
--
Check out the forum guidelines!
Yes, you can access template variables - but when creating virtual servers, they are in environment variables from the post-create script named like :
$VIRTUALSERVER_DOM (domain name)
$VIRTUALSERVER_USER (unix login)
For mailboxes, you can see them in variables like :
$USERADMIN_USER (unix login)
$USERADMIN_HOME (home directory)
Let me know if you need any more details..
--
Check out the forum guidelines!
Did anyone ever come up with a solution for this? I'm on a Solaris 11 system running Virtualmin and it will not create the home directories for the new Virtual Servers. I'm assuming it has something to do with the ZFS.
Even when I try to go and add a user manually through Users and Groups, I get the following error:
"Failed to save user : Couldn't create home directory : Operation not applicable"