PDA

View Full Version : Quota setup in Perfect Debian Sarge


chris_87
26th December 2005, 20:40
Hi,

Another error I faced today, when I try to setup the quota, I've got a message
quotacheck: Scanning /dev/hda1 [/] Cannot get exact used space... Results might be inaccurate.
done
quotacheck: Checked 1211 directories and 13578 files

when I perform quotacheck -avugm.

Any Ideas?

Thanks

falko
27th December 2005, 15:23
That's just a warning. If quotaon -avug says that quota is turned on then everything is fine.

chris_87
27th December 2005, 17:44
No luck still.:confused:
quotaon -avug
quotaon: Cannot find quota file on / [/dev/hda1] to turn quotas on/off.
quotaon: Cannot find quota file on / [/dev/hda1] to turn quotas on/off.

till
27th December 2005, 17:56
Please post the output of:

ls -la /

falko
27th December 2005, 18:50
No luck still.:confused:
quotaon -avug
quotaon: Cannot find quota file on / [/dev/hda1] to turn quotas on/off.
quotaon: Cannot find quota file on / [/dev/hda1] to turn quotas on/off.
Did you do this:
touch /quota.user /quota.group
chmod 600 /quota.*
mount -o remount /
quotacheck -avugm
quotaon -avug as described on http://www.howtoforge.com/perfect_setup_debian_sarge_p3?

chris_87
27th December 2005, 23:48
yes...I do the exactly..
just copy and paste

till
28th December 2005, 12:49
Chris, can you please post the output of:

ls -la /

chris_87
28th December 2005, 14:57
Chris, can you please post the output of:

ls -la /

total 38565
drwxr-xr-x 21 root root 4096 Dec 27 15:43 .
drwxr-xr-x 21 root root 4096 Dec 27 15:43 ..
drwxr-xr-x 2 root root 4096 Dec 28 02:37 bin
drwxr-xr-x 2 root root 4096 Apr 25 2004 boot
drwxr-xr-x 2 root root 4096 Apr 25 2004 cdrom
-rw-r----- 1 root root 39301055 Dec 26 17:19 debian_2005_04_09_dist.tgz
drwxr-xr-x 4 root root 20480 Dec 27 17:58 dev
drwxr-xr-x 64 root root 4096 Dec 28 02:55 etc
drwxr-xr-x 2 root root 4096 Apr 25 2004 floppy
drwxrwsr-x 8 root staff 4096 Dec 27 00:21 home
drwxr-xr-x 16 root root 1024 Oct 14 2004 initrd
drwxr-xr-x 5 root root 4096 Dec 26 18:36 lib
drwxr-xr-x 2 root root 4096 May 2 2004 lost+found
drwxr-xr-x 2 root root 4096 May 2 2004 mnt
drwxr-xr-x 2 root root 4096 Apr 25 2004 opt
dr-xr-xr-x 87 root root 0 Dec 27 17:58 proc
-rw------- 1 root root 2097120 Dec 27 15:43 quota.group
-rw------- 1 root root 2097120 Dec 27 15:43 quota.user
drwxr-xr-x 2 root root 4096 Dec 26 19:12 root
drwxr-xr-x 2 root root 4096 Dec 26 18:36 sbin
drwxr-xr-x 2 root root 4096 May 10 2005 sys
drwxrwxrwt 4 root root 4096 Dec 28 12:47 tmp
drwxr-xr-x 13 root root 4096 Dec 26 21:20 usr
drwxr-xr-x 14 root root 4096 Dec 26 18:03 var

Any Idea?

falko
28th December 2005, 18:55
Please try this:
rm -f /quota.user
rm -f /quota.group
touch /aquota.user /aquota.group
chmod 600 /aquota.*
mount -o remount /
quotacheck -avugm
quotaon -avug

chris_87
29th December 2005, 03:18
Please try this:
rm -f /quota.user
rm -f /quota.group
touch /aquota.user /aquota.group
chmod 600 /aquota.*
mount -o remount /
quotacheck -avugm
quotaon -avug

[CODE]

Still no luck..
vchow:~# rm -f /quota.user
vchow:~# rm -f /quota.group
vchow:~# touch /aquota.user /aquota.group
vchow:~# chmod 600 /aquota.*
vchow:~# mount -o remount /
vchow:~# quotacheck -avugm
quotacheck: WARNING - Quotafile //aquota.user was probably truncated. Can't sav e quota settings...
quotacheck: WARNING - Quotafile //aquota.group was probably truncated. Can't sa ve quota settings...
quotacheck: Scanning /dev/hda1 [/] Cannot get exact used space... Results might be inaccurate.
done
quotacheck: Checked 5456 directories and 32248 files
vchow:~# quotaon -avug
quotaon: Cannot find quota file on / [/dev/hda1] to turn quotas on/off.
quotaon: Cannot find quota file on / [/dev/hda1] to turn quotas on/off.


drwxr-xr-x 21 root root 4096 Dec 29 01:17 .
drwxr-xr-x 21 root root 4096 Dec 29 01:17 ..
-rw------- 1 root root 11264 Dec 29 01:13 aquota.group
-rw------- 1 root root 10240 Dec 29 01:13 aquota.user
drwxr-xr-x 2 root root 4096 Dec 28 02:37 bin
drwxr-xr-x 2 root root 4096 Apr 25 2004 boot
drwxr-xr-x 2 root root 4096 Apr 25 2004 cdrom
drwxr-xr-x 4 root root 20480 Dec 29 00:48 dev
drwxr-xr-x 64 root root 4096 Dec 29 01:12 etc
drwxr-xr-x 2 root root 4096 Apr 25 2004 floppy
drwxrwsr-x 8 root staff 4096 Dec 27 00:21 home
drwxr-xr-x 16 root root 1024 Oct 14 2004 initrd
drwxr-xr-x 5 root root 4096 Dec 26 18:36 lib
drwxr-xr-x 2 root root 4096 May 2 2004 lost+found
drwxr-xr-x 2 root root 4096 May 2 2004 mnt
drwxr-xr-x 2 root root 4096 Apr 25 2004 opt
dr-xr-xr-x 86 root root 0 Dec 29 00:42 proc
drwxr-xr-x 2 root root 4096 Dec 26 19:12 root
drwxr-xr-x 2 root root 4096 Dec 26 18:36 sbin
drwxr-xr-x 2 root root 4096 May 10 2005 sys
drwxrwxrwt 4 root root 4096 Dec 29 00:48 tmp
drwxr-xr-x 13 root root 4096 Dec 26 21:20 usr
drwxr-xr-x 14 root root 4096 Dec 26 18:03 var


Can anyone help me:confused:

till
29th December 2005, 10:42
Did you execute the above steps as root user?

chris_87
29th December 2005, 21:08
yes, I do..all execute under root access

falko
30th December 2005, 00:07
Can you post your /etc/fstab here?

chris_87
31st December 2005, 22:12
Here you go

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/hda1 / ext3 defaults,errors=remount-ro,usrquota,grpquota 0 1
proc /proc proc defaults 0 0
none /dev/pts devpts gid=5,mode=20 0 0
/dev/hda2 swap swap defaults 0 0
/dev/hda3 /mnt ext3 defaults,noatime 0 0
~

falko
1st January 2006, 14:51
/dev/hda1 / ext3 defaults,errors=remount-ro,usrquota,grpquota 0 1

Maybe this happens because of the "remount-read-only" option in your /etc/fstab...
Have you also tried to reboot the whole system instead of remounting the partition?

mccharlet
27th February 2007, 22:15
Hi,

I have the same problem.

# quotacheck -avugm
quotacheck: WARNING - Quotafile //quota.user was probably truncated. Can't save quota settings...
quotacheck: WARNING - Quotafile //quota.group was probably truncated. Can't save quota settings...
quotacheck: Scanning /dev/hda2 [/] quotacheck: error (6) while opening /dev/hda2
# quotaon -avug
quotaon: Cannot find quota file on / [/dev/hda2] to turn quotas on/off.
quotaon: Cannot find quota file on / [/dev/hda2] to turn quotas on/off.


Are you find a solution

Tanks
CÚdric

falko
28th February 2007, 20:15
Which distribution do you use?

mccharlet
1st March 2007, 10:17
Hi

I have a virtual server with debian 3.1 kernel 2.6

falko
2nd March 2007, 13:59
What's in /etc/fstab, and what's the output of fdisk -l?

mccharlet
2nd March 2007, 14:48
File fstab

# /etc/fstab: static file system information.
#
#<file sys> <mount point> <type> <options> <dump> <pass>
/dev/hda2 / ext3 defaults,errors=remount-ro,usrquota,grpquota 0 1
/swapfile none swap rw 0 0
none /proc proc defaults 0 0

fdisk -l nothing display :confused:

falko
3rd March 2007, 16:32
fdisk -l nothing display :confused:
I guess the problem is then that it's a virtual server...

mccharlet
4th March 2007, 16:00
Yes it's a virtual server
uname 2.6.12.6-xenU