linux day11 mount the swap file system management, and file system management peripherals management raid horse works

Disk storage and file systems

1, the cylinder is a logical concept, a cylinder about 8M, early in cylinders divided by partitions 6 starts from the sector are divided in units of

2, partition, create a file system, the third step is to mount

3, GPT divided into four parts: protective MBR, GPT partition table 128, a partition, the partition table backup, larger capacity, but also automatically backs

4, the script inside the zoning, fdisk how to achieve it, would not be able to stop there, consider using redirect, not suitable for writing interactive scripts

5, echo -e "n \ np \ n" | fdisk / dev / sdc, this is an idea, how to write interactive scripts that use the pipeline

6, multi-line redirection, you can try it for yourself, try some of their own scripting methods

. 7, ext series SuperBlock Metadata Partition storage, this block has a corresponding set of commands to our view, the presence of a first block group number from several to which, for this command to see the dumpe2fs series ext

8, the superblock is important to store a lot of content, not just the starting point of block groups, as well as tune2fs, of course, these data is information of the file system, no file system is not looking, odd-numbered block group of which has the backup superblock super fast, but not all have an odd number, 13,579 have, put a lot of places

9, clusters and blocks, the smallest unit of storage of files, this block when creating the file system is specified, but once you've created your operating system, the block size can not be changed, unless you re-create the file system

10, mkfs -b 1024 specify the block size

11, the number of blocksize, block count, inode count means the file, pay attention to is not the number of links, each set up a file, it takes a node number

12, reserved block count is about 5% doing with it? People with ID to zero, that is, to use the root, why do reservations, fearing disk space is used up users, full support, full support was then, as root want to change a file, add a byte is not added go in, it is unreasonable to set aside 5%, to prevent this from happening

13, set aside 5% is the default, large partitions, you can consider the proportional control it because 1T, then it is equivalent to 50G, less than basic, too wasteful

Creating ext file system mke2fs

1, mke2fs command make e2 fs can also create a file system, and is designed to create ext file system

2, -t {ext2 | ext3 | ext4} This command If you do not specify the -t option was then created by default is ext2, so we do not recommend using him

3, this parameter and mkfs command is most common , mkfs.ext4 equivalent mke2fs -t ext4 is the same

4, -m can also use the mkfs default set aside 5% 0.1% also support Linux does not support floating-point number is not known it? The teacher said that the bash program, specific commands some support

5, say bc it also supports floating-point numbers, and some programs which support their own float, but it is not supported bash

6, -j: with mke2fs is used, the equivalent -t ext3, but we recommend to write more reasonable mkfs

mkfs.ext3   
mkfs - t ext3 
mke2fs - J 
mke2fs - t ext3 
these written effect is the same, suggest that you direct mkfs.ext3 on it, other commands are older commands

 

7, -i # (number), how much data each node in the space, a node number 1024 reserved space in the data space, much space node table, spatial data stored on the small, the data space how many bytes per inode create a; this size should not be less than the size of the block, most of the time this case inode number, equal to the block size is just right when this time each block corresponds to an inode, that is to say, every files are smaller than the block size, might have run out of all the inode, which is obviously unreasonable, it does not make sense, but also a waste of space, because the files are now large files, so inode or a little less, is how much space correspond an inode

8, upside down completely meaningless, inode> block -i fact is the number of nodes indirect impact we create, we have a more direct way -N #

9, -N #: inode number to create the specified partition, probably close to, but he has a rounded process, not exactly the same

10, - Small L: a node records occupy disk space, 128-4096, metadata He also consume space, the default is 256, 256 is not specified

11, of course, if these do not have to specify anything, the default value,

12 - Big O feature [, ...] enable the specified characteristics tune2fs filesystem feature there is a list of his properties, ext2 default no log function, can be considered together with -O, this may be followed by the establishment of good, man plus logging on, it becomes a substitute with ext2 ext3, but in fact he sent a logging on ext2 and ext3 nature

13 - Big O ^ feature closes the specified characteristics have to go back to the ext2

14,-b {1024|2048|4096}

File system label blkid

15, -L 'LABEL', plus labels, which window, data of the edge of the edge of the disc system d c is the label disc, it means a disc name, Windows default label volume window which is newly added disc name modified , is to modify the label, Linux file system is created inside, they can add the label, the label name is in principle no limit, but we recommend that, he wrote the name will be mounted, it is recommended to mount point as a label, the label is a simple explanation Well, the equivalent of a comment information, blkid can also see the label, tune2fs can also see the label filesystem volume name

16, may be modified post-label, unlike the block size, the change will not be built up, and some can be changed, can not change some

17, usually we generally tune a tune -m default block size on the line, the partition is relatively large, automatic is 4096, a small district is 1024, of course, 2048 will not appear in general, usually manually specified to appear

18, the label is another method, apparatus and independent of the pointing device

blkid

1,

 

Guess you like

Origin www.cnblogs.com/lisa-blog/p/10929155.html