当前位置:网站首页>Disk management and file system
Disk management and file system
2022-04-23 16:27:00 【qjwthink】
Catalog
2、 The data structure of the hard disk
4、MBR And disk partition represents
Two 、 Check and confirm the new hard disk
3、 ... and 、 Create file system
Four 、 mount 、 Uninstall file system
One 、 Disk base
1、 Disk structure
The physical structure of the hard disk
Disc : A hard disk has multiple disks , Every disc 2 Noodles ( Positive and negative sides )
head : One head per side
Mechanical drive
Solid state disk
2、 The data structure of the hard disk
A sector : The disc is divided into sectors , Each sector stores 512 Bytes of data ( The more sectors, the larger the capacity )
Magnetic track : Concentric circles with different radii on the same disk
cylinder : A circle formed by different discs with the same radius 〔 The number of cylinders and tracks is the same )
Hard disk storage capacity = Number of heads × Magnetic track ( cylinder ) Count × Sectors per channel × Bytes per sector
You can use a cylinder / head / Sector to uniquely locate each area on the disk
3、 Disk interface type
IDE、SATA、SCSI、SAS、 Fibre channel
4、MBR And disk partition represents
Master boot record (MBR: Master Boot Record)
MBR In the first physical sector of the hard disk
MBR Contains the main boot program of the hard disk 446 bytes And hard disk partition table (66 byte )
The partition table has 4 Zone record area , The recording area of each zone accounts for 16 Bytes
Linux Put the hard disk 、 Devices such as partitions are represented as files
Hda5 Express : First block ide The fifth partition of the interface
5、 Disk partition structure
The number of primary partitions in the hard disk is only 4 individual
The number of primary and extended partitions is limited to 1~4
Extended partitions are subdivided into logical partitions
The ordinal number of the logical partition will always be from 5 Start
6、 File system type
XFS file system
advantage : Support large files , There's a lot of storage , Log files can be backed up and repaired
● A partition where files and directory data are stored
● High performance log file system
●CentOS 7 The default file system used in the system
SWAP, Exchange file system
· by Linux The system establishes a switch partition
Linux Other file system types supported
FAT16、FAT32、NTFS
EXT4、JFS..
Two 、 Check and confirm the new hard disk
1、fdisk command
· View or manage disk partitions
Fdisk -l [ Disk device ]
or
Fdisk [ Disk device ]
Common instructions in interactive mode
m、p、n、d、t、w、q
Necessary parameters :
-l List all partition tables
-u And -l Use it with , Displays the number of partitions
Select parameters :
-s< Partition number > The specified partition
-v Version information
Menu operation instructions
m : Display menu and help information
a : Active zone marker / Boot partition
d : Delete partition
l : Show partition type
n : New partition
p : display partition information
q : Exit without saving
t : Set partition number , Modify the system number of the partition
v : Check the area
w : Save the changes and exit
x : Expand applications , Advanced features
2、 Zoning steps
1、 First add the hard disk and let the system recognize , restart
This command can be used without restarting , To identify the hard drive
2、fdisk Partition , Easy to use , Maximize the use of hard disk performance
3、 Confirm the file system after formatting ,windows Can't use without formatting
Mkfs -t File system type mkfs. File system type Formatted partition or hard disk
4、 mount
Unmount
attach : Pay attention to mounting
1、 Preferably an empty file , There is a chance that the file will be lost
2、 If in the mount Directory , You can't unmount
3、 Multiple devices cannot be attached to one directory .
3、 ... and 、 Create file system
1、mkswap command
make swap, Create an exchange file system
mkswap Zone devices
Example :
1、fdisk New partition
2、 Input t,hex Change the code to 82
attach : If the partition is not painted, you can use partprobe /dev/sdb refresh
3、 Format as swap A section of
4、 Drive your car swap Partition
5、 End partition
Four 、 mount 、 Uninstall file system
1、mount command
Mount file system ,ISO Mirror to the specified folder
Mount [ -t type ] The storage device Mount point Directory
mount -o loop lSO Image file Mount point Directory
2、umount command
Unmount the mounted file system
Umount Storage location
Umount Mount point Directory
attach : Permanently mount
Modify the configuration file Parameters modified by the command It's usually temporary
1、 Go to configuration file , Modify the parameters
2、 see , success
attach : Permanent mounting of optical drive , Add the following text to the configuration file
Hardware device (UUID) blkid Mount point file system (ISO9660) default( The default on option ) 0( Backup ) 0( Check whether it is started )
Check disk usage df command
df [ Options ] [ file ]
summary
Learn about
1、 New hard disk , And be able to use
2、swap Partition , Space creation, opening and closing
3、fdisk Partition
4、 Permanently mount the optical drive hard disk
5、 Basic structure of hard disk
版权声明
本文为[qjwthink]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231624474169.html
边栏推荐
- About JMeter startup flash back
- 04 Lua 运算符
- What does cloud disaster tolerance mean? What is the difference between cloud disaster tolerance and traditional disaster tolerance?
- Nacos 详解,有点东西
- Unity shader learning
- The system research problem that has plagued for many years has automatic collection tools, which are open source and free
- Method 2 of drawing ROC curve in R language: proc package
- Cartoon: what are IAAs, PAAS, SaaS?
- Countdown 1 day ~ 2022 online conference of cloud disaster tolerance products is about to begin
- 第十天 异常机制
猜你喜欢
Nacos detailed explanation, something
捡起MATLAB的第(8)天
阿里研发三面,面试官一套组合拳让我当场懵逼
MySQL - execution process of MySQL query statement
捡起MATLAB的第(7)天
TIA博图——基本操作
volatile的含义以及用法
安装及管理程序
力扣-746.使用最小花费爬楼梯
Hyperbdr cloud disaster recovery v3 Release of version 3.0 | upgrade of disaster recovery function and optimization of resource group management function
随机推荐
04 Lua 运算符
Postman batch production body information (realize batch modification of data)
GRBL学习(一)
Es common query, sorting and aggregation statements
[key points of final review of modern electronic assembly]
Sail soft implements a radio button, which can uniformly set the selection status of other radio buttons
Ali developed three sides, and the interviewer's set of combined punches made me confused on the spot
Gartner announces emerging technology research: insight into the meta universe
ES常用查询、排序、聚合语句
如何进行应用安全测试(AST)
Simple usage of dlopen / dlsym / dlclose
299. 猜数字游戏
The solution of not displaying a whole line when the total value needs to be set to 0 in sail software
MySQL - execution process of MySQL query statement
Findstr is not an internal or external command workaround
vim编辑器的实时操作
JMeter setting environment variable supports direct startup by entering JMeter in any terminal directory
力扣-198.打家劫舍
Force buckle-746 Climb stairs with minimum cost
ESP32_Arduino