{"id":3792,"date":"2022-12-20T17:20:05","date_gmt":"2022-12-20T20:20:05","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/quotacheck-man8\/"},"modified":"2022-12-20T17:20:05","modified_gmt":"2022-12-20T20:20:05","slug":"quotacheck-man8","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/quotacheck-man8\/","title":{"rendered":"quotacheck (man8)"},"content":{"rendered":"<h1 align=\"center\">quotacheck<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#OPTIONS\">OPTIONS<\/a><br \/> <a href=\"#NOTE\">NOTE<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#FILES\">FILES<\/a><br \/> <a href=\"#AUTHOR\">AUTHOR<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">quotacheck \u2212 scan a filesystem for disk usage, create, check and repair quota files<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>quotacheck<\/b> [ <b>\u2212gubcfinvdMmR<\/b> ] [ <b>\u2212F<\/b> <i>quota-format<\/i> ] <b>\u2212a<\/b> | <i>filesystem<\/i><\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><b>quotacheck<\/b><\/i> examines each filesystem, builds a table of current disk usage, and compares this table against that recorded in the disk quota file for the filesystem (this step is omitted if option <b>-c<\/b> is specified). If any inconsistencies are detected, both the quota file and the current system copy of the incorrect quotas are updated (the latter only occurs if an active filesystem is checked which is not advised). By default, only user quotas are checked. <b>quotacheck<\/b> expects each filesystem to be checked to have quota files named <i>[a]quota.user<\/i> and <i>[a]quota.group<\/i> located at the root of the associated filesystem. If a file is not present, <b>quotacheck<\/b> will create it.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If the quota file is corrupted, <b>quotacheck<\/b> tries to save as much data as possible. Rescuing data may need user intervention. With no additional options <b>quotacheck<\/b> will simply exit in such a situation. When in interactive mode (option <b>-i<\/b>) , the user is asked for advice. Advice can also be provided from command line (see option <b>-n<\/b>) , which is useful when <b>quotacheck<\/b> is run automatically (ie. from script) and failure is unacceptable.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>quotacheck<\/b> should be run each time the system boots and mounts non-valid filesystems. This is most likely to happen after a system crash.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">It is strongly recommended to run <b>quotacheck<\/b> with quotas turned off for the filesystem. Otherwise, possible damage or loss to data in the quota files can result. It is also unwise to run <b>quotacheck<\/b> on a live filesystem as actual usage may change during the scan. To prevent this, <b>quotacheck<\/b> tries to remount the filesystem read-only before starting the scan. After the scan is done it remounts the filesystem read-write. You can disable this with option <b>\u2212m<\/b>. You can also make <b>quotacheck<\/b> ignore the failure to remount the filesystem read-only with option <b>\u2212M<\/b>.<\/p>\n<h2>OPTIONS <a name=\"OPTIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>-b, &#8211;backup<\/b><\/p>\n<p style=\"margin-left:22%;\">Forces <b>quotacheck<\/b> to make backups of the quota file before writing the new data.<\/p>\n<p style=\"margin-left:11%;\"><b>-v, &#8211;verbose<\/b><\/p>\n<p style=\"margin-left:22%;\"><b>quotacheck<\/b> reports its operation as it progresses. Normally it operates silently. If the option is specified twice, also the current directory is printed (note that printing can slow down the scan measurably).<\/p>\n<p style=\"margin-left:11%;\"><b>-d, &#8211;debug<\/b><\/p>\n<p style=\"margin-left:22%;\">Enable debugging mode. It will result in a lot of information which can be used in debugging the program. The output is very verbose and the scan will be slow.<\/p>\n<p style=\"margin-left:11%;\"><b>-u, &#8211;user<\/b><\/p>\n<p style=\"margin-left:22%;\">Only user quotas listed in <i>\/etc\/mtab<\/i> or on the filesystems specified are to be checked. This is the default action.<\/p>\n<p style=\"margin-left:11%;\"><b>-g, &#8211;group<\/b><\/p>\n<p style=\"margin-left:22%;\">Only group quotas listed in <i>\/etc\/mtab<\/i> or on the filesystems specified are to be checked.<\/p>\n<p style=\"margin-left:11%;\"><b>-c, &#8211;create-files<\/b><\/p>\n<p style=\"margin-left:22%;\">Don\u2019t read existing quota files. Just perform a new scan and save it to disk. <b>quotacheck<\/b> also skips scanning of old quota files when they are not found.<\/p>\n<p style=\"margin-left:11%;\"><b>-f, &#8211;force<\/b><\/p>\n<p style=\"margin-left:22%;\">Forces checking and writing of new quota files on filesystems with quotas enabled. This is not recommended as the created quota files may be out of sync.<\/p>\n<p style=\"margin-left:11%;\"><b>-M, &#8211;try-remount<\/b><\/p>\n<p style=\"margin-left:22%;\">This flag forces checking of filesystem in read-write mode if a remount fails. Do this only when you are sure no process will write to a filesystem while scanning.<\/p>\n<p style=\"margin-left:11%;\"><b>-m, &#8211;no-remount<\/b><\/p>\n<p style=\"margin-left:22%;\">Don\u2019t try to remount filesystem read-only. See comment with option <b>\u2212M<\/b>.<\/p>\n<p style=\"margin-left:11%;\"><b>-i, &#8211;interactive<\/b><\/p>\n<p style=\"margin-left:22%;\">Interactive mode. By default <b>quotacheck<\/b> exits when it finds an error. In interactive mode user is asked for input instead. See option <b>\u2212n<\/b>.<\/p>\n<p style=\"margin-left:11%;\"><b>-n, &#8211;use-first-dquot<\/b><\/p>\n<p style=\"margin-left:22%;\">If the quota files become corrupted, it is possible for duplicate entries for a single user or group ID to exist. Normally in this case, <b>quotacheck<\/b> exits or asks user for input. When this option is set, the first entry found is always used (this option works in interactive mode too).<\/p>\n<p style=\"margin-left:11%;\"><b>-F, &#8211;format=<\/b><i>format-name<\/i><\/p>\n<p style=\"margin-left:22%;\">Check and fix quota files of specified format (ie. don\u2019t perform format auto-detection). This is recommended as detection might not work well on corrupted quota files. Possible format names are: <b>vfsold<\/b> Original quota format with 16-bit UIDs \/ GIDs, <b>vfsv0<\/b> Quota format with 32-bit UIDs \/ GIDs, 64-bit space usage, 32-bit inode usage and limits, <b>vfsv1<\/b> Quota format with 64-bit quota limits and usage, <b>rpc<\/b> (quota over NFS), <b>xfs<\/b> (quota on XFS filesystem)<\/p>\n<p style=\"margin-left:11%;\"><b>-a, &#8211;all<\/b><\/p>\n<p style=\"margin-left:22%;\">Check all mounted non-NFS filesystems in <b>\/etc\/mtab<\/b><\/p>\n<p style=\"margin-left:11%;\"><b>-R, &#8211;exclude-root<\/b><\/p>\n<p style=\"margin-left:22%;\">When used together with the <b>\u2212a<\/b> option, all filesystems except for the root filesystem are checked for quotas.<\/p>\n<h2>NOTE <a name=\"NOTE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>quotacheck<\/b> should only be run by super-user. Non-privileged users are presumably not allowed to read all the directories on the given filesystem.<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>quota<\/b>(1), <b>quotactl<\/b>(2), <b>fstab<\/b>(5), <b>quotaon<\/b>(8), <b>repquota<\/b>(8), <b>convertquota<\/b>(8), <b>setquota<\/b>(8), <b>edquota<\/b>(8), <b>fsck<\/b>(8), <b>efsck<\/b>(8), <b>e2fsck<\/b>(8), <b>xfsck<\/b>(8)<\/p>\n<h2>FILES <a name=\"FILES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>aquota.user or aquota.group<\/b><\/p>\n<p style=\"margin-left:34%;\">located at filesystem root with quotas (version 2 quota, non-XFS filesystems)<\/p>\n<p style=\"margin-left:11%;\"><b>quota.user or quota.group<\/b><\/p>\n<p style=\"margin-left:34%;\">located at filesystem root with quotas (version 1 quota, non-XFS filesystems)<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"14%\">\n<p><b>\/etc\/mtab<\/b><\/p>\n<\/td>\n<td width=\"9%\"><\/td>\n<td width=\"64%\">\n<p>names and locations of mounted filesystems<\/p>\n<\/td>\n<td width=\"2%\"> <\/td>\n<\/tr>\n<\/table>\n<h2>AUTHOR <a name=\"AUTHOR\"><\/a> <\/h2>\n<p style=\"margin-left:11%;\">Jan Kara <jack@suse.cz> <br \/> Based on old <b>quotacheck<\/b> by: <br \/> Edvard Tuinder <ed@elm.net> <br \/> Marco van Wieringen <mvw@planets.elm.net><\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  quotacheck \u2212 scan a filesystem for disk usage, create, check and repair quota files <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[5,52,4,891],"class_list":["post-3792","post","type-post","status-publish","format-standard","hentry","category-8-administracion-del-sistema","tag-5","tag-administracion","tag-man8","tag-quotacheck"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3792","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=3792"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3792\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=3792"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=3792"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=3792"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}