The other day I got the requirement to setup this directory-based quotation, after digging around for a while, I noticed that it looks not easy to achieve. The native solaris is mean to setup quota based on file system. without the support from the kernal, we have to look for another workarounds.
Say you got file sytem /export/test, and you want to limit /export/test/a1 and /export/test/a2 to 100M and 200M respectively. the workaround is to use loopback devices.
mkfile 100M /export/test/a1_f
mkfile 200M /export/test/a2_f
lofiadm -a /export/test/a1_f
lofiadm -a /export/test/a2_f
newfs /dev/rlofi/1
newfs /dev/rlofi/2
mount /dev/lofi/1 /export/test/a1
mount /dev/lofi/2 /export/test/a2
十一月 28, 2008于1:00 上午 |
[...] directory-based quota [...]