Disk quotas out of sync
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]"
MySQL Disk Quotas per User/Group
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]"
Re: disk quotas and nfs
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: disk quotas and nfs
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]"
disk quotas and nfs
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
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: Disk quotas
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
Disk quotas
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: Per directory disk quotas ...
On Mon, Sep 30, 2002 at 10:12:37AM -0300, Marc G. Fournier wrote: > On Mon, 30 Sep 2002, Matthew Seaman wrote: > > > disks of the right size, which you can then put a filesystem onto and > > mount in the correct place. I've seen reports that this technique > > works very well to limit the amount of space a jail(8) can use even if > > the jail's owner has full control over the password file in it. > > Neat, never thought of that ... only issue I could see with using > something like that is that there appears to be no way of 'growing' the > file system if required ... but still, a route to look at ... I believe that disklabel(8) and growfs(8) work just as well on vnode devices as on regular drives. And that unlike a regular drive, it's pretty simple to dd(1) some extra space onto the end of the file... In fact, let me try that: I've created a 128Mb vn device on /dev/vn0a, put a file system on it, mounted it and copied in a bunch of log files: happy-idiot-talk:/mnt/vn0mnt:# df -kh /mnt/vn0mnt Filesystem Size Used Avail Capacity Mounted on /dev/vn0a124M 136K 114M 0%/mnt/vn0mnt happy-idiot-talk:/mnt/vn0mnt:# disklabel -r /dev/vn0 # /dev/vn0: type: unknown disk: amnesiac label: flags: bytes/sector: 512 sectors/track: 32 tracks/cylinder: 64 sectors/cylinder: 2048 cylinders: 128 sectors/unit: 262144 rpm: 3600 interleave: 1 trackskew: 0 cylinderskew: 0 headswitch: 0 # milliseconds track-to-track seek: 0 # milliseconds drivedata: 0 8 partitions: #size offsetfstype [fsize bsize bps/cpg] a: 26214404.2BSD 1024 819222 # (Cyl.0 - 127) c: 2621440unused0 0 # (Cyl.0 - 127) happy-idiot-talk:/mnt/vn0mnt:# ls -l total 135 -rw-r--r-- 1 root wheel 54681 Sep 30 15:05 messages -rw-r--r-- 1 root wheel 15743 Sep 30 15:05 messages.0.gz -rw-r--r-- 1 root wheel 11631 Sep 30 15:05 messages.1.gz -rw-r--r-- 1 root wheel 11253 Sep 30 15:05 messages.2.gz -rw-r--r-- 1 root wheel 11804 Sep 30 15:05 messages.3.gz -rw-r--r-- 1 root wheel 14268 Sep 30 15:05 messages.4.gz -rw-r--r-- 1 root wheel 15577 Sep 30 15:05 messages.5.gz The aim is to expand that to 256Mb without trashing the contents... happy-idiot-talk:/:# umount /mnt/vn0mnt happy-idiot-talk:/:# vnconfig -u vn0 happy-idiot-talk:/:# dd if=/dev/zero bs=1m count=128 >> /home/vnodes/vn0backingstore 128+0 records in 128+0 records out 134217728 bytes transferred in 6.030322 secs (22257141 bytes/sec) happy-idiot-talk:/:# vnconfig -s labels -c vn0 /home/vnodes/vn0backingstore happy-idiot-talk:/:# disklabel -r -w vn0 auto happy-idiot-talk:/:# disklabel -e vn0 [ add in 'a' partition data ] happy-idiot-talk:/:# disklabel -r vn0 # /dev/vn0c: type: unknown disk: amnesiac label: flags: bytes/sector: 512 sectors/track: 32 tracks/cylinder: 64 sectors/cylinder: 2048 cylinders: 256 sectors/unit: 524288 rpm: 3600 interleave: 1 trackskew: 0 cylinderskew: 0 headswitch: 0 # milliseconds track-to-track seek: 0 # milliseconds drivedata: 0 8 partitions: #size offsetfstype [fsize bsize bps/cpg] a: 52428804.2BSD 1024 819222 # (Cyl.0 - 255) c: 5242880unused0 0 # (Cyl.0 - 255) happy-idiot-talk:/:# growfs -y -s 524288 /dev/vn0a new filesystemsize is: 262144 frags growfs: 524288 sectors in 128 cylinders of 1 tracks, 4096 sectors 256.0MB in 6 cyl groups (22 c/g, 44.00MB/g, 10624 i/g) super-block backups (for fsck -b #) at: 270368, 360480, 450592 happy-idiot-talk:/:# fsck /dev/vn0a ** /dev/vn0a ** Last Mounted on /mnt/vn0mnt ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 8 files, 136 used, 253927 free (7 frags, 31740 blocks, 0.0% fragmentation) happy-idiot-talk:/:# mount -t ufs /dev/vn0a /mnt/vn0mnt happy-idiot-talk:/:# cd /mnt/vn0mnt happy-idiot-talk:/mnt/vn0mnt:# df -kh . Filesystem Size Used Avail Capacity Mounted on /dev/vn0a248M 136K 228M 0%/mnt/vn0mnt happy-idiot-talk:/mnt/vn0mnt:# ls -la total 137 drwxr-xr-x 2 root wheel512 Sep 30 15:05 ./ drwxr-xr-x 3 root wheel512 Sep 30 15:00 ../ -rw-r--r-- 1 root wheel 54681 Sep 30 15:05 messages -rw-r--r-- 1 root wheel 15743 Sep 30 15:05 messages.0.gz -rw-r--r-- 1 root wheel 11631 Sep 30 15:05 messages.1.gz -rw-r--r-- 1 root wheel 11253 Sep 30 15:05 messages.2.gz -rw-r--r-- 1 root wheel 11804 Sep 30 15:05 messages.3.gz -rw-r--r-- 1 root wheel 1426
Re: Per directory disk quotas ...
On Mon, 30 Sep 2002, Matthew Seaman wrote: > disks of the right size, which you can then put a filesystem onto and > mount in the correct place. I've seen reports that this technique > works very well to limit the amount of space a jail(8) can use even if > the jail's owner has full control over the password file in it. Neat, never thought of that ... only issue I could see with using something like that is that there appears to be no way of 'growing' the file system if required ... but still, a route to look at ... Thanks ... To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: Per directory disk quotas ...
On Mon, Sep 30, 2002 at 07:18:29AM +0300, Giorgos Keramidas wrote: > - Original Message - > From: "Marc G. Fournier" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, September 30, 2002 5:25 AM > Subject: Per directory disk quotas ... > > > : does anyone know of some way of setting a disk quota > : onto a directory? so that a directory, and all > : sub-directories/files below it cannot consume more > : then x amount of space? > > Setting permissions that alloww only a certain group of users > to write things in that directory, and then using edquota to > limit the quota of that group under the directory. Let's say, > for example, that you want to limit /mnt/foobar to 100 kbytes. > Let's also assume that /mnt/foobar is under an /mnt mountpoint. > > Create a new group called "foobar". The name of the group > doesn't need be the same. It might helps remembering what > this group was created for later on though. > > # groupadd foobar > > Make root:foobar the owner of /mnt/foobar. > > # chown -R root:foobar /mnt/foobar > > Add write permission to /mnt/foobar for the group: > > # chmod 0775 /mnt/foobar > > Edit the "group quota" of foobar: > > # edquota -g foobar -f /mnt > > Done. Don't let "*:foobar" have write access anywhere else > under /mnt and you're set to go. The users that belong to > the "foobar" group will be limited under /mnt/foobar. Quotas would work, but requires some administrative oversight by the admin over the users to make sure that files with the group ownership don't get created outside the specific tree or that files belonging to other groups don't appear inside the tree. An alternative approach would be to use vnconfig(8) to create pseudo disks of the right size, which you can then put a filesystem onto and mount in the correct place. I've seen reports that this technique works very well to limit the amount of space a jail(8) can use even if the jail's owner has full control over the password file in it. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Re: Per directory disk quotas ...
- Original Message - From: "Marc G. Fournier" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, September 30, 2002 5:25 AM Subject: Per directory disk quotas ... : does anyone know of some way of setting a disk quota : onto a directory? so that a directory, and all : sub-directories/files below it cannot consume more : then x amount of space? Setting permissions that alloww only a certain group of users to write things in that directory, and then using edquota to limit the quota of that group under the directory. Let's say, for example, that you want to limit /mnt/foobar to 100 kbytes. Let's also assume that /mnt/foobar is under an /mnt mountpoint. Create a new group called "foobar". The name of the group doesn't need be the same. It might helps remembering what this group was created for later on though. # groupadd foobar Make root:foobar the owner of /mnt/foobar. # chown -R root:foobar /mnt/foobar Add write permission to /mnt/foobar for the group: # chmod 0775 /mnt/foobar Edit the "group quota" of foobar: # edquota -g foobar -f /mnt Done. Don't let "*:foobar" have write access anywhere else under /mnt and you're set to go. The users that belong to the "foobar" group will be limited under /mnt/foobar. If I've forgotten something, I'm sure someone can help? Giorgos. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message
Per directory disk quotas ...
does anyone know of some way of setting a disk quota onto a directory? so that a directory, and all sub-directories/files below it cannot consume more then x amount of space? thanks ... To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message