linux sixteenth File System Management

1, format

Low-level formatting: prior to partition, divide the track, forming clusters do before the hardware's manufacturer;
advanced formatting: After partition of the partition, create a file system.

2, the metadata and data areas

File system is divided into metadata and data areas.
Metadata file metadata storage area (inode (index node)), the size of the metadata refers to a file, permissions, is a group owner, time stamp, a data block pointer, does not contain the file name, the file name stored in the directory, the inode stored inode number and the data block pointer, directory data storage area corresponding relationship between the file name and inode number.
Deleting the file data block, i.e., all the file inode points marked as unused state, mark this inode file is not in use and modify the data block and inode bitmap.
Copy the file operation that is the new file. The operation to move the file, in the same file system, the only change is in its path mapping, inode or that value, in a different file system, copy the data to the target file, and delete the original file.
Symbolic link file: space to store the data block pointer is stored among the real file access path, and does not occupy the data area of the disk, is a special type of file.
Device File: space to store the data pointer is stored among the device number (major, minor), does not occupy the data area of the disk, it is a special type of file.
Bitmap index (bitmap index): each bit corresponds to a data block or the inode, the level achieved in blocks, the data block is a 1-bit bitmap index representing the occupied data blocks, representative of the data block 0 is unoccupied, the inode 1 is a bitmap index representing the position occupied inode, the inode is 0 for unoccupied.
Superblock: defining a total number of block groups, each block group number from which to start, which number over.

Create a file system:

Instructions:

mkfs -t /ext3

among them:

mkfs -t ext2 = mkfs.ext2
mkfs -t ext3 = mkfs.ext3

Specialized management ext series of documents:

mke2fs:

-j: create an ext3 file system type
-b BLOCK_SIZE: Specifies block size, default is 4096; available value is 1024, 2048 or 4096;
-L the LABEL: label specified partition;
-m #: Specify reserved for superuser block percentage
-i #: specifies how many bytes of space to create a inode, the default is 8192; values given here be 2 ^ n times the block size;
-N #: Specifies the number of the inode;
-F : force the creation of a file system;
-E: a user-specified additional file system attributes;

#: mke2fs [-j] ...

blkid: or view the relevant properties of the disk device

UUID
TYPE
LABEL


e2label: to view or define the label

e2label device file label: label set

#:e2label /proc/...

Adjustments related attributes of the file system: tune2fs

-j: Without prejudice to the original data, the upgrade is ext2 ext3;
-L the LABEL: label setting or modification;
-m #: adjusting the percentage reserved;
-R & lt #: Specifies the number of reserved blocks;
-o: setting default mount options;
acl
-c #: mount a self-test after a specified number of times to reach #, 0 or -1 table turn this feature off;
-i #: how many days each mount using the self-test; 0 or -1 indicates turn off this feature;
-l: display information superblock;

dumpe2fs: displays the file attribute information

-h: displays only the information in the superblock

#:dumpe2fs -h 


fsck: check and repair a Linux file system


-t FSTYPE: Specify the file system type
-a: Auto Repair
#: fsck -a


e2fsck: dedicated to the repair ext2 / ext3 filesystem

-f: Force inspection;
-p: Auto repair;

#:e2fsck -p

Mounting: The new file system related to the current root file system
to uninstall: the association of a file system with the current root file system to remove the pre-;

mount: mount
mount device mount point
device:
device file: / dev / sda5
label: the LABEL = ""
the UUID: the UUID = ""
mount point: directory
requirements:
1, this directory is not being used by another process;
2, have pre-existing directory;
3, the original files in the directory will be temporarily hidden;

mount: the system is already mounted display device and mount point
Mount [Options] [Options -o] MOUNT_POINT the DEVICE
-a: represents mount / etc all file systems / fstab file defined
-n: By default, mount each command to mount a device, the device will save the information to mount the / etc / mtab file; the -n option means to mount equipment, the information is not written to the file;
-t FStype: Specifies the device is mounted type of file system on; when not in use this option, mount will call blkid command to get the corresponding file system types;
-r: mount read-only, this option is often used when mounting the CD
-w: read-write mount

-o: specify additional mount options, that specifies the file system attributes are enabled;
remount: remount the current file system
ro: mount read-only
rw: read-write mount



after the mount is completed, the corresponding file to be accessed by mount point files on the system;

umount: Uninstall a file system
umount device
umount mount point

Uninstall Note:
mount the equipment is not used by the process;

Guess you like

Origin www.cnblogs.com/X404/p/12363132.html