Len Zaifman
2009-Dec-10 19:49 UTC
[zfs-discuss] quotas on zfs at solaris 10 update 9 (10/09)
We have just update a major file server to solaris 10 update 9 so that we can control user and group disk usage on a single filesystem. We were using qfs and one nice thing about samquota was that it told you your soft limit, your hard limit and your usage on disk space and on the number of files. Is there , on solaris 10 U9 a command which will report usera filespace (kb) number of files limit 1048576 10 used 1024 3 or something like that? I can get the space limit, but not the space usage or the number of files using zfs get userquota at u rpool/home Len Zaifman Systems Manager, High Performance Systems The Centre for Computational Biology The Hospital for Sick Children 555 University Ave. Toronto, Ont M5G 1X8 tel: 416-813-5513 email: leonardz at sickkids.ca This e-mail may contain confidential, personal and/or health information(information which may be subject to legal restrictions on use, retention and/or disclosure) for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies.
Dennis Clarke
2009-Dec-10 20:20 UTC
[zfs-discuss] quotas on zfs at solaris 10 update 9 (10/09)
> We have just update a major file server to solaris 10 update 9 so that we > can control user and group disk usage on a single filesystem. > > We were using qfs and one nice thing about samquota was that it told you > your soft limit, your hard limit and your usage on disk space and on the > number of files. > > Is there , on solaris 10 U9 a command which will reportA lot of folks will want a similar functionality on everything from Sol 10 up to snv_129. I have a few experimental systems running thus : Sun Microsystems Inc. SunOS 5.11 snv_129 Dec. 01, 2009 SunOS Internal Development: root 2009-Nov-30 [onnv_129-tonic] bfu''ed from /build/archives-nightly-osol/sparc on 2009-12-04 Sun Microsystems Inc. SunOS 5.11 snv_126 November 2008 $ zpool upgrade This system is currently running ZFS pool version 22. All pools are formatted using this version. When we take into consideration the effects of compression and dedupe it can get difficult to answer the very basic question "How much space do I have left?" Perhaps a better question is "How much space do I have left given a worst case scenario?" I have pushed many copies of the exact same data into a ZFS filesystem with both compression and dedupe and watched as the actual space used was trivial. With a classic filesystem ( UFS ) we can generally answer the question quickly. One blunt object method would be to allocate a filesystem per user such that zfs list reports a long list of names under /export/home or similar. Then you can easily see the used space per filesystem. Allocating user quotas and then asking the simple questions seems mysterious to me also. I am looking into this for my own reasons and will stay in touch. -- Dennis Clarke dclarke at opensolaris.ca <- Email related to the open source Solaris dclarke at blastwave.org <- Email related to open source for Solaris
Matthew Ahrens
2009-Dec-11 21:40 UTC
[zfs-discuss] quotas on zfs at solaris 10 update 9 (10/09)
Len Zaifman wrote:> We have just update a major file server to solaris 10 update 9 so that we can control user and group disk usage on a single filesystem. > > We were using qfs and one nice thing about samquota was that it told you your soft limit, your hard limit and your usage on disk space and on the number of files. > > Is there , on solaris 10 U9 a command which will report > > usera filespace (kb) number of files > limit 1048576 10 > used 1024 3 > > or something like that? I can get the space limit, but not the space usage or the number of files using zfs get userquota at u rpool/homeZFS does not track the number of files owned by each user. The space used by file metadata is included in the user''s space consumption which is reported by the "userused at username" property. Eg: $ zfs get userquota at ahrens,userused at ahrens tank/ahrens NAME PROPERTY VALUE SOURCE tank/ahrens userquota at ahrens none local tank/ahrens userused at ahrens 53.9G local If you want information about all users and/or groups in a filesystem, use "zfs userspace": $ zfs userspace -t all tank/ahrens TYPE NAME USED QUOTA POSIX Group root 1.50K none POSIX Group staff 56.2G none POSIX User ahrens 53.9G none POSIX User lling 2.25G none POSIX User root 1.50K none Check the zfs(1m) manpage the sections on the userused and groupused properties and userpace and groupspace subcommands for details. Also please let us know how we can improve the zfs(1m) manpage to make this capability more obvious. --matt
Len Zaifman
2009-Dec-23 20:42 UTC
[zfs-discuss] quotas on zfs at solaris 10 update 9 (10/09)
2 Things 1) solaris 09/10 is solaris 10 update 8 , not 9 - sorry for the confusion 2) setting userquota at user at solaris10u8 and looking from a linux nfs client with quotas installed: Disk quotas for user leonardz (uid 1006): Filesystem blocks quota limit grace files quota limit grace hpffs04:/cfgwas/home 1030* 1024 1024 0 0 0 hpffs26:/zfs_hpf/home 3251842 4194304 4194304 0 0 0 I can see the quotas set under zfs. That is great. Because we have users who will create millions of files in a directory it would be nice to report the number of files a user has or a group has in a filesystem. Is there a way (other than find) to get this? Len Zaifman Systems Manager, High Performance Systems The Centre for Computational Biology The Hospital for Sick Children 555 University Ave. Toronto, Ont M5G 1X8 tel: 416-813-5513 email: leonardz at sickkids.ca ________________________________________ From: zfs-discuss-bounces at opensolaris.org [zfs-discuss-bounces at opensolaris.org] On Behalf Of Len Zaifman [leonardz at sickkids.ca] Sent: December 10, 2009 2:49 PM To: zfs-discuss at opensolaris.org Subject: [zfs-discuss] quotas on zfs at solaris 10 update 9 (10/09) We have just update a major file server to solaris 10 update 9 so that we can control user and group disk usage on a single filesystem. We were using qfs and one nice thing about samquota was that it told you your soft limit, your hard limit and your usage on disk space and on the number of files. Is there , on solaris 10 U9 a command which will report usera filespace (kb) number of files limit 1048576 10 used 1024 3 or something like that? I can get the space limit, but not the space usage or the number of files using zfs get userquota at u rpool/home Len Zaifman Systems Manager, High Performance Systems The Centre for Computational Biology The Hospital for Sick Children 555 University Ave. Toronto, Ont M5G 1X8 tel: 416-813-5513 email: leonardz at sickkids.ca This e-mail may contain confidential, personal and/or health information(information which may be subject to legal restrictions on use, retention and/or disclosure) for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies. _______________________________________________ zfs-discuss mailing list zfs-discuss at opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss This e-mail may contain confidential, personal and/or health information(information which may be subject to legal restrictions on use, retention and/or disclosure) for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies.
Jorgen Lundman
2009-Dec-24 00:53 UTC
[zfs-discuss] quotas on zfs at solaris 10 update 9 (10/09)
Len Zaifman wrote:> Because we have users who will create millions of files in a directory it would be nice to report the number of files a user has or a group has in a filesystem. > > Is there a way (other than find) to get this?I don''t know if there is a good way, but I have noticed that with ZFS, the number in "ls" which used to be for "blocks" actually report the number of entries in the directory (-1). drwxr-xr-x 13 root bin 13 Oct 28 02:58 spool ------------^^ # ls -la spool | wc -l 14 Which means you can probably add things up a little faster. -- 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)