Ошибка disk quota exceeded

Disk Quota Exceeded is a common error in Linux web hosting servers. Website owners see this error when they try to upload a file, send a mail or update a database.

Every month, our engineers resolve hundreds of “Disk Quota Exceeded” errors in our role as website support for web hosting companies. We’ve seen these 2 causes for the error:

  1. Users exceeding their mail or web space quota
  2. Corrupted disk quota table
  3. File limit (inode) exhaustion

Today, we’ll take a look at how to troubleshoot, fix and prevent quota exceeded errors.

Fixing mail/web space overage

About 80% of disk quota exceeded errors occur due to users uploading files beyond their subscription limit.

In many cases, we’ve found large files (such as backup, videos, DB dumps, etc.) in the user’s home directory itself. But there are other locations that are not so obvious:

  1. Trash or Spam mail folders
  2. Catch-all mail accounts
  3. Web app log files (eg. WordPress error log)
  4. Old log files (eg. access_log.bak)
  5. Old uncompressed backups (from a previous site restore for eg.)
  6. Un-used web applications

It’s not easy to find these space files if you look at a web panel report. That is why we use Linux command line tools (such as du) to list all directories in a user’s account, and sort them as per size.

Once we’ve found the top directories, we drill down until we locate all non-essential files.

disk space listing - disk quota exceeded

[ Never let disk quota errors affect your website functioning. Get our professional help to fix your website errors at affordable pricing. ]

Special case – User’s files located outside home directory

In self-managed VPS servers, we’ve found user files stored outside the user’s home directory. This could be from past troubleshooting steps, incomplete site restore, etc.

We’ve found such files in /usr, /var, / or in some cases even in /root directory.

We resolve this issue by searching the whole file system with the username, deleting them, and then updating the quota table.

Pro Tip : All this detective work takes time. Business mails coming in during this period will bounce. So, if you’re a shared web host, increase the quota by 100 MB temporarily so that services to the user is immediately restored.

Fixing cPanel disk quota cache error

In cPanel servers, even after a disk quota exceeded error is resolved, the web panel shows the old disk space info. That is, even if a 1 GB file is deleted, the space usage doesn’t show any difference.

It is caused by a cPanel feature called “disk quota cache”. cPanel stores disk usage info for 15-30 mins, to reduce disk access, and thereby keep down server load.

To fix this, our tech support team uses two approaches:

  1. In powerful servers, we disable this cache (choose off), as server load isn’t affected.
  2. In heavily loaded or less powerful servers, we educate the users via custom tool tips in the panel that the correct value will be reflected in 15 mins.

Disable disk cache in cPanel - disk quota exceeded

How to prevent space overage

Disk space overage results in customers losing their business mails, or websites being down. We’ve been able to reduce the incidence of such downtime in web hosting companies by sending “Disk Quota Warning” emails with specific steps on what to check, and how to delete excess files.

How to fix incorrect quota table

Linux servers store quota information in files such as aquota.user, aquota.group, .quota.user, etc.

In some situations, such as a server crash or hard disk errors, these files could get corrupted, leading to many users getting quota related errors.

When we see a sudden surge in mail or web quota errors for many users at once, we immediately check the quota table. In general, we follow these steps:

  1. Disable quota for the affected partition (usually /home in web hosting servers)
  2. Stop services such as mail, web and FTP that can write new files
  3. Recreate the quota table using the “quotacheck” command (or fixquota in cPanel servers)
  4. Re-enable quota for the affected partition

Pro Tip : A damaged quota table indicates a more serious underlying problem such as a failing hard disk. When such situations, we scan the server for health or security issues. In many cases, we’ve prevented major downtimes by finding and correcting serious server errors.

[ Are you stuck due to no disk space? Get assistance from our server experts to fix your website issues permanently. ]

Resolving file limit (inode) exhaustion

Our engineers provide tech support for several VPS hosting providers. In these companies, the majority of disk quota exceeded errors caused by VPSs hitting file number limit.

Linux servers use something called inodes to keep track of each file. The trouble is, each server (or VPS) has only a limited number of inodes. So, when all inodes are used up by a malicious activity (eg. a spam attack), new files cannot be created.

Here are a few common causes for iNode exhaustion:

  1. Thousands of un-delivered spam mails filling up the mail queue.
  2. Several versions of un-compressed backups
  3. Catch-all mail boxes that accumulated years worth of mails
  4. Old cache files of some programs such as “eAccelerator”
  5. PHP session files that are not automatically deleted

Since VPS users have administrator (root) access, these files could be anywhere. So, we use a top-down scan to find out which folders have the max number of files.

For eg. If /home partition is 100% full, we’d start the scan at /home – like this:

inode usage listing - disk quota exceeded

Then the scan is repeated on the top directory, and the process repeated until we find and delete the junk files.

Pro Tip : At 100% inode usage, all services would be virtually stuck. So, as soon as you login, move a few non-critical folders (like old log files) to another partition to immediately restore services. This will prevent mails bouncing, site errors, etc.

Are you having recurrent issues in your hosting servers? Looking for an expert intervention to stabilize your servers? Click here to know how we can help you make things better.

var google_conversion_label = «Blp0CLCojHIQ0aD71QM»;

Im already update my project and I have error when I pull a new update project on git.
this eror on this image.
i need solution.
thanks before

meun5's user avatar

meun5

3224 silver badges15 bronze badges

asked Mar 9, 2017 at 17:26

dwiky aliansyah's user avatar

2

1 Answer

Your user isn’t allowed to write any more files to this disk. Free up some disk space by deleting some files and try again. Or talk to your sysadmin about increasing your quota.

answered Mar 9, 2017 at 17:28

Asaph's user avatar

AsaphAsaph

158k25 gold badges193 silver badges198 bronze badges

0

The quota is the amount of space used to keep the files/data with a limit where the error “Disk Quota Exceeded” pops up. This error prevents the users from adding new files. The system administrator requires this to check on the users exceeding the allocated disk space, which helps save the disk space. When the users exceed the quota, the system prevents them from saving the data.

This guide will explain why this error comes up and what are the fixes of it.

  • What is the Reason for the Error Disk Quota Exceeded” on Linux?
  • Solution 1: Vacate Disk Space
    • Remove Unnecessary Files
    • Clear Temporary Files
  • Solution 2: Increase Quota Limit

What is the Reason for the Error “Disk Quota Exceeded” on Linux?

The error “disk quota exceeded” comes up when the user exceeds the allocated disk space. Beyond this point, no writing operations can be done on the disk. This may also result in data loss.

Solution 1: Vacate Some Disk Space on Linux 

Here are a few steps to vacate disk space on a Linux system:

Step 1: View Total Space Used by the File Systems

There are multiple reasons for the error “Quota Exceeded.” The same is valid with solutions, but first, execute this command to know which file system is running out of space:

The output in the above image displays the list of disks and their details, such as file system used and free space, etc.

Step 2: Clear Disk Space on Linux

To keep unnecessary files on the disk takes up space that can be used for several other purposes, and keeping a check on them is highly recommended. For that, identify the files that are not required and occupy the disk using this command:

All the files within the current directory (use the cd command to navigate between the directories). The large files can be identified and deleted (1.deb in this case) using the “rm” command:

The same procedure is followed for all the files you can delete (learn about Linux permissions here).

Step 3: Clear Temporary Files on Linux

The temporary files on Linux are created by programs to access the data quickly the next time they are used. Although they are present briefly, they can still occupy the space. Clear them using this command:

Removing the temporary files can clear a lot of space on the system, giving you some extra disk space.

Solution 2: Increase Quota Limit on Linux

If the server has more disk space, then more quota can be requested. It is helpful in cases where you do not want to delete the files on the system.

Syntax:

The system administrator can increase the quota limit using this command:

$ sudo edquota -u <User-Name>

Let’s add more quota for the user “tom”:

In the above image, two things are worth noting.

  • Soft is the limit reaching where the user is warned that the quota’s limit is reaching the end.
  • Hard is the limit beyond which nothing will be saved on the disk, where the quota is assigned to the users (in bytes). There is no limit to the disk quota, and it is based entirely on the user’s requirements.

The hard part is when the system administrator sets the quota, which is the limit for the user “tom” to use. While soft is a warning sent to the user telling them that the limit is ending.

Conclusion

Quota exceeded is one of the common issues because of the large space that software uses and lots of unnecessary files on the system. Exceeding the specified quota often results in data loss, as when the error “Disk Quota Exceeded” comes up, no write operations can be done on the disk. To eliminate this, clear the space on your system. Also, you can request the system administrator for more quota. This guide has presented the reasons, and the solutions to the error and disk quota exceeded in Linux.

Перейти к содержимому

Информационный портал Дмитрия Чемпалова


  • Дата записи



    13.04.2015


  • Категории



    В WordPress, Может пригодиться, Устраняем ошибки wordpress

Очень часто вебмастера сталкиваются с различными проблемами, порой они возникают из-за ограничений на хостинге.

Описание ошибки:

При загрузке файлов через хостинг панель может появиться ошибка System error 122: Disk quota exceeded.

er1

Решение:
Данная проблема означает, что у вас закончилось место на хостинге под новые файлы, то есть нужно либо сменить тариф, либо купить дополнительное пространство под файлы.

Generally, it looks like you exceeded your allotted disk limit or your overall disk space is full as the error message is very obvious (Disk Quota Exceeded) meaning you reached the limit of your disk quota assigned to you.. Due to which various services like MySQL database and web server can’t start as they need to create files for their proper functioning. We at CyberHosting use CyberPanel control panel, if you are using CyberPanel you can easily see disk space usage on your dashboard after your login.

We recommend CyberPanel for self-managed VPS as well, because it helps you to manage most of the things within a few minutes, otherwise, you could be spending lots of time doing the same thing. You can start using CyberPanel for free with just one install command, for more details visit the installation page.


Why do you see Disk Quota Exceeded error?

If you are a website owner and running a managed or self-managed VPS. There are 99% chances that you must have configured some sorts of backups and logging as well (logs generated by different applications, to debug any issue in case something funny happens later). So there is some example of files that could be using extensive disk space and you don’t know about them:

  • Large old backup files residing on the server that you have not deleted.
  • Large log files from a web server or any other applications that you have not deleted after they are rotated by the application.
  • Some un-used applications or staging setups that you did during development.
  • Spam or deleted mail folders still containing a large number of emails that you don’t know off.

All these files could occupy a large amount of space ending up causing disk quota exceeded error.


Lets first find out large directories and files

We will first try to find out large files and directories in your server, you can then decide if those files are safe to be deleted, ending up giving you more space.

cd /home

du -hs * | sort -rh | head -20

These commands will print out large files and directories under /home directory of your server. You can then figure out what directories can possibly contain files that are not needed. Similarly you can run this command under various directories such as /var/log

Make sure you don’t something which is important, and if you don’t know what you are doing, then it is better you let our experts do the work by hiring our managed vps or monthly support package we offer 3 days free trial (no credit card required).

If using CyberPanel

As mentioned above we recommend CyberPanel for managing your day to day server tasks, so if you have already decided to use CyberPanel. Look for the following directories as they must be containing large backup files that you won’t need.

/home/domain.com/backup

/home/backup

/usr/local/lsws/logs


Exceeded number of inodes (file entries) supported by your choosen file system

There is a possibility that you still have enough disk space left, but you reached inodes limit end up giving disk quota exceeded. First, make sure you that you have enough space left.

Filesystem Size Used Avail Use% Mounted on
/dev/vda1 25G 6.9G 19G 28% /

You can see that disk space is only 28% used. Now check if you reached inodes limit.

df -i

Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/vzfs 2000000 2000000 0 100% /

Now this means you have reached 100% of your inode usage. It is time that you delete smaller files that are no use to your applications. For example, find a large number of small files under /var

find /var -type d -size +256k

Similarly you can find small files under /home as well, and delete files to resolve disk quota exceeded error. Some type of files that you can easily delete are:

  1. Cache files generated by servers (LiteSpeed Server use disk for cache). Incase of the LiteSpeed cache folder is created under the home of each user.
  2. Sessions files generated under /tmp and not being deleted.
  3. Catch-all email inbox may have 1000s of emails you don’t need to keep, so they can be easily discarded.

Easy way to clear some space if you are using CyberPanel

As advised by us, if you are now using CyberPanel, there are some easy way to free up disk space safely.

Remove OpenLiteSpeed Cache folder

rm -rf /usr/local/lsws/cachedata

Remove Cache folders when using LiteSpeed Enterprise

rm -rf /home/domain.com/lscache

You can do this for every domain. (By replacing domain.com with your domain)

Delete Backups

rm -rf /home/domain.com/backup/*.tar.gz

You can do this for every domain. (By replacing domain.com with your domain)

You can also do

rm -rf /home/backup/*

Remove old CyberPanel versions

rm -rf /usr/local/*.tar.gz


Conclusion

We’ve discussed many reasons and their fixes related to disk quota exceeded error. If you are still stuck at some point and don’t have much time or expertise to fix this issue, you can contact us to get help.

Sometimes it may just be a limitation imposed by any control panel you are using, and you could be losing important business emails due to this. So while you are fixing and debugging the cause, it is better to increase disk limit size for your accounts or mailboxes, so that you won’t lose important stuff.

Понравилась статья? Поделить с друзьями:
  • Ошибка disk boot failure при включении
  • Ошибка disk boot failure insert system disk
  • Ошибка disk 157
  • Ошибка discordsetup exe
  • Ошибка discord rpc dll