View the actual disk space of aix

Source: Internet
Author: User
View the actual disk space of aix view space lspv: view the system disk lspvhdisk #: view the disk hdisk # space allocation lsvg: view the system VGlsvgvg_name: view the space allocation of VG lsvg-lvg_name: view the LV allocation in VG and the corresponding text... view the actual disk space of aix. view the space. lspv: view the system disk. lspv hdisk #: view the space allocation of the hdisk. lsvg: view the system VGlsvg vg_name: view the space allocation of VG lsvg-l vg_name: view the LV allocation in VG and the corresponding file system df-k: view the file system usage. The du command does not display the free space of the disk, but displays the disk usage information. The du tool is used to determine the disk usage of files and directories. Based on this, we can roughly calculate how much space has been allocated to the system hard disk and how much space has been used. The graphic interface is displayed when smit chfs is used in AIX to add space partitions. Select Change/Show Characteristics of an Enhanced Journaled File System, and select the space partition you want to add at startup. To find the disk usage of a specific user, you need to find the disk space used by a user. when using the find command, you must use the du command to report the disk usage of a specific user. $ Find.-user mc-type f-exec du-k {}\;-user option allows you to specify find to only report files belonging to a specific user. -The type option forces "find" to return only the path of a specific type of project (in this example, a file). This prevents "du" from containing directories because these directories may belong to a user, but it contains many user files. Then, execute the du command for each path to report disk usage. To obtain the abstract information, in other words, the total space used by a specific user, you can use awk to aggregate the information and print the final value: $ find. -user mc-type f-exec du-k {}\; | awk '{s = s + $1} END {print "Total used :", s} 'total used: 123721 for a group, you can use the-group option: $ find. -group mcslp-type f-exec du-k {}\; | awk '{s = s + $1} END {print "Total used :", s} 'total used: 542485 use quota for file limit Warning when a user creates a file that exceeds its soft limit, they will receive the following Warning: quota_ufs: Warning: over disk limit (Pid 1738, uid 101, inum 94, fs/export/home) Please note, leave the user 7 days to correct the problem, you can use edquota-t to change this period. If you try to create a file that exceeds the hard limit, the system will terminate the write process and truncate the file according to the corresponding limit: $ mkfile 210000 k overlimitquota_ufs: over hard disk limit (pid 1843, uid 101, inum 130, fs/export/home) overlimit: initialized 191873024 of 215040000 bytes: Disc quota exceeded by running the quota command, any user can check their own quota limits and disk usage: $ quotaOver disk quota on/export/home, remove 199993 K within 7.0 days quota management using the quota command, the system administrator can check the quota of any user. you should use the-v command line option to provide complete information about the file system, usage, and restrictions. Report (see listing 8 ). Listing 8. use the-v option $ quota-v mcDisk quotas for mc (uid 101 ): filesystem usage quota limit timeleft files quota limit timeleft/export/home 399993 200000 400000 6.9 days 151 0 0 to get a report describing the disk and quota usage of all users in a file system, you can use the repquota command and specify the file system to be reported (see listing 9 ). Listing 9. run the repquote command $ repquota-v/export/home/dev/dsk/c0t0d0s7 (/export/home ): block limits File limitsUser used soft hard timeleft used soft hard timeleftmc +-399993 200000 400000 6.9 days 151 0 0 to ensure that the quota information is up-to-date, you should use the quotacheck command. This verifies the file storage data by using the quota information used to report the quota information. You should use cron to automatically run this task, which is appropriate once a day (because this process is time-consuming ).
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.