7 File System Management

A characteristic, Linux file system

  1, super block (super block): recording information of the entire file system, and comprises a total block of the inode, the inode number and block have been used, and the inode number of the unused block, the block size of the inode, file system It mounts time, last write time, last time the disk test. Available through dumpe2fs

  2, date block (data block, also referred to as block): used to actually store data, the size of block (1KB, 2KB or 4KB) and the number of already decided after formatting, can not be changed, unless each reformatted blcok only save a data file, if the file data block is less than a block, the remaining space in the block can not be used by other files; if the file data block is greater than a block, the block occupied by a plurality of blocks. Windows Disk Defragmenter tool in principle is to take up one more block file blocks to try to sort out together, this can speed read and write speeds

  3, inode (i node): for permission (r, w, x) log file, is a group owner and a state of the file, the file size, the file change time (the ctime), the file last read time (atime), the most recent file modification time (mtime), the real data file stored block number. Each file inode need to take a

 

Second, some common disk management commands

  Ll command to view the directory size is not allowed, usually a multiple of 4k or 4k, it is only because ll statistics file name in the directory take up much space. Use du command to view the total size of the directory

  The difference between du and df: du is used for statistical file size, file size statistics are accurate; df space is used for statistical, statistical remaining empty is accurate (because zero files and junk files will take up space )

  fsck command to repair the file system 

  dumpe2fs disk status display

  Detailed time stat view files

  fdiskMBR partition (SWAP partition size can be added), partedGPT partition

  free -h to view the status of memory

    buffers: mainly used for I / O write, to write multiple piecemeal application events to a centralized buffer (ie buffers), and then write-once disk, thus improving the efficiency of disk write.

    cached: mainly used to improve the efficiency of reading the relevant page, the page will regularly access the kernel into cached, so that you improve the hit rate of the page, cached greater, the higher the hit rate, reduces the I / O read request.

  

  Disk quota:
  limit the number of files and disk space users and user groups

  LVM Logical Volume Manager

    Physical volumes ----> Volume Group -----> logical

Guess you like

Origin www.cnblogs.com/baci/p/11323643.html