Problem with quotas on root partition on FreeBSD 8.0

2010-03-29 Thread M. Vale
Hi, on FreeBSD 8.0 (i386 or AMD64) if we configure to use quotas on root
partition.

It stops on boot with the following message:

Trying to mount root from ufs:/dev/ad0s1a
mount option userquota is unknown
mount option groupquota is unknown
ROOT MOUNT ERROR: mount option groupquota is unknown
If you have invalid mount options, reboot, and first try the following from
the loader prompt:

 set vfs.root.mountfrom.options=rw

and then remove invalid mount options from /etc/fstab.

Loader variables:
vfs.root.mountfrom=ufs:/dev/ad0s1a
vfs.root.mountfrom.options=rw,userquota,groupquota,acls

Manual root filesystem specification:
  fstype:device  Mount device using filesystem fstype
   eg. ufs:/dev/da0s1a
   eg. cd9660:/dev/acd0
   This is equivalent to: mount -t cd9660 /dev/acd0 /

  ?  List valid disk boot devices
  empty line   Abort manual input

mountroot


If i do:

ufs:/dev/ad0s1a

Then the boot continues and it mount the quotas ok. but if I reboot the same
thing happen again.

This only occurs on FreeBSD 8.

Does anyone have a clue about the problem ?

Best Regards
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


how to decide if disk / system is quotas capable

2009-08-25 Thread Stefan Miklosovic
hi,

I am writing a script in which I want to decide if disk / system is capable
to set quotas for user / groups.

how to check it?

I am thinking about
1) checking enable_quotas=YES in /etc/rc.conf
2) should I try to look in /etc/fstab? There is userquota and / or
groupquota in line for some disk device in option field.
3) should I test existence of quota.user and quota.group in filesystem root?

which method would be the best one?

thank you for time
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: how to decide if disk / system is quotas capable

2009-08-25 Thread Olivier Nicole
Hi,

 1) checking enable_quotas=YES in /etc/rc.conf
 2) should I try to look in /etc/fstab? There is userquota and / or
 groupquota in line for some disk device in option field.

That is enough.

1) will tell you that the system is quota capable
2) will tell you what file system is quota capabel

3) will tell you what file system has some quota defined for some
   user/group, it's beyond your question.

Best regards,

Olivier
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Quotas via NFS

2008-08-13 Thread Pietro Cerutti

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Hello,

the handbook (§18.15.4 Quotas over NFS) doesn't seem to be particularly
clear to me.

Here is the situation:

* HOST_A -- web + db server
~  - /usr is mounted with quotas enabled
~[ /dev/ad0s1e /usr ufs rw,userquota 2 2 ]
~  - /usr/local/www is the www root
~  - /usr/local/www is nullfs mounted on /www
~[ /usr/local/www /www nullfs rw 0 0 ]
~  - /www is NFS exported
~[ /www -alldirs -network=x.x.x.x -mask=y.y.y.y ]
~  - rquotad is enabled
~[ root  inetd  892  5  udp4  *:49598  *:* ]

* HOST_B -- ssh/sftp access for a few owners of a subdomain
~  - each owner has its own www root NFS mounted inside its home
~[ HOST_A:/www/hosts/subdomain on /usr/home/owner/www (nfs) ]

Now my problem is:

on HOST_A:
| sudo quota -u owner
Disk quotas for user owner (uid owner_id):
~ Filesystem   usage   quota   limit   grace   files   quota   limit
~  grace
~   /usr3428  921600 1048576 737   0   0


on HOST_B:
| sudo quota -u owner
Disk quotas for user owner (uid owner_id): none

I think I am missing something on how the quota information is exported
via NFS. What I would like to achieve is to allow owners to check
their own quotas on HOST_A, while they can only directly access HOST_B
via SSH.

Thanks

- --
Pietro Cerutti
[EMAIL PROTECTED]

PGP Public Key:
http://gahr.ch/pgp

-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.9 (FreeBSD)

iEYEAREKAAYFAkii1dIACgkQwMJqmJVx946XQgCgv8NQQJd9tT/1+617D1TRk168
VZMAoIr4L6qP9aihH0UPUpofH7fmAAoy
=G5KV
-END PGP SIGNATURE-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Disk quotas out of sync

2008-08-07 Thread Simon
Hello Folks,

Ever since I went from 6.x to 7.x I have started experiencing disk quotas 
getting
out of sync, way out of sync. For example, a user with 160GB quota suddenly
shows usage of only 120GB This forces me to run quotacheck -av often.  Was
something changed regarding quotas in 7.x? Nobody else noticed this issue?
I have this issue across multiple, different hardware, servers running 7.x

Thank you for any insight and help in advance!

PS: please CC me

-Simon


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Setting quotas on nested directories

2008-05-27 Thread Aaron Holmes

Hello all,
I want to set quotas on nested directories; ie: /mnt/docs has the 
directories legal and IT

I want to limit legal to 50GB. How can this be done, if at all?
From my googleing, it looks like any filesystems you want to apply 
quotas need to be be 1) in /etc/fstab and 2) mounted


Thanks,
Aaron Holmes
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Setting quotas on nested directories

2008-05-27 Thread Dan Nelson
In the last episode (May 27), Aaron Holmes said:
 Hello all,
 I want to set quotas on nested directories; ie: /mnt/docs has the 
 directories legal and IT
 I want to limit legal to 50GB. How can this be done, if at all?
  From my googleing, it looks like any filesystems you want to apply 
 quotas need to be be 1) in /etc/fstab and 2) mounted

Quotas on UFS are set at either the user- or the group-ID level, not on
directories themselves.  So you could create a group named legal,
then chgrp -R legal /mnt/docs/legal, and run edquota -g legal to
set a 50GB quota on files in the legal group.

http://www.freebsd.org/doc/en/books/handbook/quotas.html describes how
to set up the system to enable quotas.

-- 
Dan Nelson
[EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


samba/cups printer with quotas?

2008-03-31 Thread B. Cook

Hello All,

Someone here just got back from an Apple 'show'.

They were told that Leopard Server (powered by cups and samba) could  
give us quota control as well as authenticated printing with  
'history' (as to who printed what and how many pages.. )


I am still trying to get a clue on this.. but I have cups installed  
and integrated into samba..


I still have a ton of questions, and wonder if they would be better  
suited on a cups mailing list or here..


anyone have any advice or ever setup such a beast?  If you did set it  
up, how is it working out for you?



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Quotas within a jail

2007-11-18 Thread Josh

How can I do quotas within a jail?

The jail runs on its own partition. Any suggestions here? Do I have to 
do any mincing around where I sync uid/groups to the host system? Is 
there any semi elegant way to do this?


Thanks,
   Josh
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


MySQL Quotas

2007-07-03 Thread Grant Peel
Hi,

I am posting this here thinking this may be more of an OS thing than a mysql 
thing...

Since all mysql databases and tables need to be owned by the mysql user, is 
there, er, has anyone figured out a way to impose disk quotas per database for 
mysql?

-Grant
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: MySQL Quotas

2007-07-03 Thread Chuck Swiger

Grant Peel wrote:

I am posting this here thinking this may be more of an OS thing than a mysql 
thing...

Since all mysql databases and tables need to be owned by the mysql user, is
there, er, has anyone figured out a way to impose disk quotas per database
for mysql?


Databases tend to lose pending commits if they no longer can expand and use 
more space; most people do not attempt to use disk quotas with a database 
because new transactions are highly important.


--
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Server Move - Quotas

2007-05-24 Thread Grant Peel
Hi all,

I am about to migrate about 250 domains from 1 server to another.

The OLD server is running FreeBSD 4.7 and the new one is 6.2.

Every domain has a real UNIX user whos home is in the /home directory.

We are using user quotas to manage disk space.

Can I directly copy the user.quota file in the /home directory from the old 
server to the new one, or will I need to redo all the quotas manually?

-Grant
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Server Move - Quotas

2007-05-24 Thread Dan Nelson
In the last episode (May 24), Grant Peel said:
 I am about to migrate about 250 domains from 1 server to another.
 
 The OLD server is running FreeBSD 4.7 and the new one is 6.2.
 
 Every domain has a real UNIX user whos home is in the /home directory.
 
 We are using user quotas to manage disk space.
 
 Can I directly copy the user.quota file in the /home directory from
 the old server to the new one, or will I need to redo all the quotas
 manually?

If the uids are staying the same, you should be able to just copy the
files and run quotacheck to update the accounting info.

-- 
Dan Nelson
[EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Quotas on 6.2

2007-04-29 Thread Mark Tinguely

I am using quotas in FreeBSD 6.2 with soft limits == hard limits,
and the hard limits are being enforsed (mail/ftp etc). This is a non-root
filesystem.

There is one patch for quota that I supplied and was recently applied
to -current that is appropriate for FreeBSD 5.x-7.x that has to do with
file counts once the filesystem is completely full, that does not affect
hard limits.

--Mark Tinguely.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Quotas on 6.2

2007-04-29 Thread Doug Hardie


On Apr 29, 2007, at 06:26, Mark Tinguely wrote:


I am using quotas in FreeBSD 6.2 with soft limits == hard limits,
and the hard limits are being enforsed (mail/ftp etc). This is a  
non-root

filesystem.

There is one patch for quota that I supplied and was recently applied
to -current that is appropriate for FreeBSD 5.x-7.x that has to do  
with
file counts once the filesystem is completely full, that does not  
affect

hard limits.


I have narrowed the problem down to two items:  There is a reboot  
called for in the handbook during the quota setup that I probably  
didn't do.  Also, I was testing by having root copy data owned by the  
user with the quota.  While that changed the quota used, it may not  
have triggered the quota check.  In either case, after rebooting  
today and having the user do the copy, the hard quota is now enforced  
properly.  Thanks.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Quotas on 6.2

2007-04-28 Thread Doug Hardie
I understand quotas were broken in 6.1.  I am testing 6.2 where I  
thought they were working again.  However, it behaves considerably  
differently from 5.x.  I set both a hard and soft limit on a user to  
the same value.  Adding disk usage to that user past that limit  
succeeds.  quota shows the limit as having been exceeded but with a  
grace period of 7 days.  I don't want a grace period, but a hard  
limit.  I used edquota -t to change the grace periods for the  
partition to 1 day (per the man page).  However, it still shows a 7  
day grace period with quota and the limit is not enforced.  Did I  
miss something or is there still a problem with quotas.  Thanks.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


quotas on 6.2

2007-04-03 Thread Dave

   Hello,
   I'm trying to enable quotas on 6.2 following the handbook. I've added:

options QUOTA

to my kernel config, recompiled and installed. I then added:

enable_quotas=YES
check_quotas=NO

to /etc/rc.conf and finally added both userquota and group options to my /, 
/var, and /usr filesystems in /etc/fstab, other than that those entries are 
the same as in a default install. After doing all that i rebooted, and was 
under the impression the quota script would create the quota user and group 
files. This did not happen. I've included the errors. Any suggestions?

Thanks.
Dave.

/etc/fstab
/dev/ad0s1b.eli  none  swap sw  0 0
/dev/ad0s1a  /  ufs rw,userquota,groupquota  1 1
/dev/ad0s1f  /home  ufs rw,userquota,groupquota  2 2
/dev/ad0s1d  /usr  ufs rw,userquota,groupquota  2 2
/dev/ad0s1e  /var  ufs rw,userquota,groupquota  2 2

/etc/rc.conf
enable_quotas=YES
check_quotas=NO

#/etc/rc.d/quota start
Enabling quotas:quotaon: using //quota.group on
quotaon: /: No such file or directory
quotaon: using //quota.user on
quotaon: /: No such file or directory
quotaon: using /home/quota.group on
quotaon: /home: No such file or directory
quotaon: using /home/quota.user on
quotaon: /home: No such file or directory
quotaon: using /usr/quota.group on
quotaon: /usr: No such file or directory
quotaon: using /usr/quota.user on
quotaon: /usr: No such file or directory
quotaon: using /var/quota.group on
quotaon: /var: No such file or directory
quotaon: using /var/quota.user on
quotaon: /var: No such file or directory

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: print quotas in CUPS

2007-01-28 Thread Grant Wagner


Giorgos Keramidas [EMAIL PROTECTED] wrote:
 I am having difficulty installing cups and getting printing working on
 my Samsung ML-1710.  I've installed cups from port, and the splix
 driver from http://splix.ap2c.org/.  My printer shows up as /dev/ulpt0
 and running

echo stuff  /dev/ulpt0

 causes my printer to warm up, so I know at least I can write to the
 port and communication is working partially.  In the cups menu, I added
 the printer, and attempted to print a test page. I get an error
 message saying my quota is full.  Wierd as I don't have quota support
 on this machine.

 Any ideas?  Grant

I can't find any mention of quota in the web interface of CUPS running
on my laptop here.  There is a possibility that quota is enabled for
some printer, by setting options in the printers.conf file though.

Can you show us the contents of the file:

/usr/local/etc/cups/printers.conf

from your system?

If it contains the options which enable quotas for a certain printer,
you should see something like `PageLimit', then this is the `quota' that
you see mentioned above.

- Giorgos

Here is my cups printers.conf file.

# Printer configuration file for CUPS v1.2.7
# Written by cupsd on 2007-01-27 17:30
Printer laser2
Info laser2
DeviceURI usb:/dev/ulpt0
State Idle
StateTime 1169882462
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
AllowUser root
OpPolicy default
ErrorPolicy retry-job
/Printer

It appears that this too has no quota on it. Also, the job which I kicked off 
last night has been processing ever since.

I've included the error log for said job as well.

Thanks
Grant

 
-
Don't be flakey. Get Yahoo! Mail for Mobile and 
always stay connected to friends.___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]

Re: print quotas in CUPS (was: Re: Can not compile kernel.)

2007-01-27 Thread Giorgos Keramidas
On 2007-01-27 15:39, Grant Wagner [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote: Grant Wagner  wrote:
 Remove 'device ural' from your kernel config. file. Ural is a driver
 for  wireless adapters and depends on 'device wlan' which is
 commented in your  conf. file.

 Thanks applecom, I noticed that too. My kernel have been compiled and
 now is installed and runs nicely

 Now, on to another problem.

Please wrap your messages to a more reasonable line length, like 70-75
characters per line, so your messages can easily be read even by people
who are using text-based mailers.

Please also note that it is, in general, a good idea to start a *new*
thread by posting a *new* message -- a new, proper subject line -- to
freebsd-questions@freebsd.org (instead of replying to an existing
'thread of messages' with an entirely different, new question).  This
way, people reading through the messages of the list and skimming
through the subject lines for interesting material will find your posts
much much easier to locate and read in the intended order.

 I am having difficulty installing cups and getting printing working on
 my Samsung ML-1710.  I've installed cups from port, and the splix
 driver from http://splix.ap2c.org/.  My printer shows up as /dev/ulpt0
 and running

echo stuff  /dev/ulpt0

 causes my printer to warm up, so I know at least I can write to the
 port and communication is working partially.  In the cups menu, I added
 the printer, and attempted to print a test page. I get an error
 message saying my quota is full.  Wierd as I don't have quota support
 on this machine.

 Any ideas?  Grant

I can't find any mention of quota in the web interface of CUPS running
on my laptop here.  There is a possibility that quota is enabled for
some printer, by setting options in the printers.conf file though.

Can you show us the contents of the file:

/usr/local/etc/cups/printers.conf

from your system?

If it contains the options which enable quotas for a certain printer,
you should see something like `PageLimit', then this is the `quota' that
you see mentioned above.

For example, my `printers.conf' file contains:

DefaultPrinter HP4345
  Info HP Laserjet 4345
  Location Patras office
  DeviceURIlpd://hp4345/
  StateIdle
  StateTime1164289059
  AcceptingYes
  Shared   Yes
  JobSheetsnone none
  QuotaPeriod  0
  PageLimit0
  KLimit   0
  OpPolicy default
  ErrorPolicy  stop-printer
/Printer

Note how the `PageLimit' option above is set to zero (so I don't have
printing quotas enabled for this printer).

- Giorgos

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


quotas + jail ?

2006-01-11 Thread Vladimir Dvorak
Hello,

I have simple question - is possible to use quotas in jail(8) environment ?

I set up my system as follows:
1. this is setting in main environment
cat /etc/fstab | grep VSERVERS
/dev/ad3s1f /VSERVERS   ufs
rw,noatime,groupquota=/VSERVERS/machine1/quotagroup,userquota=/VSERVERS/machine1/quotauser

2   2

2. this is setting in jail(8)
/dev/ad3s1f  /ufs
rw,noatime,soft-updates,groupquota=/quotagroup,userquota=/quotauser

But still cannot use quotas in jail. I thought if I have access to
quotagroup and quotauser files, I can simply use quotas advantages.

I try

[EMAIL PROTECTED] /etc/rc.d/quota restart
quotaoff: /: Operation not permitted
quotaoff: /: Operation not permitted
Checking quotas: done.
Enabling quotas:quotaon: using /quotagroup on
quotaon: /: Operation not permitted
quotaon: using /quotauser on
quotaon: /: Operation not permitted
 done.


It seems to be impossible ( some kernel restriction ). :-( Is there some
way to allow this ? My last idea was to replicate users and groups to
main system and use quotas from it - but it is not good solution if we
have several hundreds users in jail(8).

Thank you !

Vladimir Dvorak

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: quotas + jail ?

2006-01-11 Thread Björn König

Vladimir Dvorak schrieb:


I have simple question - is possible to use quotas in jail(8) environment ?
[...]

It seems to be impossible ( some kernel restriction ). :-( Is there some
way to allow this ? My last idea was to replicate users and groups to
main system and use quotas from it - but it is not good solution if we
have several hundreds users in jail(8).


You don't need to replicate users and groups, just use UIDs and GIDs. 
There is a serious disadvantage: if you set quota for a specific UID 
then it affects all users with the same UID in different jails and even 
at the host; I guess this is not what you want.


If you want to restrict the space that can be consumed by a jail then 
you might use memory devices, i.e.


# create 1 GiB file
$ dd if=/dev/zero of=myjail321 count=16k bs=64k
$ mdconfig -af myjail321
md321
$ mkdir /jail/myjail321
$ mount /dev/md321 /jail/myjail321
$ cd /usr/src
$ make installworld DESTDIR=/jail/myjail321

and so on ...


Regards
Björn
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: quotas + jail ?

2006-01-11 Thread Vladimir Dvorak
Björn König wrote:

 Vladimir Dvorak schrieb:

 I have simple question - is possible to use quotas in jail(8)
 environment ?
 [...]

 It seems to be impossible ( some kernel restriction ). :-( Is there some
 way to allow this ? My last idea was to replicate users and groups to
 main system and use quotas from it - but it is not good solution if we
 have several hundreds users in jail(8).


 You don't need to replicate users and groups, just use UIDs and GIDs.
 There is a serious disadvantage: if you set quota for a specific UID
 then it affects all users with the same UID in different jails and
 even at the host; I guess this is not what you want.

 If you want to restrict the space that can be consumed by a jail then
 you might use memory devices, i.e.

 # create 1 GiB file
 $ dd if=/dev/zero of=myjail321 count=16k bs=64k
 $ mdconfig -af myjail321
 md321
 $ mkdir /jail/myjail321
 $ mount /dev/md321 /jail/myjail321
 $ cd /usr/src
 $ make installworld DESTDIR=/jail/myjail321

 and so on ...


 Regards
 Björn

Thank you Björn,

I thing it is possible. I will shift existing UIDs ( in jail) to higher
values (5- ) and apply quotas on them. I will try to eliminate UID
mixing.

Thank you for your suggestion.

Vladimir
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: quotas + jail ?

2006-01-11 Thread Michal Mertl
Vladimir Dvorak wrote:
 Hello,
 
 I have simple question - is possible to use quotas in jail(8) environment ?

Yes, it is, although with some restrictions. 

You have to enable the disk quotas from the host (have them listed in
host's /etc/fstab).

To operate the quotas from inside the jail quotas have to be mentioned
in jail's /etc/fstab too (when using the file name of quota file it has
to be relative to jail's root). Repquota/edquota/quota work inside the
jail.

You have to keep in mind that disk quotas are in fact a property of a
filesystem and are not related to jails at all. So if two jails share a
filesystem the disk quotas are shared too. If you have users with the
same UID in both the jails they will share the quota.

Michal


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: quotas + jail ?

2006-01-11 Thread Marc G. Fournier

On Wed, 11 Jan 2006, Michal Mertl wrote:


Vladimir Dvorak wrote:

Hello,

I have simple question - is possible to use quotas in jail(8) environment ?


Yes, it is, although with some restrictions.

You have to enable the disk quotas from the host (have them listed in
host's /etc/fstab).

To operate the quotas from inside the jail quotas have to be mentioned
in jail's /etc/fstab too (when using the file name of quota file it has
to be relative to jail's root). Repquota/edquota/quota work inside the
jail.

You have to keep in mind that disk quotas are in fact a property of a
filesystem and are not related to jails at all. So if two jails share a
filesystem the disk quotas are shared too. If you have users with the
same UID in both the jails they will share the quota.


How hard would it be to extend quotas so that its not just uid/gid based, 
but directory?  ie. everything under /vm/jail1 falls under this quota, 
regardless of uid/gid?



Marc G. Fournier   Hub.Org Networking Services (http://www.hub.org)
Email: [EMAIL PROTECTED]   Yahoo!: yscrappy  ICQ: 7615664
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: quotas + jail ?

2006-01-11 Thread Ceri Davies


On 11 Jan 2006, at 16:36, Marc G. Fournier wrote:


On Wed, 11 Jan 2006, Michal Mertl wrote:


Vladimir Dvorak wrote:

Hello,

I have simple question - is possible to use quotas in jail(8)  
environment ?


Yes, it is, although with some restrictions.

You have to enable the disk quotas from the host (have them listed in
host's /etc/fstab).

To operate the quotas from inside the jail quotas have to be  
mentioned
in jail's /etc/fstab too (when using the file name of quota file  
it has
to be relative to jail's root). Repquota/edquota/quota work inside  
the

jail.

You have to keep in mind that disk quotas are in fact a property of a
filesystem and are not related to jails at all. So if two jails  
share a

filesystem the disk quotas are shared too. If you have users with the
same UID in both the jails they will share the quota.


How hard would it be to extend quotas so that its not just uid/gid  
based, but directory?  ie. everything under /vm/jail1 falls under  
this quota, regardless of uid/gid?


Given the lack of a unique name for files in UFS, quite difficult,  
I'd presume.


Ceri


PGP.sig
Description: This is a digitally signed message part


Re: quotas + jail ?

2006-01-11 Thread Michal Mertl
Marc G. Fournier wrote:
 On Wed, 11 Jan 2006, Michal Mertl wrote:
 
  Vladimir Dvorak wrote:
  Hello,
 
  I have simple question - is possible to use quotas in jail(8) environment ?
 
  Yes, it is, although with some restrictions.
 
  You have to enable the disk quotas from the host (have them listed in
  host's /etc/fstab).
 
  To operate the quotas from inside the jail quotas have to be mentioned
  in jail's /etc/fstab too (when using the file name of quota file it has
  to be relative to jail's root). Repquota/edquota/quota work inside the
  jail.
 
  You have to keep in mind that disk quotas are in fact a property of a
  filesystem and are not related to jails at all. So if two jails share a
  filesystem the disk quotas are shared too. If you have users with the
  same UID in both the jails they will share the quota.
 
 How hard would it be to extend quotas so that its not just uid/gid based, 
 but directory?  ie. everything under /vm/jail1 falls under this quota, 
 regardless of uid/gid?

I don't think I understand your goal. Do you want some grand limit for
whole jail's disk usage or have separated quotas for jails on the same
partition?

Neither can be done at the moment with disk quotas. The needed changes
to support either will be quite extensive I believe.

I recommend using separate partition for each jail. This will allow you
to achieve both goals at the same time. If you have lot of jails and the
number of partitions is the problem you can use gpt(8) or vnode based
md(4) (see mdconfig(8)). With md(4) you can also use sparse backing
files and that way have more space than you have on physical drives.

Beware of overcommit though - I wouldn't be surprised if the system
crashed when the disk is full and the md(4) file system is supposed to
have free space in it.

Michal


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: setting a quotas default

2005-11-08 Thread Derrick MacPherson
On Mon, 2005-11-07 at 20:26 -0800, Derrick MacPherson wrote:
 i have proftpd getting users out of a mysql DB, and it's set to create 
 home dirs automaticaly; how do i get there to be a quota automaticaly be 
 placed on the users?



can this not be done?

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: setting a quotas default

2005-11-08 Thread Dan Nelson
In the last episode (Nov 08), Derrick MacPherson said:
 On Mon, 2005-11-07 at 20:26 -0800, Derrick MacPherson wrote:
  i have proftpd getting users out of a mysql DB, and it's set to
  create home dirs automaticaly; how do i get there to be a quota
  automaticaly be placed on the users?
 
 can this not be done?

What I do is just prefill the quotas for as many users as you expect
to have, using the edquota command.  Assuming your uids start at 1000
and you already have user 1000's quotas set:

 edquota -p 1000 1001-2000

will copy userid 1000's quotas to the next 1000 users to get created.
If proftpd can run a script when it creates a user, you could set the
quota in there.

-- 
Dan Nelson
[EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


setting a quotas default

2005-11-07 Thread Derrick MacPherson
i have proftpd getting users out of a mysql DB, and it's set to create 
home dirs automaticaly; how do i get there to be a quota automaticaly be 
placed on the users?

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Quotas not working on FreeBSD 5.4 for amd64

2005-10-22 Thread MELVIN D. NAVA
Good Afternoon, this is my first post ever to this list and I hope is the 
right place...


Recently (three weeks ago) I bought one dedicated server with FreeBSD 
5.4-release for amd64 and I haven't been able to use quotas, after I tried 
to enable quotas in fstab over the home filesystem and rebooting, the system 
just hanged so I checked if quota was enabled on the Kernel but it wasn't... 
So I asked at the Datacenter and they told me they tried initially to enable 
quotas on the Kernel but it wasn't working at all and the server wouldn't 
start.


I've been trying to find something like this already documented but I 
haven't found anything at all.


My server config:

FreeBSD 5.4-release for amd64
Cpanel/WHM
Dual Opteron 244, 2GB of ECC Ram and two SATA Drives

My questions:

1. Anyone knows about or had already this problem? is this normal?
2. Should I try to compile the kernel myself with quotas?

Thanks in advance for any help,

Melvin D. Nava 


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Quotas not working on FreeBSD 5.4 for amd64

2005-10-22 Thread MELVIN D. NAVA
Good Afternoon, this is my first post ever to this list and I hope is the 
right place...

Recently (three weeks ago) I bought one dedicated server with FreeBSD 
5.4-release for amd64 and I haven't been able to use quotas, after I tried 
to enable quotas in fstab over the home filesystem and rebooting, the system 
just hanged so I checked if quota was enabled on the Kernel but it wasn't... 
So I asked at the Datacenter and they told me they tried initially to enable 
quotas on the Kernel but it wasn't working at all and the server wouldn't 
start.

I've been trying to find something like this already documented but I 
haven't found anything at all.

My server config:

FreeBSD 5.4-release for amd64
Cpanel/WHM
Dual Opteron 244, 2GB of ECC Ram and two SATA Drives

My questions:

1. Anyone knows about or had already this problem? is this normal?
2. Should I try to compile the kernel myself with quotas?

Thanks in advance for any help,

Melvin D. Nava 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Quotas not working on FreeBSD 5.4 for amd64

2005-10-22 Thread Erik Norgaard

On Sat, 22 Oct 2005, MELVIN D. NAVA wrote:


Recently (three weeks ago) I bought one dedicated server with FreeBSD
5.4-release for amd64 and I haven't been able to use quotas, after I tried
to enable quotas in fstab over the home filesystem and rebooting, the system
just hanged so I checked if quota was enabled on the Kernel but it wasn't...
So I asked at the Datacenter and they told me they tried initially to enable
quotas on the Kernel but it wasn't working at all and the server wouldn't
start.


1. Make sure your kernel supports quota, the GENERIC kernel does 
not. You need to add this line to your kernel config and then 
compile and install a new kernel:


   options QUOTA   #enable disk quotas

Then reboot

2. In fstab as you know, you need to add userquota and/or 
groupquota to the options.


3. Enable or disable quota with quotaon/quotaoff

4. Edit quota for individual users or groups with edquota

I suggest that you keep quota turned off at boot so your system 
doesn't hang, then enable quotas after boot as in 3.



I've been trying to find something like this already documented but I
haven't found anything at all.


Did you check the handbook? Chp 16.14 seems to be for you. It is 
far more detailed than what I just wrote:


http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/quotas.html

Cheers, Erik


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Are quotas possbile on md filesystems?

2005-03-05 Thread stheg olloydson

--- Bob Johnson [EMAIL PROTECTED] wrote:

 On Friday 04 March 2005 11:39 pm, you wrote:
  it was said:

snip

 Argh!  I ought to quit posting things until I've had at least two
 good 
 nights of sleep.  bin/57641 does appear to me to address the same
 issue as my 
 patch:
 
 http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/57641 
 
 Sorry for the confusion.
 
 - Bob
 

Apparently the bin/57641 patch was committed after 5.3-Release. I just
cvsup'd my source, and I still do not see it. Maybe it will be in 5.4.
Better late than never :P

Regards,

stheg





__ 
Celebrate Yahoo!'s 10th Birthday! 
Yahoo! Netrospective: 100 Moments of the Web 
http://birthday.yahoo.com/netrospective/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Are quotas possbile on md filesystems?

2005-03-05 Thread Bob Johnson
On Saturday 05 March 2005 08:33 pm, stheg olloydson wrote:
 --- Bob Johnson [EMAIL PROTECTED] wrote:
  On Friday 04 March 2005 11:39 pm, you wrote:
   it was said:

 snip

  Argh!  I ought to quit posting things until I've had at least two
  good
  nights of sleep.  bin/57641 does appear to me to address the same
  issue as my
 
  patch:
  http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/57641
 
  Sorry for the confusion.
 
  - Bob

 Apparently the bin/57641 patch was committed after 5.3-Release. I just
 cvsup'd my source, and I still do not see it. Maybe it will be in 5.4.
 Better late than never :P


The PR status is open which suggests that it has not been committed yet.  It 
certainly wasn't in the code I worked from, which was CVSUPed on Feb 25th or 
so.  It probably needs someone to post an update to the PR or to email the 
responsible person to remind him that it hasn't been committed yet.  So I 
just did.  It might still be possible to get it into 5.4.


- Bob


 Regards,

 stheg





 __
 Celebrate Yahoo!'s 10th Birthday!
 Yahoo! Netrospective: 100 Moments of the Web
 http://birthday.yahoo.com/netrospective/

 !DSPAM:422a5e0c954621604418475!
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Are quotas possbile on md filesystems?

2005-03-04 Thread Michael R. Wayne
On Thu, 03 Mar 2005 16:53:19 -0500, Michael R. Wayne [EMAIL PROTECTED] wrote:
 
 Is it possible to use quotas on file-backed md filesystems
 on 5.3?  I was guessing that a line in fstab like:

OK, I see the error in my ways.  My goal is to use file-based
filesystems that are preserved acoss boots.  vnconfig says to
use mdconfig, the handbook suggests that the method I used is 
correct.  But everything is cleared on reboot, which is not 
what I was looking for.

So, what IS the correct way to create and use file-based file
systems? 

And, can I put quotas on them?

/\/\ \/\/

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Are quotas possbile on md filesystems?

2005-03-04 Thread Bob Johnson
Michael R. Wayne wrote:
On Thu, 03 Mar 2005 16:53:19 -0500, Michael R. Wayne [EMAIL PROTECTED] wrote:
 

Is it possible to use quotas on file-backed md filesystems
on 5.3?  I was guessing that a line in fstab like:
   

OK, I see the error in my ways.  My goal is to use file-based
filesystems that are preserved acoss boots.  vnconfig says to
use mdconfig, the handbook suggests that the method I used is 
correct.  But everything is cleared on reboot, which is not 
what I was looking for.

 

It appears that it always formats a new filesystem because that's what
mount_mfs did, and mdmfs is a replacement for mount_mfs.  I agree
with you that that should not be the default behavior for a file-backed
(vnode) disk, so I wrote a little patch to fix that:
===
--- mdmfs.c 2005/03/04 21:09:50 1.1
+++ mdmfs.c 2005/03/04 22:04:54
@@ -32,6 +32,7 @@
#include sys/cdefs.h
__FBSDID($FreeBSD: src/sbin/mdmfs/mdmfs.c,v 1.20 2004/05/17 07:07:20 
ru Exp $);
+/*$Id: mdmfs.c,v 1.5 2005/03/04 22:04:47 bobj Exp bobj $*/

#include sys/param.h
#include sys/mdioctl.h
@@ -89,7 +90,7 @@
   *mount_arg;
   enum md_types mdtype;   /* The type of our memory disk. */
   bool have_mdtype;
-   bool detach, softdep, autounit;
+   bool detach, softdep, autounit, want_newfs;
   char *mtpoint, *unitstr;
   char *p;
   int ch;
@@ -100,6 +101,7 @@
   detach = true;
   softdep = true;
   autounit = false;
+   want_newfs = true;
   have_mdtype = false;
   mdname = MD_NAME;
   mdnamelen = strlen(mdname);
@@ -119,10 +121,10 @@
   compat = true;
   while ((ch = getopt(argc, argv,
-   a:b:Cc:Dd:e:F:f:hi:LlMm:Nn:O:o:p:Ss:t:Uv:w:X)) != -1)
+   a:b:Cc:Dd:e:F:f:hi:LlMm:Nn:O:o:p:Ss:Uuv:w:X)) != -1)
   switch (ch) {
   case 'a':
-   argappend(newfs_arg, -a %s, optarg);
+   argappend(newfs_arg, -a %s, optarg);
   break;
   case 'b':
   argappend(newfs_arg, -b %s, optarg);
@@ -151,6 +153,7 @@
   usage();
   mdtype = MD_VNODE;
   have_mdtype = true;
+   want_newfs = false;
   argappend(mdconfig_arg, -f %s, optarg);
   break;
   case 'f':
@@ -213,6 +216,9 @@
   case 'U':
   softdep = true;
   break;
+   case 'u':
+   want_newfs = true;
+   break;
   case 'v':
   argappend(newfs_arg, -O %s, optarg);
   break;
@@ -268,7 +274,8 @@
   do_mdconfig_attach_au(mdconfig_arg, mdtype);
   else
   do_mdconfig_attach(mdconfig_arg, mdtype);
-   do_newfs(newfs_arg);
+   if (want_newfs)
+   do_newfs(newfs_arg);
   do_mount(mount_arg, mtpoint);
   do_mtptsetup(mtpoint, mi);
@@ -666,7 +673,7 @@
   if (!compat)
   fprintf(stderr,
usage: %s [-DLlMNSUX] [-a maxcontig [-b block-size] [-c cylinders]\n
-\t[-d rotdelay] [-e maxbpg] [-F file] [-f frag-size] [-i bytes]\n
+\t[-d rotdelay] [-e maxbpg] [-F file [-u]] [-f frag-size] [-i bytes]\n
\t[-m percent-free] [-n rotational-positions] [-O optimization]\n
\t[-o mount-options] [-p permissions] [-s size] [-w user:group]\n
\tmd-device mount-point\n, name);

So, what IS the correct way to create and use file-based file
systems? 

 

Apply the patch above, then something in /etc/fstab like the following will
not reformat the filesystem:
/dev/md3   /mnt   mfs   rw,-F/vnodes/fileimage,noauto   0   0
If you want it to reformat the filesystem as the old mount_mfs did
(or at least, as the old man pages say it did), then use something like
/dev/md3   /mnt   mfs   rw,-F/vnodes/fileimage,-u,noauto   0   0
Note that -u MUST follow -F on the command line to have any effect.
This breaks compatibility with the old mount_newfs.  I guess I should
have used to opposite sense for -u.  Which still would have broken
compatibility, but not as much.  This means that if this patch ever
makes it into a FreeBSD distribution, it is likely to default to formatting
rather than not formatting.  This will lead to a nasty surprise if you
aren't expecting it.  In other words, don't use this patch unless you
are desperately seeking a solution to a problem that makes it worth
the risk.  Don't blame me when some future change in behavior
deletes your important filesystem.
And, can I put quotas on them?
 

Don't know, but probably.
If applying a patch is a mystery to you, try (assuming you have the
full source installed) something that approximates this:
# cd /usr/src/sbin/mdmfs
# patch  /path/to/patch.file
# make
# make install
If you want to be thorough, apply the following patch to fix the
man page as well:
===
--- mdmfs.8 2005/03/04 22:06:21 1.1

Re: Are quotas possbile on md filesystems?

2005-03-04 Thread Bob Johnson
On Friday 04 March 2005 05:56 pm, Bob Johnson wrote:
 Michael R. Wayne wrote:
 On Thu, 03 Mar 2005 16:53:19 -0500, Michael R. Wayne [EMAIL PROTECTED] 
wrote:
 Is it possible to use quotas on file-backed md filesystems
 on 5.3?  I was guessing that a line in fstab like:
 
 OK, I see the error in my ways.  My goal is to use file-based
 filesystems that are preserved acoss boots.  vnconfig says to
 use mdconfig, the handbook suggests that the method I used is
 correct.  But everything is cleared on reboot, which is not
 what I was looking for.

 It appears that it always formats a new filesystem because that's what
 mount_mfs did, and mdmfs is a replacement for mount_mfs.  I agree
 with you that that should not be the default behavior for a file-backed
 (vnode) disk, so I wrote a little patch to fix that:

[patch omitted]


 So, what IS the correct way to create and use file-based file
 systems?


The patch I provided defaulted to NOT formatting the 
filesystem when used with the -F option.  This is the 
opposite of the normal behavior, creating the risk of 
a /etc/fstab that assumes that the filesystem will not 
be formatted being used with a new release that will format 
it by default, thus destroying the filesystem.  That 
would be very very bad.

So here is a new patch that modifies mdmfs / mount_mfs 
to behave as it does now, except that it will not format 
the filesystem before mounting if you supply the -A 
(mount as-is) option.  Thus, to use /etc/fstab to mount 
a file-backed filesystem without reformatting the filesystem, 
put something like this in /etc/fstab

/dev/md3  /mnt  mfs  rw,-A,-F /home/bob/mdfile,noauto  0  0

So, here is a patch to add this to the original mdmfs, 
as well as a patch to the man page.

=
--- mdmfs.c 2005/03/05 01:45:00 1.1
+++ mdmfs.c 2005/03/05 03:09:17
@@ -32,6 +32,7 @@

 #include sys/cdefs.h
 __FBSDID($FreeBSD: src/sbin/mdmfs/mdmfs.c,v 1.20 2004/05/17 07:07:20 ru Exp 
$
);
+/*$Id: mdmfs.c,v 1.5 2005/03/05 03:09:10 bobj Exp bobj $*/

 #include sys/param.h
 #include sys/mdioctl.h
@@ -89,7 +90,7 @@
*mount_arg;
enum md_types mdtype;   /* The type of our memory disk. */
bool have_mdtype;
-   bool detach, softdep, autounit;
+   bool detach, softdep, autounit, want_newfs;
char *mtpoint, *unitstr;
char *p;
int ch;
@@ -100,6 +101,7 @@
detach = true;
softdep = true;
autounit = false;
+   want_newfs=true;
have_mdtype = false;
mdname = MD_NAME;
mdnamelen = strlen(mdname);
@@ -119,8 +121,11 @@
compat = true;

while ((ch = getopt(argc, argv,
-   a:b:Cc:Dd:e:F:f:hi:LlMm:Nn:O:o:p:Ss:t:Uv:w:X)) != -1)
+   Aa:b:Cc:Dd:e:F:f:hi:LlMm:Nn:O:o:p:Ss:Uv:w:X)) != -1)
switch (ch) {
+   case 'A':
+   want_newfs=false;
+   break;
case 'a':
argappend(newfs_arg, -a %s, optarg);
break;
@@ -268,7 +273,8 @@
do_mdconfig_attach_au(mdconfig_arg, mdtype);
else
do_mdconfig_attach(mdconfig_arg, mdtype);
-   do_newfs(newfs_arg);
+   if (want_newfs)
+   do_newfs(newfs_arg);
do_mount(mount_arg, mtpoint);
do_mtptsetup(mtpoint, mi);

@@ -665,13 +671,13 @@
name = mdmfs;
if (!compat)
fprintf(stderr,
-usage: %s [-DLlMNSUX] [-a maxcontig [-b block-size] [-c cylinders]\n
+usage: %s [-ADLlMNSUX] [-a maxcontig [-b block-size] [-c cylinders]\n
 \t[-d rotdelay] [-e maxbpg] [-F file] [-f frag-size] [-i bytes]\n
 \t[-m percent-free] [-n rotational-positions] [-O optimization]\n
 \t[-o mount-options] [-p permissions] [-s size] [-w user:group]\n
 \tmd-device mount-point\n, name);
fprintf(stderr,
-usage: %s -C [-lNU] [-a maxcontig] [-b block-size] [-c cylinders]\n
+usage: %s -C [-AlNU] [-a maxcontig] [-b block-size] [-c cylinders]\n
 \t[-d rotdelay] [-e maxbpg] [-F file] [-f frag-size] [-i bytes]\n
 \t[-m percent-free] [-n rotational-positions] [-O optimization]\n
 \t[-o mount-options] [-s size] md-device mount-point\n, name);
=
--- mdmfs.8 2005/03/05 01:46:09 1.1
+++ mdmfs.8 2005/03/05 03:08:38
@@ -24,6 +24,7 @@
 .\ SUCH DAMAGE.
 .\
 .\ $FreeBSD: src/sbin/mdmfs/mdmfs.8,v 1.20 2004/05/17 08:35:41 ru Exp $
+.\ $Id: mdmfs.8,v 1.3 2005/03/05 03:08:21 bobj Exp bobj $
 .\
 .Dd February 26, 2004
 .Dt MDMFS 8
@@ -36,7 +37,7 @@
 driver
 .Sh SYNOPSIS
 .Nm
-.Op Fl DLlMNSUX
+.Op Fl ADLlMNSUX
 .Op Fl a Ar maxcontig
 .Op Fl b Ar block-size
 .Op Fl c Ar cylinders
@@ -57,7 +58,7 @@
 .Ar mount-point
 .Nm
 .Fl C
-.Op Fl lNU
+.Op Fl AlNUu
 .Op Fl a Ar maxcontig
 .Op Fl b Ar block-size
 .Op Fl c Ar cylinders
@@ -122,6 +123,12 @@
 .Xr mount_mfs 8
 for the same thing.
 .Bl -tag -width indent
+.It Fl A
+Mount filesystem as-is. Do not use newfs to format the
+filesystem before mounting

Re: Are quotas possbile on md filesystems?

2005-03-04 Thread Bob Johnson
On Friday 04 March 2005 10:33 pm, Bob Johnson wrote:
 On Friday 04 March 2005 05:56 pm, Bob Johnson wrote:
  Michael R. Wayne wrote:
  On Thu, 03 Mar 2005 16:53:19 -0500, Michael R. Wayne
   [EMAIL PROTECTED]

 wrote:
  Is it possible to use quotas on file-backed md filesystems
  on 5.3?  I was guessing that a line in fstab like:
  
  OK, I see the error in my ways.  My goal is to use file-based
  filesystems that are preserved acoss boots.  vnconfig says to
  use mdconfig, the handbook suggests that the method I used is
  correct.  But everything is cleared on reboot, which is not
  what I was looking for.
 
  It appears that it always formats a new filesystem because that's what
  mount_mfs did, and mdmfs is a replacement for mount_mfs.  I agree
  with you that that should not be the default behavior for a file-backed
  (vnode) disk, so I wrote a little patch to fix that:

 [patch omitted]


So after all that, NOW I notice that there is already a published 
patch for this:

http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/74105

Oh, well.  It was an amusing exercise.

- Bob
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Are quotas possbile on md filesystems?

2005-03-04 Thread stheg olloydson
it was said:

snip
So after all that, NOW I notice that there is already a published 
patch for this:

http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/74105

Oh, well.  It was an amusing exercise.

- Bob

Eh? Maybe _I_ am the one missing something. The link you provided goes
to a patch for IPX. The only PRs for mdmfs I find are bin/57641, 64153,
and 66763, and those do not seem to deal with this issue. I think you
ought to submit your patch because mdmfs' default behavior is a
problem.

Regards,

stheg  




__ 
Celebrate Yahoo!'s 10th Birthday! 
Yahoo! Netrospective: 100 Moments of the Web 
http://birthday.yahoo.com/netrospective/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Are quotas possbile on md filesystems?

2005-03-04 Thread Bob Johnson
On Friday 04 March 2005 11:39 pm, stheg olloydson wrote:
 it was said:

 snip

 So after all that, NOW I notice that there is already a published
 patch for this:
 
 http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/74105
 
 Oh, well.  It was an amusing exercise.
 
 - Bob

 Eh? Maybe _I_ am the one missing something. The link you provided goes
 to a patch for IPX. The only PRs for mdmfs I find are bin/57641, 64153,
 and 66763, and those do not seem to deal with this issue. I think you
 ought to submit your patch because mdmfs' default behavior is a
 problem.


Argh!  I'm going to stop posting until I've had some sleep.  But it does 
appear to me that bin/57641 addresses the same issue as my patch:

http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/57641

- Bob

 Regards,

 stheg

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Are quotas possbile on md filesystems?

2005-03-03 Thread Michael R. Wayne

Is it possible to use quotas on file-backed md filesystems
on 5.3?  I was guessing that a line in fstab like:

md  /home  mfs rw,-F/vnodes/home,nosuid,nodev,noexec,userquota  2 0

would work but it's not.  Can I get a working example?

/\/\ \/\/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


MySQL Disk Quotas per User/Group

2005-02-02 Thread Grant Peel
Hi all,
I have been struggling with how to include a users MySQL disk usage within 
thier disk quota.

Currently, each user has a disk quota set on thier /home/usernamehere 
directory

The mysql databases are kept in the /home/usernamehere/database directory, 
but, mysql insists on owning the files. (In the /usr/local/mysql/var/ there 
is a symlink to the users database directory:

/usr/local/mysql/var/usernamehere - /home/usernamehere/database
Is there a way to setup user:group permissions so that the database 
directory is included in the users disk quota?

-Grant 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


disk quotas and nfs

2005-01-27 Thread Peter Risdon
If machine A exports an nfs filesystem and machines B and C both mount
it as, say, /usr/home then how is it best to enforce common disk quotas?
If machine A is enforcing quotas and all the password files are
synchronised so user uids and gids are identical across all the
machines, will this be sufficient?

Thanks for any help.

Peter.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: disk quotas and nfs

2005-01-27 Thread Dan Nelson
In the last episode (Jan 27), Peter Risdon said:
 If machine A exports an nfs filesystem and machines B and C both
 mount it as, say, /usr/home then how is it best to enforce common
 disk quotas? If machine A is enforcing quotas and all the password
 files are synchronised so user uids and gids are identical across all
 the machines, will this be sufficient?

Yep.  Also make sure you have enabled rquotad in inetd.conf on the
server so the quota command works on the clients.

-- 
Dan Nelson
[EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: disk quotas and nfs

2005-01-27 Thread Peter Risdon
On Thu, 2005-01-27 at 09:25 -0600, Dan Nelson wrote:
 In the last episode (Jan 27), Peter Risdon said:
  If machine A exports an nfs filesystem and machines B and C both
  mount it as, say, /usr/home then how is it best to enforce common
  disk quotas? If machine A is enforcing quotas and all the password
  files are synchronised so user uids and gids are identical across all
  the machines, will this be sufficient?
 
 Yep.  Also make sure you have enabled rquotad in inetd.conf on the
 server so the quota command works on the clients.
 

Great, thanks very much.

Peter.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: quotas on 5.3

2004-11-19 Thread Nicolas Kowalski
On Thu, 18 Nov 2004, dave wrote:
Hello,
Hello.
   Got a question on quotas. I've enabled them on /usr and /var filesystems
by adding the userquota option to their options in fstab. This is after i
recompiled my kernel with the QUOTA option in it and rebooted. I then added:
enable_quotas=YES
check_quotas=NO
Why did you set this last option to NO ?
According to /etc/rc, the quotacheck utility (which creates and updates 
the quota files) will be run only if check_quotas is set to YES.

Regards.
--
Nicolas
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: quotas on 5.3

2004-11-19 Thread dave
Hello,
I set the check_quota option to no in rc.conf because on boot i did not
want the long delay in startup that quota checks cause.
Is this my issue?
Thanks.
Dave.

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: quotas on 5.3

2004-11-19 Thread Nicolas Kowalski
On Fri, 19 Nov 2004, dave wrote:
   I set the check_quota option to no in rc.conf because on boot i did not
want the long delay in startup that quota checks cause.
Is this my issue?
I think so.
About the long startup delay, as an example, I have a server (Dell 
2850) which spends less than 2 minutes to check 3 * 73GB SCSI disks. I 
realyy find this acceptable, as this server will not be shutdown 
frequently.

Regards.
--
Nicolas
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: quotas on 5.3

2004-11-19 Thread David E. Meier
Hi Dave,

you can run the command:

# /sbin/quotacheck -avgu

This will create your quota.user file. Because you have set
check_quotas=NO you can run the quotacheck command via cron task:

0  4 * * * root /sbin/quotacheck -avgu  /dev/null

HTH, Dave.

 Hello,
 Got a question on quotas. I've enabled them on /usr and /var
 filesystems
 by adding the userquota option to their options in fstab. This is after i
 recompiled my kernel with the QUOTA option in it and rebooted. I then
 added:
 enable_quotas=YES
 check_quotas=NO
 to /etc/rc.conf and again rebooted. According to the handbook quota files
 should be created automatically i don't have to touch any zero-length
 quota
 files. When the system came back up i checked /usr and /var for quota user
 files, i did not see them. Boot up messages indicate quota on /usr but
 again
 no quota file. Is this normal? Did i miss something?
 Thanks.
 Dave.

 ___
 [EMAIL PROTECTED] mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
 [EMAIL PROTECTED]




___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


quotas on 5.3

2004-11-18 Thread dave
Hello,
Got a question on quotas. I've enabled them on /usr and /var filesystems
by adding the userquota option to their options in fstab. This is after i
recompiled my kernel with the QUOTA option in it and rebooted. I then added:
enable_quotas=YES
check_quotas=NO
to /etc/rc.conf and again rebooted. According to the handbook quota files
should be created automatically i don't have to touch any zero-length quota
files. When the system came back up i checked /usr and /var for quota user
files, i did not see them. Boot up messages indicate quota on /usr but again
no quota file. Is this normal? Did i miss something?
Thanks.
Dave.

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Moving quotas from partition to partition

2004-11-11 Thread Dan Mahoney, System Admin
Hey all,
I'm about to move my server up to a larger drive, and I'd like to know if 
it's possible to use an existing quota file, or migrate the quota file 
somehow onto the new drive?  Otherwise, it's going to be a LOT of work by 
hand.

-Dan Mahoney
PS, is this question better asked in -hackers?
--
SOY BOMB!
-The Chest of the nameless streaker of the 1998 Grammy Awards' Bob Dylan
Performance.
Dan Mahoney
Techie,  Sysadmin,  WebGeek
Gushi on efnet/undernet IRC
ICQ: 13735144   AIM: LarpGM
Site:  http://www.gushi.org
---
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Filesystem quotas

2004-11-03 Thread Chris Burchell
In testing features on a FreeBSD mini installation I have modified the
/etc/fstab file so that the / partition is 'rq' instead of 'rw' - this
was done to enable quotas so I could try working with them.
(the man page said 'rq' was read/write/with quotas)

for ease of testing, the system was only two partitions - swap and /

However, now when reboot, the system tells me that / is read only!
argh!

Is there any way I can resolve this problem?  the # prompt I get doesn't
seem to allow me much access...

thanks in advance,
Chris
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Filesystem quotas

2004-11-03 Thread Tim Aslat
In the immortal words of Chris Burchell [EMAIL PROTECTED]...
 In testing features on a FreeBSD mini installation I have modified the
 /etc/fstab file so that the / partition is 'rq' instead of 'rw' - this
 was done to enable quotas so I could try working with them.
 (the man page said 'rq' was read/write/with quotas)

Actually I think you will find that is internal codes, try using the
userquota option as well as rw
eg: 
/dev/ad0s1h/home   ufs  rw,userquota,groupquota   1  1

Cheers

Tim



-- 
Tim Aslat [EMAIL PROTECTED]
Spyderweb Consulting
http://www.spyderweb.com.au
Phone: +61 0401088479
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Disk quotas

2004-10-02 Thread John Oxley
The Scenario:

I am running a multiuser FreeBSD 5.2.1-RELEASE box for ~500 users.  We
have enforced disk quotas on /home and /tmp of 250MB soft and 256MB
hard

The Problem:

One user has inadvertently snaked around this. (btw I like users who
tell you when they have found a problem that works in their favour) 
We're running Apache 1 with mod_php, mod_ssl etc etc etc.  This user
has gallery setup on his webpage and the albums directory is chmod
707'd so that httpd can write to it.

The problem is that httpd creates files as http:group and quota is not
picking up that he is using more disk space than we want him to.

The Question:

Can quota be told that all files in ~luser belong to luser as well as
all files owned by luser.

If not, where would the appropriate place for hacking be, the kernel
or usr.bin/*quota*

-Ox
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Disk quotas

2004-10-02 Thread Matthew Seaman
On Sat, Oct 02, 2004 at 11:29:00AM +0200, John Oxley wrote:
 
 The Question:
 
 Can quota be told that all files in ~luser belong to luser as well as
 all files owned by luser.

The simplest way to do that is to give each user their own individual
group, and then simply use the *group* quotas rather than the
individual per-user quotas.

This works very well where the user is having files created on their
behalf by other UIDs (eg. httpd in this case) because of the standard
BSD behaviour that files default to inheriting the same group
ownership as the directory they are created in.  With some exceptions
for files created by root, or where the sticky bit is set on the
directory.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   26 The Paddocks
  Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614  Bucks., SL7 1TH UK


pgpyP3DNHj6sX.pgp
Description: PGP signature


Re: Disk quotas

2004-10-02 Thread Richard Lynch
John Oxley wrote:
 has gallery setup on his webpage and the albums directory is chmod
 707'd so that httpd can write to it.

Does that user realize that everybody else on the server can use PHP to
write web content to that directory?...

Perhaps if a defacement example were demonstrated, he'd move those files
out of his web directory, and add in some PHP scripts to read/write the
image files with validation-checking, such as using
http://php.net/getimagesize to make sure the image file *IS* an image
file.

 The problem is that httpd creates files as http:group and quota is not
 picking up that he is using more disk space than we want him to.

One possibility, if you are running Apache 2.0, is to set each PHP user on
a directory by directory basis in httpd.conf

Or so I've been told.

Never done it yet.

It cannot (readily) be done in Apache 1.x

-- 
Like Music?
http://l-i-e.com/artists.htm

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: 16-character username limit in quotas?

2004-08-20 Thread Chris Dillon
On Thu, 19 Aug 2004, Dan Nelson wrote:
In the last episode (Aug 19), Chris Dillon said:
I've just run into a 16-character username limit in our quota
support, or at least in the edquota command itself (5-CURRENT):
edquota -u -e /afilesystem:614400:716800:4000:5000 areallylongusername
edquota: areallylongusern: no such user
Does anybody know what would it take to raise this limit to at least
32 characters?
Try bumping MAXLOGNAME in /usr/include/sys/param.h and UT_NAMESIZE in
/usr/include/utmp.h and rebuilding world.
Thank you, I'm building a new kernel+world right now.  For some reason 
I thought we had already bumped those particular limits up past 16 
characters so I didn't look at them.  I ran into this problem because 
I'm using Samba's winbindd with nsswitch, and the usernames are 
prepended with our Windows 2000 domain name, making them longer than 
usual.  Samba, chown, ls, etc. don't seem to have a problem with these 
long names (nsswitch is great!), so they must not pay any attention to 
MAXLOGNAME and UT_NAMESIZE and that's what made me think it was 
specific to quotas.  Is there any reason this couldn't be bumped up to 
32 characters (or more) by default for better compatability with 
alternate namespaces?

--
 Chris Dillon - cdillon(at)wolves.k12.mo.us
 FreeBSD: The fastest, most open, and most stable OS on the planet
 - Available for IA32, IA64, AMD64, PC98, Alpha, and UltraSPARC architectures
 - PowerPC, ARM, MIPS, and S/390 under development
 - http://www.freebsd.org
Q: Because it reverses the logical flow of conversation.
A: Why is putting a reply at the top of the message frowned upon?
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


16-character username limit in quotas?

2004-08-19 Thread Chris Dillon
I've just run into a 16-character username limit in our quota support, 
or at least in the edquota command itself (5-CURRENT):

edquota -u -e /afilesystem:614400:716800:4000:5000 areallylongusername
edquota: areallylongusern: no such user
Does anybody know what would it take to raise this limit to at least 
32 characters?

--
 Chris Dillon - cdillon(at)wolves.k12.mo.us
 FreeBSD: The fastest, most open, and most stable OS on the planet
 - Available for IA32, IA64, AMD64, PC98, Alpha, and UltraSPARC architectures
 - PowerPC, ARM, MIPS, and S/390 under development
 - http://www.freebsd.org
Q: Because it reverses the logical flow of conversation.
A: Why is putting a reply at the top of the message frowned upon?
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: 16-character username limit in quotas?

2004-08-19 Thread Dan Nelson
In the last episode (Aug 19), Chris Dillon said:
 I've just run into a 16-character username limit in our quota
 support, or at least in the edquota command itself (5-CURRENT):
 
 edquota -u -e /afilesystem:614400:716800:4000:5000 areallylongusername
 edquota: areallylongusern: no such user
 
 Does anybody know what would it take to raise this limit to at least
 32 characters?

Try bumping MAXLOGNAME in /usr/include/sys/param.h and UT_NAMESIZE in
/usr/include/utmp.h and rebuilding world.

-- 
Dan Nelson
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


User quotas in a jail

2004-03-31 Thread r_dal
Hi,

I wasn't sure of the best way to manage quotas on a jailed system, I'm running FreeBSD 
v4.9. I have several file systems mounted on the host system and have quotas enabled 
on the /var partition where I'm running the jail.  Since the password db is different 
between the host and jail(s) what's the best way to check and enforce quotas on the 
users in the jails? 

I don't have a true /etc/fstab file in the jail to run the quota-related commands. 
If I set and check quotas from the host system, how do I tell if I'm looking up fred 
on jail 1 or fred on jail 2? Saw a few threads in the archive related to user/group 
quotas in a jail, but was unclear on how to configure FreeeBSD for that.

Thanks in advance,
Rich

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Enabling quotas

2004-03-10 Thread Robert Fitzpatrick
I am running 5.2.1 and trying to enable quotas, I see that I need to
build and install my own custom kernel to support this? I read the
Chapter 9 in the Handbook, but don't quite understand one thing. I can't
seem to locate what changes I need to make to the new kernel
configuration  before building it in order to enable quotas. Can someone
clarify this for me?

-- 
Robert

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Enabling quotas

2004-03-10 Thread Robert Barten
On Wed, Mar 10, 2004 at 10:00:50AM -0500, Robert Fitzpatrick wrote:
 I am running 5.2.1 and trying to enable quotas, I see that I need to
 build and install my own custom kernel to support this? I read the
 Chapter 9 in the Handbook, but don't quite understand one thing. I can't
 seem to locate what changes I need to make to the new kernel
 configuration  before building it in order to enable quotas. Can someone
 clarify this for me?
 
 -- 
 Robert

I couldn't describe that better than chapter 9.3 - where exactly do you
struggle? Or is it 12.13 you need help with? You only have to add one
single line to your kernel config:
options QUOTA
-- 
Robert Barten
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Enabling quotas

2004-03-06 Thread Robert Fitzpatrick
I am running 5.2.1 and trying to enable quotas, I see that I need to
build and install my own custom kernel to support this? I read the
Chapter 9 in the Handbook, but don't quite understand one thing. I can't
seem to locate what changes I need to make to the new kernel
configuration  before building it in order to enable quotas. Can someone
clarify this for me?

-- 
Robert

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Enabling quotas

2004-03-06 Thread Matthew Seaman
On Sat, Mar 06, 2004 at 11:30:07AM -0500, Robert Fitzpatrick wrote:
 I am running 5.2.1 and trying to enable quotas, I see that I need to
 build and install my own custom kernel to support this? I read the
 Chapter 9 in the Handbook, but don't quite understand one thing. I can't
 seem to locate what changes I need to make to the new kernel
 configuration  before building it in order to enable quotas. Can someone
 clarify this for me?

You need to add the line:

options  QUOTA

to your kernel configuration.  If this is the first time you've ever
got your feet wet with kernel compilation, start off with something
very close to GENERIC.  In fact, copy GENERIC to YOURKERNCONF, edit
YOURKERNCONF to change the 'ident' line so it reads:

ident YOURKERNCONF

and add the 'options QUOTA' line at the end of the big block of
options stuff that follows next in the file.

Then build yourself a kernel, install it and reboot, following the
instructions in the Hadbook for the exact way to do that.  With such a
minimal change, you're pretty much assured of success.  You can
develop a more highly customized kernel with minimal risk of failure
by making small incremental changes in this manner, at least until you
run out of patience with repeatedly recompiling the kernel.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   26 The Paddocks
  Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614  Bucks., SL7 1TH UK


pgp0.pgp
Description: PGP signature


Enabling quotas

2004-02-29 Thread Robert Fitzpatrick
I am running 5.2.1, I found the docs on how to enable quotas and build a
custom kernel because it is not built into GENERIC, but I can't find out
what to change my custom kernel before building it. Can someone tell me
what to look for and change in my custom version of GENERIC to enable
quotas?

-- 
Robert

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Enabling quotas

2004-02-29 Thread zam4ever
- Original Message 
From: Robert Fitzpatrick [EMAIL PROTECTED]
To: [EMAIL PROTECTED] [EMAIL PROTECTED]
Subject: Enabling quotas
Date: 01/03/04 07:57

 I am running 5.2.1, I found the docs on how to enable quotas and build a
 custom kernel because it is not built into GENERIC, but I can't find out
 what to change my custom kernel before building it. Can someone tell me
 what to look for and change in my custom version of GENERIC to enable
 quotas?
 
 -- 
 Robert

1. Recompile your kernel with the option:
 optionsQUOTA

2. Edit /etc/rc.conf file and add:
enable_quotas=YES

This section will provide a step by step how to do it:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/quotas.html

And here how to compile and build a custom kernel:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-building.html

regards,
zam4ever
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Other ways than quotas to limit mail files size ??

2004-01-12 Thread Greg Bernard
Le 11/01/04 23:12, « Mike Maltese » [EMAIL PROTECTED] a écrit :

 Is there another way to limit the amount of space occupied by mail files
 on
 a per user basis using another method than quotas ?
 
 I would like to limit the amount of space available for each user's e.mail
 so e.mail file size will not go crazy.
 
 Is there an option to limit message size with the MTA you are using?
 

Well I don't know, that's my question...

I am using sendmail.


«?»¥«?»§«?»¥«?»§«?»¥«?»§«?»¥«?»§«?»¥«?»§«?»¥«?»§

Gregober --- PGP ID -- 0x1BA3C2FD
omni_osx_ml @at@ todoo.biz

«?»¥«?»§«?»¥«?»§«?»¥«?»§«?»¥«?»§«?»¥«?»§«?»¥«?»§



___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Other ways than quotas to limit mail files size ??

2004-01-12 Thread Paul Chvostek
On Sun, Jan 11, 2004 at 09:24:28PM +0100, Greg Bernard wrote:
 
 Is there another way to limit the amount of space occupied by mail files on
 a per user basis using another method than quotas ?
 
 I would like to limit the amount of space available for each user's e.mail
 so e.mail file size will not go crazy.

What exactly do you want to do?

Filesystem quotas will cause a bounce message to be returned to the
sender indicating that the recipient was over quota.  That's generally
the preferred way because the operating system takes care of most of it.
You could modify that bounce message to include friendlier text if the
default text is a problem for you.

Alternately, you could implement a solution using procmail, with a small
tool like http://www.it.ca/software/fsizecompare.c to determine existing
filesize and behave accordingly.  Or you could come up with other clever
behaviour based on whatever criteria you dream up.

But you have to dream it up first.  Figure out exactly what you want to
do with your users' mail.  Then try to write something that does it.
And if you have problems with that, come back to the list and ask for
advice.  :-)

p

-- 
  Paul Chvostek [EMAIL PROTECTED]
  it.canadahttp://www.it.ca/
  Free PHP web hosting!http://www.it.ca/web/

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Other ways than quotas to limit mail files size ??

2004-01-12 Thread Jez Hancock
On Mon, Jan 12, 2004 at 08:34:53AM +0100, Greg Bernard wrote:
 Le 11/01/04 23:12, ??Mike Maltese?? [EMAIL PROTECTED] a ?crit?:
  Is there another way to limit the amount of space occupied by mail files
  on
  a per user basis using another method than quotas ?
  I would like to limit the amount of space available for each user's e.mail
  so e.mail file size will not go crazy.
  Is there an option to limit message size with the MTA you are using?

 Well I don't know, that's my question...
 I am using sendmail.
Exim can do quotas.

http://www.exim.org/

also in the ports:

/usr/ports/mail/exim/

I've never actually used the quota system myself in Exim but it sounds
relatively straightforward - from the specifications for Exim:


quota   Type: string*  Default: unset

This option imposes a limit on the size of the file to which Exim is
appending, or to the total space used in the directory tree when the
directory option is set. In the latter case, computation of the space
used is expensive, because all the files in the directory (and any sub-
directories) have to be individually inspected and their sizes summed (but
see quota_size_regex below). Also, there is no interlock against two
simultaneous deliveries into a multi-file mailbox. For single-file
mailboxes, of course, an interlock is a necessity.

A file's size is taken as its used value. Because of blocking effects,
this may be a lot less than the actual amount of disk space allocated to
the file. If the sizes of a number of files are being added up, the
rounding effect can become quite noticeable, especially on systems that
have large block sizes. Nevertheless, it seems best to stick to the used
figure, because this is the obvious value which users understand most
easily.

The value of the option is expanded, and must then be a numerical value
(decimal point allowed), optionally followed by one of the letters K or M.
A value of zero unsets the option. The expansion happens while Exim is
running as root, before it changes uid for the delivery. This means that
files which are inaccessible to the end user can be used to hold quota
values that are looked up in the expansion. When delivery fails because
this quota is exceeded, the handling of the error is as for system quota
failures.

By default, Exim's quota checking mimics system quotas, and restricts the
mailbox to the specified maximum size, though the value is not accurate to
the last byte, owing to separator lines and additional headers that may
get added during message delivery. When a mailbox is nearly full, large
messages may get refused even though small ones are accepted, because the
size of the current message is added to the quota when the check is made.
This behaviour can be changed by setting quota_is_inclusive false. When
this is done, the check for exceeding the quota does not include the
current message. Thus, deliveries continue until the quota has been
exceeded; thereafter, no further messages are delivered. See also
quota_warn_threshold.

quota_directory Type: string*  Default: unset

This option defines the directory to check for quota purposes when
delivering into individual files. The default is the delivery directory,
or, if a file called maildirfolder exists in a maildir directory, the
parent of the delivery directory.

quota_filecount Type: string*  Default: 0

This option applies when the directory option is set. It limits the
total number of files in the directory (compare the inode limit in system
quotas). It can only be used if quota is also set. The value is
expanded; an expansion failure causes delivery to be deferred.

quota_is_inclusive  Type: boolean   Default: true

See quota above.

quota_size_regex Type: string   Default: unset

This option applies when one of the delivery modes that writes a separate
file for each message is being used. When Exim wants to find the size
of one of these files in order to test the quota, it first checks
quota_size_regex. If this is set to a regular expression that matches
the file name, and it captures one string, that string is interpreted as a
representation of the file's size. The value of quota_size_regex is not
expanded.

This feature is useful only when users have no shell access to their
mailboxes - otherwise they could defeat the quota simply by renaming the
files. This facility can be used with maildir deliveries, by setting
maildir_tag to add the file length to the file name. For example:

  maildir_tag = ,S=$message_size
  quota_size_regex = ,S=(\d+)

The regular expression should not assume that the length is at the end of
the file

Re: Other ways than quotas to limit mail files size ??

2004-01-12 Thread Uwe Doering
Greg Bernard wrote:
Is there another way to limit the amount of space occupied by mail files on
a per user basis using another method than quotas ?
I would like to limit the amount of space available for each user's e.mail
so e.mail file size will not go crazy.
You could switch to Cyrus IMAP, which is a complete IMAP4/POP3 email 
storage subsystem with file system independent quotas.

   Uwe
--
Uwe Doering |  EscapeBox - Managed On-Demand UNIX Servers
[EMAIL PROTECTED]  |  http://www.escapebox.net
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Other ways than quotas to limit mail files size ??

2004-01-12 Thread Dan Pelleg
Greg Bernard [EMAIL PROTECTED] writes:

 Is there another way to limit the amount of space occupied by mail files on
 a per user basis using another method than quotas ?
 
 I would like to limit the amount of space available for each user's e.mail
 so e.mail file size will not go crazy.
 
 
 Thanks for your advices...
 

I've never tried this, but it should work: set up a vn(4) disk of the right
size, and arrange for the user's spool to be on its mountpoint. See
vnconfig(8) for setup examples.

-- 

  Dan Pelleg
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Other ways than quotas to limit mail files size ??

2004-01-11 Thread Greg Bernard
Is there another way to limit the amount of space occupied by mail files on
a per user basis using another method than quotas ?

I would like to limit the amount of space available for each user's e.mail
so e.mail file size will not go crazy.


Thanks for your advices...


«?»¥«?»§«?»¥«?»§«?»¥«?»§«?»¥«?»§«?»¥«?»§«?»¥«?»§

Grégory Bernard   11, rue de la Tour
Directeur 75116 Paris France
www.ToDoo.biz tel : +(33) 1 40 26 43 14

«?»¥«?»§«?»¥«?»§«?»¥«?»§«?»¥«?»§«?»¥«?»§«?»¥«?»§

PGP ID -- 0x1BA3C2FD

I have always wished that my computer would be as easy to use as my
telephone. My wish has come true. I no longer know how to use my
telephone. - Bjarne Stroustrup



___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Other ways than quotas to limit mail files size ??

2004-01-11 Thread Mike Maltese
 Is there another way to limit the amount of space occupied by mail files
on
 a per user basis using another method than quotas ?

 I would like to limit the amount of space available for each user's e.mail
 so e.mail file size will not go crazy.

Is there an option to limit message size with the MTA you are using?

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


courier-imap + exim quotas

2003-10-20 Thread Matthew Faircliff
Hello,

Can somebody please tell me how to implement quotas using courier-imap and exim.  The 
docs on this seem quite lacking!

Matthew Faircliff

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: courier-imap + exim quotas

2003-10-20 Thread Matthew Seaman
On Mon, Oct 20, 2003 at 09:15:02AM +, Matthew Faircliff wrote:

 Can somebody please tell me how to implement quotas using courier-imap and exim.  
 The docs on this seem quite lacking!

Quotas aren't provided by the mail software -- they are a function of
the filesystem that you store the mail on.

To set up quotas:

i) Make sure quotas are enabled in your kernel configuration:

options QUOTA

   It's not in the GENERIC kernel for 4.x.  If you don't want to
   rebuild your kernel, you may be able to kldload(8) a quota
   module -- see loader.conf(5).

   ii) Enable quotas on boot up.  Add:

enable_quotas=YES
check_quotas=YES

   to /etc/rc.conf

  iii) Mark the file systems you want to use quotas on in /etc/fstab
   by setting the appropriate options in the mount flags.

/dev/ad0s1e /var ufs 
rw,userquota=/var/quota/var.user,groupquota=/var/quota/var.group 2 2

   See fstab(5) for details.

   iv) Now either reboot or run the following commands while the
   system is fairly quiescent:

# quotacheck -a
# quotaon -a

   This will scan the disk partition (can take some time) and make
   a table showing how much space is being used by each user and
   group.  It will then enable, at the system level, hooks into
   the low level filesystem calls that updates that table whenever
   the filesystem is written to.  See quotaon(8) and
   quotacheck(8).

v) Now the quota system is up and running, and you can use the
   quota(1) and repquota(8) commands to see how much disk space is
   being used by each user.  However, you haven't actually set up
   any limits for any users yet.  To do that, use the edquota(1)
   command.

Your mail programs will automatically operate within the quota
settings you set up, and handle the EDQUOT errors the system will
generate if the user receives over-much mail.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   26 The Paddocks
  Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614  Bucks., SL7 1TH UK


pgp0.pgp
Description: PGP signature


Re: courier-imap + exim quotas

2003-10-20 Thread Matthew Faircliff
Hello Matthew,

Thanks for the info. 

I am sorry I did not word my question properly - what I meant was:

Can somebody please tell me how to implement quotas using courier-imap and exim with 
virtual user maildirs?

OS quotas solve quota issues for real system users; but how do you enforce quotas for 
virtual mail users?

Matthew Faircliff


On Mon, Oct 20, 2003 at 09:50:35AM +0100, Matthew Seaman wrote:
Date: Mon, 20 Oct 2003 09:50:35 +0100
From: Matthew Seaman [EMAIL PROTECTED]
To: Matthew Faircliff [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: courier-imap + exim quotas
Mail-Followup-To: Matthew Seaman [EMAIL PROTECTED],
Matthew Faircliff [EMAIL PROTECTED],
[EMAIL PROTECTED]

On Mon, Oct 20, 2003 at 09:15:02AM +, Matthew Faircliff wrote:

 Can somebody please tell me how to implement quotas using courier-imap and exim.  
 The docs on this seem quite lacking!

Quotas aren't provided by the mail software -- they are a function of
the filesystem that you store the mail on.

To set up quotas:

i) Make sure quotas are enabled in your kernel configuration:

options QUOTA

   It's not in the GENERIC kernel for 4.x.  If you don't want to
   rebuild your kernel, you may be able to kldload(8) a quota
   module -- see loader.conf(5).

   ii) Enable quotas on boot up.  Add:

enable_quotas=YES
check_quotas=YES

   to /etc/rc.conf

  iii) Mark the file systems you want to use quotas on in /etc/fstab
   by setting the appropriate options in the mount flags.

/dev/ad0s1e /var ufs 
rw,userquota=/var/quota/var.user,groupquota=/var/quota/var.group 2 2

   See fstab(5) for details.

   iv) Now either reboot or run the following commands while the
   system is fairly quiescent:

# quotacheck -a
# quotaon -a

   This will scan the disk partition (can take some time) and make
   a table showing how much space is being used by each user and
   group.  It will then enable, at the system level, hooks into
   the low level filesystem calls that updates that table whenever
   the filesystem is written to.  See quotaon(8) and
   quotacheck(8).

v) Now the quota system is up and running, and you can use the
   quota(1) and repquota(8) commands to see how much disk space is
   being used by each user.  However, you haven't actually set up
   any limits for any users yet.  To do that, use the edquota(1)
   command.

Your mail programs will automatically operate within the quota
settings you set up, and handle the EDQUOT errors the system will
generate if the user receives over-much mail.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   26 The Paddocks
  Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614  Bucks., SL7 1TH UK


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Can Freebsd provides tree-based quotas.

2003-09-02 Thread latin roy
Hi,
  Can you please tell me if linux or freebsd is
providing Tree-based quotas (directory quota) ?
  Please inform me if any other vendor is prividing
it.

Thanks in advance.
latin

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Can Freebsd provides tree-based quotas.

2003-09-02 Thread Jerry McAllister
 
 Hi,
   Can you please tell me if linux or freebsd is
 providing Tree-based quotas (directory quota) ?

As far as I know, FreeBSd does quotas based on per user/per filesystem.
It does not do quotas based on subdirectories within a filesystem.
If this has changed recently (eg 5.xx), I don't know.
I haven't looked at quotos in Linux.

   Please inform me if any other vendor is prividing
 it.

Don't know.

jerry

 
 Thanks in advance.
 latin
 
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: virtual users quotas with Postfix, Courier-IMAP and MySQL

2003-07-12 Thread Hendry S.
upon  mail i received, Alfonso Romero said that 

 Hi, I currently have configured a FreeBSD 4.8 box with postfix, courier-imap and 
 mysql to host virtual email accounts. But I can?t find info on how to limit space on 
 virtual users' accounts. Has anyone in this list some info about this?
 
 Thanks in advance.

here's mine:

virtual_mailbox_domains =
mysql:/usr/local/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_maps =
mysql:/usr/local/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_mailbox_limit = 5120



 
 Alfonso Romero
 ___
 [EMAIL PROTECTED] mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]
 
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: virtual users quotas with Postfix, Courier-IMAP and MySQL

2003-07-12 Thread Alfonso Romero
Thanks for your reply. I have the same virtual_mailbox_limit , but what I
need is to control each virtual user´s quota separately. I found out postfix
has a VDA patch and there´s the fs quota solution, but I want to know what
the best one is.

Regards

Alfonso
- Original Message -
From: Hendry S. [EMAIL PROTECTED]
To: Alfonso Romero [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Saturday, July 12, 2003 2:15 AM
Subject: Re: virtual users quotas with Postfix, Courier-IMAP and MySQL


 upon  mail i received, Alfonso Romero said that

  Hi, I currently have configured a FreeBSD 4.8 box with postfix,
courier-imap and mysql to host virtual email accounts. But I can?t find info
on how to limit space on virtual users' accounts. Has anyone in this list
some info about this?
 
  Thanks in advance.

 here's mine:

 virtual_mailbox_domains =
 mysql:/usr/local/etc/postfix/mysql_virtual_domains_maps.cf
 virtual_mailbox_maps =
 mysql:/usr/local/etc/postfix/mysql_virtual_mailbox_maps.cf
 virtual_mailbox_limit = 5120
 


 
  Alfonso Romero
  ___
  [EMAIL PROTECTED] mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-questions
  To unsubscribe, send any mail to
[EMAIL PROTECTED]
 
 ___
 [EMAIL PROTECTED] mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
[EMAIL PROTECTED]


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


virtual users quotas with Postfix, Courier-IMAP and MySQL

2003-07-10 Thread Alfonso Romero
Hi, I currently have configured a FreeBSD 4.8 box with postfix, courier-imap and mysql 
to host virtual email accounts. But I can´t find info on how to limit space on virtual 
users' accounts. Has anyone in this list some info about this?

Thanks in advance.

Alfonso Romero
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: quotas on vnode disks

2003-07-08 Thread mark tinguely
 Long story short. Is it possible to enable quota support on vnode disks as
 doing a mount -o usrquota,grpquota /dev/vn0 /mnt/point just isn't working
 for me

did you add:

in /etc/fstab:

/dev/vn0c   /mnt/point  ufs rw,userquota,groupquota 0   0

just mount the regular way:

# mount /mnt/point

(assuming you already made the /mnt/point/quota.user and /mnt/point/quota.group)
let the quota consistancy program do it thing:

# quotacheck /mnt/point

turn on quotas:

# quotaon /mnt/point

If the configuration variable enable_quotas and check_quotas,
are equal to YES this gets done at bootup.

--Mark Tinguely
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


quotas on vnode disks

2003-07-07 Thread Rus Foster
Hi All,
Long story short. Is it possible to enable quota support on vnode disks as
doing a mount -o usrquota,grpquota /dev/vn0 /mnt/point just isn't working
for me

Rgds

Rus

-- 
www: http://www.65535.net   | Hosting - Shell Accounts
MSNM: [EMAIL PROTECTED] | Virtual Servers from just $15/mo
e: [EMAIL PROTECTED]   | Community: http://www.65535.org
t: +44 (0) 7092016595   | 10% Donation on every FreeBSD product
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: quotas on vnode disks

2003-07-07 Thread Clement Laforet
On Mon, 7 Jul 2003 15:40:06 -0700 (PDT)
Rus Foster [EMAIL PROTECTED] wrote:

 Hi All,
 Long story short. Is it possible to enable quota support on vnode disks as
 doing a mount -o usrquota,grpquota /dev/vn0 /mnt/point just isn't working
 for me

It should world since quota are FS related.
If your image has UFS fs, it sould be OK.

clem
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: question regarding quotas

2003-06-30 Thread Josh Brooks


On Mon, 30 Jun 2003, Dan Nelson wrote:


 If you're adventurous, you could use growfs :)


Reading the archives, it seems as if you would use growfs, but then run
into performance problems because you did not defragment afterward (and
there is no defrag utility for UFS).

Something about the performance getting worse and worse as you filled up
the grown FS, since the go get some free space algorithm would fail a
lot more since the first half of the disk would be packed full, and the
space you grew on would not be ?

comments ?

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: tree-based quotas for UFS/UFS2?

2003-06-30 Thread Chris Dillon
On Thu, 26 Jun 2003, Ryan Dooley wrote:

 Has anybody done work on Tree-based quotas for UFS/UFS2?  As an
 administrator I'm finding more and more reasons that such a thing
 would be a good thing.

By tree-based you mean the ability to define this directory and
everything under it gets X amount of storage, regardless of owner?
If so, I also wish this ability existed, and I've talked with several
administrators of ISPs that sorely need that ability as well.  If it
is a monumental undertaking, maybe some hosting providers who use
FreeBSD and would greatly benefit from such a feature would be willing
to fund it.


--
 Chris Dillon - cdillon(at)wolves.k12.mo.us
 FreeBSD: The fastest and most stable server OS on the planet
 - Available for IA32, IA64, PC98, Alpha, and UltraSPARC architectures
 - x86-64, PowerPC, ARM, MIPS, and S/390 under development
 - http://www.freebsd.org

No trees were harmed in the composition of this message, although some
electrons were mildly inconvenienced.

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: tree-based quotas for UFS/UFS2?

2003-06-30 Thread Ryan Dooley

 By tree-based you mean the ability to define this directory and
 everything under it gets X amount of storage, regardless of owner?
 If so, I also wish this ability existed, and I've talked with several
 administrators of ISPs that sorely need that ability as well.  If it
 is a monumental undertaking, maybe some hosting providers who use
 FreeBSD and would greatly benefit from such a feature would be willing
 to fund it.

Yup... quotas per directory (not per user or group).

I've been thinking I might take on such a project (I just need to devote
some time on the good old calendar ;-)

I wouldn't think this would be that difficult (it's not trivial but I
wouldn't think it is an evil monster :-)

Ryan
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: tree-based quotas for UFS/UFS2?

2003-06-30 Thread Dan Pelleg
Chris Dillon [EMAIL PROTECTED] writes:

 On Thu, 26 Jun 2003, Ryan Dooley wrote:
 
  Has anybody done work on Tree-based quotas for UFS/UFS2?  As an
  administrator I'm finding more and more reasons that such a thing
  would be a good thing.
 

The following is not a real solution, but it will work for some uses. Just
define a vn(4) device of the size you want and mount it on the right
directory. See vnconfig(8) for examples.

-- 

  Dan Pelleg
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: question regarding quotas

2003-06-29 Thread Josh Brooks

Hi Dan,

On Sat, 28 Jun 2003, Dan Nelson wrote:

 Quotas are per-user, not per-directory.  Any files those users create,
 anywhere in that filesystem, will contribute to their quota.  Files
 created by other userids but placed in those directories will count
 against the other user's quota.

 Basically what happens with per-directory quotas is that the users
 learn not to put files in their homedir :)  They end up finding
 someplace that they can write to outside their homedir and put files
 there instead.


Thank you.  Do per-directory quotas exist (in any fashion) in FreeBSD ?  I
am looking for a way to do per-directory, even if it is a hack of some
kind...

thanks.

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: question regarding quotas

2003-06-29 Thread Josh Brooks

Hello.

On 29 Jun 2003, Lowell Gilbert wrote:

 Dan Nelson [EMAIL PROTECTED] writes:


  The only thing I can think of that might work: if you didn't mind a
  whole lot of filesystems, you could create a filesystem per directory
  you wanted to control.  Then the filessytem size itself would be the
  quota.

 I'm not following this suggestion.

 Quotas are per-user, *per-filesystem*, as you said the first time.  So
 it's not necessary to put each user's critical space on a different
 filesystem.  In fact, what quotas do is protect users from each other
 on a given filesystem.


What he is saying is, if I want to control the size of a directory, but
there will be file creations in that directory from more than one user, I
need to do something besides quotas, since quotas only count how much that
user has created, NOT how much is in the directory total.

So my question was, is there a way to control how big a directory can
grow, regardless of who is putting what files in that directory.

So far, his answer was that I could just make each directory its own
filesystem, which would definitiely work, but I wondering if perhaps there
is a more elegant way to do this ?

Again, I am just trying to take an arbitrary directory, say:

/export/data7/homes/jerry

and place a configurable limit on how big that directory can get, without
mounting it as its own filesystem...

thanks.

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: question regarding quotas

2003-06-29 Thread Chuck Swiger
Josh Brooks wrote:
[ ... ]
Again, I am just trying to take an arbitrary directory, say:

/export/data7/homes/jerry

and place a configurable limit on how big that directory can get, without
mounting it as its own filesystem...
FreeBSD doesn't have a filesystem with per-directory quota support.

For a top-level mount point like /export/data7, a per-filesystem quota should do 
just fine, but if that isn't good enough for your needs, okay: so be it.  I 
guess you'll have to find another OS which fits your requirements better.

--
-Chuck
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: question regarding quotas

2003-06-29 Thread Ryan Thompson
Josh Brooks wrote to Lowell Gilbert:

 Again, I am just trying to take an arbitrary directory, say:

 /export/data7/homes/jerry

 and place a configurable limit on how big that directory can get,
 without mounting it as its own filesystem...

FreeBSD doesn't support any filesystems that do this proactively. From
an OS point of view, it doesn't really make sense. However, I can see a
few scenarios where this would be helpful, and it is more than possible
to enforce directory size limits reactively. For example:

#!/bin/sh

if [ $# -ne 1 ]; then
echo usage: $0 pathname 12
exit 2
fi

QUOTA=102400; # Max. usage, kilobytes
SIZE=`du -xd 0 $1 | cut -f 1`
echo Directory size is $SIZE

if [ $SIZE -gt $QUOTA ]; then
echo $1 is over quota;# Take appropriate action, here...
else
echo $1 is OK;
fi

That's an illustrative example; it'll be easy to extend that to loop
over an arbitrary list of users (or all system users). You can then run
it periodically from cron(8) to check disk usage at the interval of your
choosing, and react accordingly.

As others have mentioned, users may find other directories and
filesystems to store files, thereby circumventing your quota check. So,
it's up to you to harden your system to mitigate that. Also, as this is
a reactive approach, your users still have the ability to fill up your
disk, but at least you can react appropriately (and possibly
automatically). Though, I think I've at least answered your question.
:-)

Hope this helps,
- Ryan

-- 
  Ryan Thompson [EMAIL PROTECTED]

  SaskNow Technologies - http://www.sasknow.com
  901-1st Avenue North - Saskatoon, SK - S7K 1Y4

Tel: 306-664-3600   Fax: 306-244-7037   Saskatoon
  Toll-Free: 877-727-5669 (877-SASKNOW) North America


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: question regarding quotas

2003-06-29 Thread Sergey \DoubleF\ Zaharchenko
Josh Brooks wrote:
So my question was, is there a way to control how big a directory can
grow, regardless of who is putting what files in that directory.
So you are going to make a directory N Mbytes large...
Make a file N Mbytes large, vnconfig it, disklabel it, newfs it and 
mount to your directory. You should be solved then.

man vnconfig for details.

HTH,
DoubleF


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: question regarding quotas

2003-06-29 Thread Josh Brooks

Hi,

On Mon, 30 Jun 2003, Sergey DoubleF Zaharchenko wrote:

 Josh Brooks wrote:
  So my question was, is there a way to control how big a directory can
  grow, regardless of who is putting what files in that directory.

 So you are going to make a directory N Mbytes large...
 Make a file N Mbytes large, vnconfig it, disklabel it, newfs it and
 mount to your directory. You should be solved then.

Yes, I am familiar with this way of solving the problem, its just that I
would like to try to avoid having all those partitions mounted (even if
they are just vn-partitions) because then it is very hard to increase or
decrease those quota sizes - you have to dump, dd a bigger file,
re-vnconfig, then restore ... very time consuming.

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: question regarding quotas

2003-06-29 Thread Dan Nelson
In the last episode (Jun 29), Josh Brooks said:
 On Mon, 30 Jun 2003, Sergey DoubleF Zaharchenko wrote:
  So you are going to make a directory N Mbytes large... Make a file
  N Mbytes large, vnconfig it, disklabel it, newfs it and mount to
  your directory. You should be solved then.
 
 Yes, I am familiar with this way of solving the problem, its just
 that I would like to try to avoid having all those partitions mounted
 (even if they are just vn-partitions) because then it is very hard to
 increase or decrease those quota sizes - you have to dump, dd a
 bigger file, re-vnconfig, then restore ... very time consuming.

If you're adventurous, you could use growfs :)

-- 
Dan Nelson
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: question regarding quotas

2003-06-29 Thread Joshua Oreman
On Mon, Jun 30, 2003 at 12:25:45AM -0500 or thereabouts, Dan Nelson wrote:
 In the last episode (Jun 29), Josh Brooks said:
  On Mon, 30 Jun 2003, Sergey DoubleF Zaharchenko wrote:
   So you are going to make a directory N Mbytes large... Make a file
   N Mbytes large, vnconfig it, disklabel it, newfs it and mount to
   your directory. You should be solved then.
  
  Yes, I am familiar with this way of solving the problem, its just
  that I would like to try to avoid having all those partitions mounted
  (even if they are just vn-partitions) because then it is very hard to
  increase or decrease those quota sizes - you have to dump, dd a
  bigger file, re-vnconfig, then restore ... very time consuming.
 
 If you're adventurous, you could use growfs :)

For example, to enlarge the quota by 100 MBytes:
# umount /the/quota/dir
# dd if=/dev/zero bs=1m count=100  /the/vn/file
# growfs /dev/vn?c
Did you make backups? yes
...
# mount /dev/vn?c /the/quota/dir

Alas, no way to shrink it :(

-- Josh

 
 -- 
   Dan Nelson
   [EMAIL PROTECTED]
 ___
 [EMAIL PROTECTED] mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


question regarding quotas

2003-06-28 Thread Josh Brooks

Hello!

I have a group of 5 users that I want to set up quotas for - their home
directories are:

/export/data1/user1
/export/data1/user2
/export/data1/user3
/export/data1/user4
/export/data1/user5

And they will be given free reign to fill up those directories however
they choose.

At the same time, there will be a fair number of automated processes on
the system that place files and directories and logs and other files into
their home directories.  So, as time goes by, not only will the users
themselves fill up their dirs, but other processes on the system will fill
up their dirs.  These files and dirs that are created by these other
processes will be owned by various usernames - bind, www, root - and have
different groups set to them as well.

My question is, will the extra files and dirs that get placed in their
home dir by all these automated processes count towards their quota ?  If
not, is there a way to set up quotas so that _they do_ ?

Basically I just want the quota to calculate how much is in their home dir
and enforce based on that...

comments are be appreciated


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: question regarding quotas

2003-06-28 Thread Dan Nelson
In the last episode (Jun 28), Josh Brooks said:
 I have a group of 5 users that I want to set up quotas for - their home
 directories are:
 
 /export/data1/user1
 /export/data1/user2
 /export/data1/user3
 /export/data1/user4
 /export/data1/user5
 
 And they will be given free reign to fill up those directories
 however they choose.
 
 At the same time, there will be a fair number of automated processes
 on the system that place files and directories and logs and other
 files into their home directories.  So, as time goes by, not only
 will the users themselves fill up their dirs, but other processes on
 the system will fill up their dirs.  These files and dirs that are
 created by these other processes will be owned by various usernames -
 bind, www, root - and have different groups set to them as well.
 
 My question is, will the extra files and dirs that get placed in
 their home dir by all these automated processes count towards their
 quota ?  If not, is there a way to set up quotas so that _they do_ ?

Quotas are per-user, not per-directory.  Any files those users create,
anywhere in that filesystem, will contribute to their quota.  Files
created by other userids but placed in those directories will count
against the other user's quota.

Basically what happens with per-directory quotas is that the users
learn not to put files in their homedir :)  They end up finding
someplace that they can write to outside their homedir and put files
there instead.

-- 
Dan Nelson
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


tree-based quotas for UFS/UFS2?

2003-06-26 Thread Ryan Dooley
Hey,

Has anybody done work on Tree-based quotas for UFS/UFS2?  As an
administrator I'm finding more and more reasons that such a thing would
be a good thing.

Cheers,
Ryan
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Panic on 5.1-RELEASE sparc64 - Quotas

2003-06-10 Thread Steven Haywood
Hi folks
I just upgraded my ultra 5 to 5.1-RELEASE from 5.0-RELEASE-p6
When I rebooted it, the box got into a panic-reboot loop.
There's nothing about the panic in the message log (because it seems to
have been something IO related.

I've pasted the messages from the first boot at the bottom of the
message.
I recreated the problem in single-user mode as follows:
boot -s
fsck -p
mount -u /
mount -a
quotacheck

Quotacheck caused the panic, it flashed past too quickly for me to catch
any details. The system then tried to sync the disks and failed, and
reset.
Disabling quotas in rc.conf allowed the box to boot.

Have I missed something stupid? I enclose my kernel config file as
well...

Thanks!
Steven

Jun 10 10:24:44 natural reboot: rebooted by steven
Jun 10 10:24:45 natural syslogd: exiting on signal 15
Jun 10 10:26:00 natural syslogd: kernel boot file is /boot/kernel/kernel
Jun 10 10:26:00 natural kernel: Copyright (c) 1992-2003 The FreeBSD
Project.
Jun 10 10:26:00 natural kernel: Copyright (c) 1979, 1980, 1983, 1986,
1988, 1989, 1991, 1992, 1993, 1994
Jun 10 10:26:00 natural kernel: The Regents of the University of
California. All rights reserved.
Jun 10 10:26:00 natural kernel: FreeBSD 5.1-RELEASE #0: Tue Jun 10
09:41:16 BST 2003
Jun 10 10:26:00 natural kernel:
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/KEYBAUD
Jun 10 10:26:00 natural kernel: Preloaded elf kernel
/boot/kernel/kernel at 0xc0366000.
Jun 10 10:26:00 natural kernel: Timecounter tick  frequency 33300
Hz
Jun 10 10:26:00 natural kernel: real memory  = 246702080 (235 MB)
Jun 10 10:26:00 natural kernel: avail memory = 233340928 (222 MB)
Jun 10 10:26:00 natural kernel: cpu0: Sun Microsystems UltraSparc-IIi
Processor (333.00 MHz CPU)
Jun 10 10:26:00 natural kernel: nexus0: OpenFirmware Nexus device
Jun 10 10:26:00 natural kernel: pcib0: U2P UPA-PCI bridge on nexus0
Jun 10 10:26:00 natural kernel: pcib0: Sabre, impl 0, version 0, ign
0x7c0, bus A
Jun 10 10:26:00 natural kernel: DVMA map: 0xc000 to 0xc3ff
Jun 10 10:26:00 natural kernel: pci0: PCI bus on pcib0
Jun 10 10:26:00 natural kernel: pcib1: APB PCI-PCI bridge at device
1.0 on pci0
Jun 10 10:26:00 natural kernel: pci1: PCI bus on pcib1
Jun 10 10:26:01 natural kernel: pcib2: APB PCI-PCI bridge at device
1.1 on pci0
Jun 10 10:26:01 natural kernel: pci2: PCI bus on pcib2
Jun 10 10:26:01 natural kernel: ebus0: revision 0x01
Jun 10 10:26:01 natural kernel: ebus0: PCI-EBus2 bridge mem
0xf100-0xf17f,0xf000-0xf0ff at device 1.0 on pci2
Jun 10 10:26:01 natural kernel: ebus0: auxio addr
0x140072f000-0x140072f003,0x140072c000-0x140072c003,0x140072a000-0x140072a003,0x14007
28000-0x1400728003,0x1400726000-0x1400726003 (no driver attached)
Jun 10 10:26:01 natural kernel: ebus0: power addr
0x1400724000-0x1400724003 irq 37 (no driver attached)
Jun 10 10:26:01 natural kernel: ebus0: SUNW,pll addr
0x1400504000-0x1400504002 (no driver attached)
Jun 10 10:26:01 natural kernel: ebus0: se addr
0x140040-0x140040007f irq 43 (no driver attached)
Jun 10 10:26:01 natural kernel: ebus0: su addr
0x14003083f8-0x14003083ff irq 41 (no driver attached)
Jun 10 10:26:01 natural kernel: ebus0: su addr
0x14003062f8-0x14003062ff irq 42 (no driver attached)
Jun 10 10:26:01 natural kernel: ebus0: ecpp addr
0x140070-0x14007f,0x140030015c-0x140030015d,0x14003043bc-0x14003043cb
irq 34 (
no driver attached)
Jun 10 10:26:01 natural kernel: ebus0: fdthree addr
0x140072-0x1400720003,0x1400706000-0x140070600f,0x14003023f0-0x14003023f7
irq 3
9 (no driver attached)
Jun 10 10:26:01 natural kernel: eeprom0: EBus EEPROM/clock addr
0x14-0x141fff on ebus0
Jun 10 10:26:01 natural kernel: eeprom0: model mk48t59
Jun 10 10:26:01 natural kernel: eeprom0: hostid 80b5e4fa
Jun 10 10:26:01 natural kernel: ebus0: flashprom addr
0x10-0x1f (no driver attached)
Jun 10 10:26:01 natural kernel: ebus0: SUNW,CS4231 addr
0x1400722000-0x1400722003,0x1400704000-0x140070400f,0x1400702000-0x140070200f,0
x140020-0x14002000ff irq 36,35 (no driver attached)
Jun 10 10:26:01 natural kernel: hme0: Sun HME 10/100 Ethernet mem
0xe000-0xe0007fff irq 33 at device 1.1 on pci2
Jun 10 10:26:01 natural kernel: hme0: Ethernet address:
08:00:20:b5:e4:fa
Jun 10 10:26:01 natural kernel: miibus0: MII bus on hme0
Jun 10 10:26:01 natural kernel: nsphy0: DP83840 10/100 media interface
on miibus0
Jun 10 10:26:01 natural kernel: nsphy0:  10baseT, 10baseT-FDX,
100baseTX, 100baseTX-FDX, auto
Jun 10 10:26:01 natural kernel: pci2: display, VGA at device 2.0 (no
driver attached)
Jun 10 10:26:01 natural kernel: atapci0: CMD 646 WDMA2 controller port
0xc00020-0xc0002f,0xc00018-0xc0001b,0xc00010-0xc00017,0xc8-0
xcb,0xc0-0xc7 irq 32 at device 3.0 on pci2
Jun 10 10:26:01 natural kernel: ata2: at 0xc0 on atapci0
Jun 10 10:26:01 natural kernel: ata3: at 0xc00010 on atapci0
Jun 10 10:26:01 natural kernel: Timecounters tick every 10.000 msec
Jun 10 10:26:01 natural kernel: ad0: 8693MB ST39140A [17662/16/63

  1   2   >