Comments on How To Set Up Journaled Quota On Debian Lenny

How To Set Up Journaled Quota On Debian Lenny This tutorial shows how you can set up journaled quota on a Debian Lenny system. With journaled quota, you don't need to run quotacheck after an unclean shutdown. Journaled quota works on ext3 and ext4 file systems.

12 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: AndrewW

Thanks Falko.

I found that to remount successfully I had to remove the old quota.user and quota.group files.

By: mountain

Hi,

I installed and configured quota and 'quota' shows me the correct settings.

~# quota
Disk quotas for user root (uid 0):
     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
      /dev/sda1 2716812  8388608 10485760           87935       0       0

My soft limit is 8GB and hard limit is 10 GB. However, I do not see the 'out of disk space' error when the hard limit is exceeded.

When I attempt to create a file of size ~12GB using the 'dd' command, I only see a warning :

 :~# dd if=/dev/zero of=12gb-file bs=1024 count=12582912
: warning, user block quota exceeded.
12582912+0 records in
12582912+0 records out
12884901888 bytes transferred in 280.974633 seconds (45857883 bytes/sec)

The 12GB file gets written - Shouldn't I be getting the disk space error here?

 Thanks for any help on this.

By:

Try to set quota for ordinary user, not root. Root user has some additional blocks reserved for correct operation (5% by default). See "man mkfs.ext3" for details about this reservation.

By: mountain

Hi,

I installed and configured quota and 'quota' shows me the correct settings.

~# quota
Disk quotas for user root (uid 0):
     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
      /dev/sda1 2716812  8388608 10485760           87935       0       0

My soft limit is 8GB and hard limit is 10 GB. However, I do not see the 'out of disk space' error when the hard limit is exceeded.

When I attempt to create a file of size ~12GB using the 'dd' command, I only see a warning :

 :~# dd if=/dev/zero of=12gb-file bs=1024 count=12582912
: warning, user block quota exceeded.
12582912+0 records in
12582912+0 records out
12884901888 bytes transferred in 280.974633 seconds (45857883 bytes/sec)

The 12GB file gets written - Shouldn't I be getting the disk space error here?

 Thanks for any help on this.

By:

Hi to everybody.

I'm trying to setup quota service on my debian based local mailserver.

I've installed the package quota and I've followed this how-to to setup it.

After that unfortunately I still have some errors:

server:/# quotacheck -avugm
quotacheck: WARNING -  Quotafile //aquota.user was probably truncated. Cannot save quota settings...
quotacheck: WARNING -  Quotafile //aquota.group was probably truncated. Cannot save quota settings...
quotacheck: Scanning /dev/hdc2 [/] quotacheck: error (2133571361) while starting inode scan
 

Am I wrong in something?

Thanks

Michele

By: lsw

This looks like you didn't follow the instructions correct...

You don't need the / before the filename in /etc/fstab

By: RaSca

Thanks Falco, i noted also that if you want to remount the filesystem and you have a previously enabled quota then you had to turn it off before doing everything else:

$ mount -o remount /
mount: / not mounted already, or bad option
$ quotaoff /
$ mount -o remount /

in this way everything works greatly.

Thanks again for your good work!

By: James

Hi, very useful tip. Do you know if this option exists on CentOS or RedHat Linux ?

 Regards

 

By:

First thank you for this tutorial I'm sure once I figure out my problem all will be well again.

Second I waited to post this as I scowered the howtoforge site for help to no avail as well as other resources again to no avail. I have the same error even after following this tutorial.

quotacheck: WARNING - Quotafile //aquota.user was probably truncated. Cannot save quota settings...
quotacheck: WARNING - Quotafile //aquota.group was probably truncated. Cannot save quota settings...

I am now at the point where I rebooted my server to remount it as per one suggestion and the server stops during boot with lots of errors like: cannot do this or that because of a read only file system.

When I try to do anything with quota after this reboot I get read only errors. like if I try to edit fstab for instance. So what i did was to reinstall the server now it's my third time and I keep running into the same problem. I have followed this tutorial using the cut and paste method so I know it's all good but somthing is not right :(

I followed this tutorial: https://www.howtoforge.com/perfect-server-debian-lenny-ispconfig3-p3 up until I got to the edit the fstab and install quota then I followed this tutorial: https://www.howtoforge.com/how-to-set-up-journaled-quota-on-debian-lenny

Can anyone help?

By: Ken

Try this:
Enable quotas as described in /etc/fstab
mount /yourfilesystem -o remount
cd /yourfilesystem
quotaoff -augp
quotacheck -augmn
rm aquota.*
quotacheck -augmn
touch aquota.user aquota.group
chmod 600 aquota.*
quotacheck -ugamn
quotaon -avug

By: Josue Villegas

Excuse me Sir, is the same for Ubuntu server 18.04?

Thanks a lot for the post.

By: Taichu

Thanks for your work, u are the best.