(1) Reason for "formatting" after disk partitioning: This is because each operating system sets the file attributes, permissions are not the same in order to store the data required for these files, so you need to format the partition to become the operating system can take advantage of the file system format
(2) The Ext2 file system under Linux, when formatted, distinguishes disk partitions into block groups, each of which includes the data block, inodetable, superblock, File system Description, block bitmap , Inode bitmap Six sections
When a directory is created under the Ext2 file system, at least one inode and one block are assigned, where the Inode records the permissions and attributes of the directory and records the block number assigned to it , and block is the inode number data that is recorded in this directory with the file name and the filename.
When a file is created under the Ext2 file system, an inode is allocated with the number of blocks relative to that file size.
Mount point meaning: The mount point must be a directory, which is the entry into the file system, the file system is not mounted can not be used
command to query the file system: DUMPE2FS
(3) Total disk usage command query for file system: DF
Evaluate the disk usage of the file system (commonly used to estimate the capacity of the catalog): Du
(4) Connection file
There are two types of connection files under Linux: Hard Connect and symbolic connection
Hard link: A new file name is connected to an inode number in a directory, so it is equivalent to an inode with a file, and opening any one can access the inode.
The advantage of hard connection is security, any one file is deleted and another exists, then Indoe and block still exist.
Restrictions on hard connections: cannot cross file systems and cannot connect to directories.
Symbolic connections are equivalent to shortcuts under Windows
(5) disk partition command: Fdisk device name
After entering Fdisk a few important commands: D is to delete a partition, n is a new partition, p is to display the partition table on the screen, Q is directly away from Fdisk, W is saved and then left Fdisk, you can use the M command to query all commands using the method
Note: After creating a new partition, use the command "Partprobe" to let the kernel re-locate the partition table.
(6) After the disk partition is newly created, the following is the format of the disk, the command is: mkfs [-T file system format] new device file name
(7) After the format is mounted, then the file system will be able to use the
A few things to determine before mounting: (a) A single file system should not be repeatedly mounted in different mount points (directories); (b) A single directory should not be repeatedly mounted on multiple file systems; (c) The directory as a mount point should theoretically be empty directory, otherwise it will hide the original data in the directory, The file system is not displayed again until it is uninstalled.
The next step is to use the Mount command "Mount", although the contents of Mount are complex, but we only use the simple parts.
Mount Ext2/ext3 file system directly with: Mount device file name mount point, you can mount the device in the directory, why so simple, because Linux to support the file system driver is written in/lib/module/$ (uname-r)/kernel/ FS directory, as long as the file system driver is placed in this directory, the system can automatically identify
System Unrecognized file system mount: Mount [-t file system] device file name mount point
File System uninstallation: Umount device file name or mount point
(8) Power-on Mount, so that we do not have to mount each time the boot, the boot mount are written in the/etc/fstab file, about the boot-mounted things too much, refer to P235 page.
remember , after setting up the/etc/fstab file, be sure to use the MOUNT-A command to run the boot mount, to see if the required partition has been mounted up, so that you can test the/etc/fstab file syntax is correct, if once/etc/ Fstab syntax error, boot will not mount, then your system may not be able to boot smoothly!!!
Mount other file systems
Eighth Linux disk and file System Management G