I have been playing around with osol-nv-b114 version, and the ZFS user and group quotas. First of all, it is fantastic. Thank you all! (Sun, Ahrens and anyone else involved). I''m currently copying over one of the smaller user areas, and setting up their quotas, so I have yet to start large scale testing. But the initial work is very promising. (Just 90G data, 341694 accounts) Using userquota@, userused@ and userspace commands are easy to pick up. With a test account with 50M quota, and a "while [ 1 ]" script copying a 5M file, it reaches about 120M before the user is stopped (as expected). The lazy-update-quota is not a problem for us, and less of a problem the more quota the user has (50M is a bit low). I was unable to get ZFS quota to work with rquota. (Ie, NFS mount the volume on another server, and issue "quota 1234". It returns nothing). I assume rquota is just not implemented, not a problem for us. perl cpan module Quota does not implement ZFS quotas. :) -- Jorgen Lundman | <lundman at lundman.net> Unix Administrator | +81 (0)3 -5456-2687 ext 1017 (work) Shibuya-ku, Tokyo | +81 (0)90-5578-8500 (cell) Japan | +81 (0)3 -3375-1767 (home)
Jorgen Lundman wrote:> > I have been playing around with osol-nv-b114 version, and the ZFS user > and group quotas. > > First of all, it is fantastic. Thank you all! (Sun, Ahrens and anyone > else involved).Thanks for the feedback!> I was unable to get ZFS quota to work with rquota. (Ie, NFS mount the > volume on another server, and issue "quota 1234". It returns nothing).This should work, at least on Solaris clients. Perhaps you can only request information about yourself from the client? --matt
Jorgen, "quota user1" only prints out information if user1''s quota is exceeded. Try "quota -v user1". e.g. (server) suzuki# zfs set userquota at lling=10m foo/fs suzuki# share - at foo/fs /foo/fs rw "" (client) headers# quota -v lling Disk quotas for lling (uid 23498): Filesystem usage quota limit timeleft files quota limit timeleft /net/suzuki/foo/fs 0 10240 10240 - - - - - headers# quota -v 23498 Disk quotas for lling (uid 23498): Filesystem usage quota limit timeleft files quota limit timeleft /net/suzuki/foo/fs 0 10240 10240 - - - - - On 05/20/09 09:29, Matthew Ahrens wrote:> Jorgen Lundman wrote: >> >> I have been playing around with osol-nv-b114 version, and the ZFS >> user and group quotas. >> >> First of all, it is fantastic. Thank you all! (Sun, Ahrens and anyone >> else involved). > > Thanks for the feedback! > >> I was unable to get ZFS quota to work with rquota. (Ie, NFS mount the >> volume on another server, and issue "quota 1234". It returns nothing). > > This should work, at least on Solaris clients. Perhaps you can only > request information about yourself from the client? > > --matt
Matthew Ahrens wrote:> > Thanks for the feedback!Thank you for the work, it sure is great!> > This should work, at least on Solaris clients. Perhaps you can only > request information about yourself from the client? >Odd, but I just assumed it wouldn''t work and didn''t check further. But telnet/rquota wasn''t running. But I do find that, from a server mounting the NFS volume: # quota -v 1234 Disk quotas for (no account) (uid 1234): Filesystem usage quota limit timeleft files quota limit timeleft /export/leroy 55409 1048576 1048576 0 0 0 However, on the x4500 server itself: # quota -v 1234 Disk quotas for (no account) (uid 1234): Filesystem usage quota limit timeleft files quota limit timeleft Of course I should use "zfs get userused" on the server, but that is probably what confused the situation. Perhaps something to do with that "mount" doesn''t think it is mounted with "quota" when local. I could try mountpoint=legacy and explicitly list rq when mounting maybe . But we don''t need it to work, it was just different from legacy behaviour. :) Lund -- Jorgen Lundman | <lundman at lundman.net> Unix Administrator | +81 (0)3 -5456-2687 ext 1017 (work) Shibuya-ku, Tokyo | +81 (0)90-5578-8500 (cell) Japan | +81 (0)3 -3375-1767 (home)
Oh I forgot the more important question. Importing all the user quota settings; Currently as a long file of "zfs set" commands, which is taking a really long time. For example, yesterday''s import is still running. Are there bulk-import solutions? Like zfs set -f file.txt or similar? If not, I could potentially use zfs ioctls perhaps to write my own bulk import program? Large imports are rare, but I was just curious if there was a better way to issue large amounts of "zfs set" commands. Jorgen Lundman wrote:> > > Matthew Ahrens wrote: >> >> Thanks for the feedback! > > Thank you for the work, it sure is great! > > >> >> This should work, at least on Solaris clients. Perhaps you can only >> request information about yourself from the client? >> > > Odd, but I just assumed it wouldn''t work and didn''t check further. But > telnet/rquota wasn''t running. > > But I do find that, from a server mounting the NFS volume: > > # quota -v 1234 > Disk quotas for (no account) (uid 1234): > Filesystem usage quota limit timeleft files quota limit > timeleft > /export/leroy > 55409 1048576 1048576 0 0 0 > > > However, on the x4500 server itself: > > # quota -v 1234 > Disk quotas for (no account) (uid 1234): > Filesystem usage quota limit timeleft files quota limit > timeleft > > > > Of course I should use "zfs get userused" on the server, but that is > probably what confused the situation. Perhaps something to do with that > "mount" doesn''t think it is mounted with "quota" when local. > > I could try mountpoint=legacy and explicitly list rq when mounting maybe . > > But we don''t need it to work, it was just different from legacy > behaviour. :) > > Lund > > >-- Jorgen Lundman | <lundman at lundman.net> Unix Administrator | +81 (0)3 -5456-2687 ext 1017 (work) Shibuya-ku, Tokyo | +81 (0)90-5578-8500 (cell) Japan | +81 (0)3 -3375-1767 (home)
Jorgen Lundman wrote:> Oh I forgot the more important question. > > Importing all the user quota settings; Currently as a long file of "zfs > set" commands, which is taking a really long time. For example, > yesterday''s import is still running. > > Are there bulk-import solutions? Like zfs set -f file.txt or similar? > > If not, I could potentially use zfs ioctls perhaps to write my own bulk > import program? Large imports are rare, but I was just curious if there > was a better way to issue large amounts of "zfs set" commands.As with most other zfs(1m) commands, the slow part is waiting for a txg to sync out. If you do many requests in parallel, many of them will wait for the same txg, so the quickest way would be to do batches of ~1000 concurrently: for (user, quota) in file: zfs set userquota at user=quota & if i++ % 1000 == 0 wait batch size should be proportional to available system memory. If you develop an actual script based on this, I''m sure others here could use it too! --matt