AIX Learning Log (2) file system!

Source: Internet
Author: User

Part 2: File System
2006-4-28
1. Log File System Structure
Superblock: stores the file system size and ID, idle block linked list, And nbpi;
Inode: file size, owner, permission, creation/access/modification time
Data Block: stores data.
Pointer of indirect block to data block
The Aix log file system is stored on a logical volume. The logical volume is divided into 4 kb clusters, which is the smallest unit for space allocation in the file system. The first cluster of the file system is called a super block, it contains the file system name, size, inode count, creation date, nbpi, and idle block linked list. The super block is followed by a fixed number of inode blocks, each inode contains a file or directory definition, including the type, size, permission, owner user and its Group ID, creation/modification/access time; it also contains pointers to data blocks or indirect blocks. Note: inode does not contain the file description, which is recorded in the data block of the directory to which the device belongs. The super block is very important, if it is damaged, the file system cannot be mounted. Therefore, the system saves a copy of the super block in block 31st for disaster recovery.
2. inode Structure
Inode content: permission, file type, file size, last modification time, last access time, access control information, number of pointers to data blocks or indirect blocks, owner user ID, owner user group ID, pointer to a data block or indirect block, and finally change the permission time. For most information about inode, you can use the LS-l command. Each file has one and only one inode corresponds to it.
2. display the File System
Smit FS
The mount command without parameters displays all mounted file systems. The file system must be mounted for normal access. The mounted file system also uses the mount command; the Smit project of the same function is the list all mounted file systems project under the file systems menu.
3. Create a file system on an existing logical volume
If you directly create a file system, the system automatically creates a logical volume of the appropriate size, but thus some control over the logical volume is lost. For example, the logical volume allocation cannot be determined in advance. Even if the logical Volume Allocation Policy is modified later, the physical partitions used cannot change the actual allocation unless the volume group is reorganized. The advantage of creating a file system after creating a logical volume is that it can solve this problem.

It seems that the file system <= logical volume
You can modify the file system: the default mount point. The file system size can only be extended, cannot be reduced, whether the system is automatically mounted at startup, and the read/write permission. When the file system is extended, the attached logical volume is automatically expanded; the logical volume that contains the file system is extended, and the file system on it is not automatically expanded, at this time, the system administrator needs to expand the file system to make it fully occupy the entire logical volume.
Delete a file system: before deleting a file system, you must uninstall it. If a user is using it, it cannot be detached. You can run the Fuser-u fs_name command to check which processes and users are using the file system. Deleting a file system will automatically delete the logical volume in which the file system is located, whether the file system was established directly or on an existing logical volume. The relevant information in ODM and/etc/filesystems is also deleted.
File System space management: Although AIX provides dynamic expansion capabilities for file system space, it does not automatically expand; if the file system is fully occupied, an error will occur, if the space occupied by some basic file systems is used up, more serious errors may occur, such as logon failure or even system failure. Therefore, you must monitor and manage the file system space.
Display the remaining space of the file system: DF,-l shows the space in use;-K is displayed in 1kb (512 bytes by default ).
Control of rapidly growing files: effective monitoring and regular cleanup of rapidly growing files are required, and some system files increase rapidly under specific circumstances; for example:
/Var/adm/wtmp/var/spool/*/Smit. log/Smit. script/etc/security/failedlogin/var/adm/sulog
Space occupied by the display file and directory: du/home | sort-Rn
Inspect the File System
The fsck (File System check) command is used to verify the file system. The inspection process is divided into several parts: checking the file system logs, confirming that each block is allocated to a file, or in the idle block linked list, check the file size and directory structure. If you want to fix most errors, you must detach the file system to ensure that no user uses the file system. Otherwise, the repair cannot be performed.
 

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.