KNOWNHOST WIKI

User Tools

Site Tools


general:disk-space-management

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
general:disk-space-management [2017/07/07 10:55]
mscherf revisions for #155
general:disk-space-management [2020/05/13 11:39]
Karson N. [Trash Folders - IMAP]
Line 3: Line 3:
 It is important to make sure that the server does not fully run out of disk space. If it does, the services running in the server will quit working, and some of the database tables could even become corrupted. Here are some things to consider, to help ensure that your server has enough disk space to work correctly. It is important to make sure that the server does not fully run out of disk space. If it does, the services running in the server will quit working, and some of the database tables could even become corrupted. Here are some things to consider, to help ensure that your server has enough disk space to work correctly.
  
 +\\
 ===== Backups ===== ===== Backups =====
  
Line 24: Line 25:
 For more specific recommendations,((for cPanel/WHM servers)) please read more [[control-panels:cpanel-whm:backup-configuration|here]]. For more specific recommendations,((for cPanel/WHM servers)) please read more [[control-panels:cpanel-whm:backup-configuration|here]].
  
 +\\
 ===== Account Quotas ===== ===== Account Quotas =====
  
Line 34: Line 36:
 It is also important to note that (in a cPanel server) files owned by "nobody" will not count against the cPanel user's disk space quota. This is yet another reason to use mod_ruid2 (or, if this is not possible, suphp) so that the site files will be correctly owned by the cPanel user. It is also important to note that (in a cPanel server) files owned by "nobody" will not count against the cPanel user's disk space quota. This is yet another reason to use mod_ruid2 (or, if this is not possible, suphp) so that the site files will be correctly owned by the cPanel user.
  
 +\\
 ===== Monitoring and Troubleshooting ===== ===== Monitoring and Troubleshooting =====
  
Line 59: Line 62:
 If more disk space is being used than expected, it is recommended to check what is using the disk space. Where to check first will depend on how you find out about it. If more disk space is being used than expected, it is recommended to check what is using the disk space. Where to check first will depend on how you find out about it.
  
-If the server has used up enough of its disk space overall that it is causing services (daemons) to be interrupted, you might not be able to use the cPanel((or DirectAdmin or Plesk, as applicable)) interface to investigate. Sometimes even if the panel is not working, you will be able to connect using [[software:how-can-i-use-putty-software-to-ssh-to-my-cpanel-server|ssh]]. If ssh is not working either, you may be able to connect via [[my-knownhost:manage-services:vps-control:java-console|the console]].((if it is a VPS)) If that is not working either, or if you are not comfortable with ssh and/or the console, you can [[my-knownhost:howto-login|open a Support Ticket]] for assistance.+If the server has used up enough of its disk space overall that it is causing services (daemons) to be interrupted, you might not be able to use the cPanel((or DirectAdmin or Plesk, as applicable)) interface to investigate. Sometimes even if the panel is not working, you will be able to connect using [[software:how-can-i-use-putty-software-to-ssh-to-my-cpanel-server|SSH]]. If SSH is not working either, you can [[my-knownhost:howto-login|open a Support Ticket]] for assistance 24x7x365.
  
 +\\
 ==== Troubleshooting via SSH ==== ==== Troubleshooting via SSH ====
  
Line 67: Line 71:
 <WRAP important> If you are not //able// to log into cPanel/WHM,((or DirectAdmin or Plesk, as applicable)) it is **strongly** recommended to open a Support Ticket for assistance, unless you are very comfortable with ssh, enough to attempt to resolve the issue on your own. It is important to be **extremely** careful if attempting to resolve disk space issues yourself, since it is possible to remove wrong files, thereby breaking server functionality. </WRAP> <WRAP important> If you are not //able// to log into cPanel/WHM,((or DirectAdmin or Plesk, as applicable)) it is **strongly** recommended to open a Support Ticket for assistance, unless you are very comfortable with ssh, enough to attempt to resolve the issue on your own. It is important to be **extremely** careful if attempting to resolve disk space issues yourself, since it is possible to remove wrong files, thereby breaking server functionality. </WRAP>
  
-If you are logged into ssh as root,((or if you have gotten a connection via the console)) you can check the server's overall disk space usage with the ''%%df%%'' utility. For example, you can check the disk space usage in the root ''%%/%%'' partition as follows:+If you are logged into ssh as root, you can check the server's overall disk space usage with the ''%%df%%'' utility. For example, you can check the disk space usage in the root ''%%/%%'' partition as follows:
  
 <code> <code>
Line 280: Line 284:
 </code> </code>
  
 +\\
 ==== Troubleshooting via cPanel/WHM ==== ==== Troubleshooting via cPanel/WHM ====
  
Line 290: Line 295:
 If there is an account in particular you would like to investigate, you can click on the "cP" icon of the row in the "cPanel" column, to open the cPanel interface for the account. From there, you can go to the "[[https://documentation.cpanel.net/display/ALD/Disk+Usage|Disk Usage]]" page in the "Files" section, to see a breakdown of approximately how that account is using its disk space. How to proceed from there depends heavily on what category is using most of the disk space. If there is an account in particular you would like to investigate, you can click on the "cP" icon of the row in the "cPanel" column, to open the cPanel interface for the account. From there, you can go to the "[[https://documentation.cpanel.net/display/ALD/Disk+Usage|Disk Usage]]" page in the "Files" section, to see a breakdown of approximately how that account is using its disk space. How to proceed from there depends heavily on what category is using most of the disk space.
  
 +\\
 ==== Temporary Files ==== ==== Temporary Files ====
  
-Usually temporary files will not be the main cause of the server running out of disk space, but if it is so full you need to use the console instead of regular ssh, it is possible that removing files from ''%%/tmp%%'' might, depending on the severity of the issue, clear enough space for ssh to start working. It is very important //**not**// to remove the folder itself, or any socket files or subdirectories that might be present. Before removing the files, check how much space they are taking up:+//Usually// temporary files will not be the main cause of the server running out of disk space. However, it is very important //**not**// to remove the ''%%/tmp/%%'' directory itself, or any socket files or subdirectories that might be present. Before removing the files, check how much space they are taking up:
  
 {{howhard>5}} {{howhard>5}}
Line 306: Line 312:
 </code> </code>
  
 +\\
 ==== Trash Folders - cPanel File Manager ==== ==== Trash Folders - cPanel File Manager ====
  
 cPanel File Manager has a trash folder for each account, so that if something is deleted by accident from the File Manager, it can be brought back relatively easily. But, this trash folder is not automatically emptied. If any of your users make extensive use of the File Manager in cPanel, especially if they do not often use the [[https://documentation.cpanel.net/display/ALD/File+Manager#FileManager-Deleteandrestorefilesandfolders|Empty Trash]] button within File Manager, it is possible that these trash folders can get quite large. cPanel File Manager has a trash folder for each account, so that if something is deleted by accident from the File Manager, it can be brought back relatively easily. But, this trash folder is not automatically emptied. If any of your users make extensive use of the File Manager in cPanel, especially if they do not often use the [[https://documentation.cpanel.net/display/ALD/File+Manager#FileManager-Deleteandrestorefilesandfolders|Empty Trash]] button within File Manager, it is possible that these trash folders can get quite large.
 +
 +\\
  
 === via cPanel === === via cPanel ===
Line 316: Line 325:
 These trash folders can be emptied within cPanel File Manager by clicking the "Empty Trash" button. These trash folders can be emptied within cPanel File Manager by clicking the "Empty Trash" button.
  
-=== via SSH or Console ===+\\ 
 + 
 +=== via SSH ===
  
 {{howhard>5}} {{howhard>5}}
  
-These trash folders are named ''%%.trash%%'' and are direct subdirectories of each user's home directory. If logged into ssh as root((or if logged into the console)) you can check which accounts are taking the most space with their File Manager trash folders as follows:+These trash folders are named ''%%.trash%%'' and are direct subdirectories of each user's home directory. If logged into SSH as rootyou can check which accounts are taking the most space with their File Manager trash folders as follows:
  
 <code> <code>
Line 336: Line 347:
 </code> </code>
  
 +\\
 ==== Trash Folders - IMAP ==== ==== Trash Folders - IMAP ====
  
 If your users use IMAP to connect to their mail folders, then when they delete messages via their mail client they will usually at first be moved to a trash folder. In cPanel servers, it is possible to configure the IMAP trash folders to "Autoexpunge", which means that messages which have been in these trash folders a certain number of days will be automatically removed. Within the filesystem, these folders are named ''%%.Trash%%'', capitalized, rather than lowercase like the File Manager trash folders. If your users use IMAP to connect to their mail folders, then when they delete messages via their mail client they will usually at first be moved to a trash folder. In cPanel servers, it is possible to configure the IMAP trash folders to "Autoexpunge", which means that messages which have been in these trash folders a certain number of days will be automatically removed. Within the filesystem, these folders are named ''%%.Trash%%'', capitalized, rather than lowercase like the File Manager trash folders.
 +
 +\\
  
 === Autoexpunge === === Autoexpunge ===
Line 345: Line 359:
  
 In a cPanel server, The "Autoexpunge" option can be found in WHM at ''%%Home >> Service Configuration >> Mailserver Configuration%%''. Also on this page is the option "Trash Expire Time" which controls how many days old a message is kept in the trash folder before it is automatically removed. In a cPanel server, The "Autoexpunge" option can be found in WHM at ''%%Home >> Service Configuration >> Mailserver Configuration%%''. Also on this page is the option "Trash Expire Time" which controls how many days old a message is kept in the trash folder before it is automatically removed.
 +
 +\\
  
 === via cPanel === === via cPanel ===
Line 356: Line 372:
  
 If you started File Manager from the site's docroot, ((aka, the www or public_html folder)) you will need to go up one level in order to see the mail folder. If you started File Manager from the site's docroot, ((aka, the www or public_html folder)) you will need to go up one level in order to see the mail folder.
 +
 +\\
  
 === via Webmail === === via Webmail ===
Line 363: Line 381:
 //If// you have **not** yet enabled the new [[https://documentation.cpanel.net/display/ALD/Mailbox+Conversion|mdbox]] mailbox format, you can see the contents of the email accounts from the webmail interface of the overarching email account of the cPanel account [[https://documentation.cpanel.net/display/ALD/Email+Accounts#EmailAccounts-Defaultemailaccount|itself]]. You may need to "subscribe" to the relevant folders in the settings within the preferred webmail application. But, if you have already converted from maildir format to the new mdbox format, the symlinks necessary for this method of access will not work. //If// you have **not** yet enabled the new [[https://documentation.cpanel.net/display/ALD/Mailbox+Conversion|mdbox]] mailbox format, you can see the contents of the email accounts from the webmail interface of the overarching email account of the cPanel account [[https://documentation.cpanel.net/display/ALD/Email+Accounts#EmailAccounts-Defaultemailaccount|itself]]. You may need to "subscribe" to the relevant folders in the settings within the preferred webmail application. But, if you have already converted from maildir format to the new mdbox format, the symlinks necessary for this method of access will not work.
  
-=== via SSH or Console ===+\\ 
 + 
 +=== via SSH ===
  
 {{howhard>5}} {{howhard>5}}
general/disk-space-management.txt · Last modified: 2020/06/01 15:28 by Karson N.