当前位置:网站首页>Disk and file system
Disk and file system
2022-07-20 10:24:00 【1701y】
Catalog
MBR( Master bootstrap and partition table )
Linux Other supported file system types
Instructions for partitioning the hard disk
Hard disk
Disk structure
Disc : A hard disk has multiple disks , Every disc 2 Noodles
head : One head per side
data structure
A sector : The disc is divided into sectors , Each sector stores 512 Bytes of data , The smallest storage unit of a hard disk
Magnetic track : Concentric circles with different radii on the same disk , It is a circular track drawn by the magnetic head on the surface of the disk , Convenient data storage
cylinder : A cylindrical surface formed by the same radius of different disks , It consists of multiple tracks of the same radius circle
Hard disk storage capacity = Number of heads x Magnetic track ( cylinder ) Count × Sectors per channel × Bytes per sector (512 byte )
You can use a cylinder / The head sector uniquely locates each area on the disk
Hard disk interface type
IDE、SATA、SCSI、SAS、 Fibre channel
MBR( Master bootstrap and partition table )
1.MBR In the first physical sector of the hard disk , MBR It contains the main boot program and partition table of the hard disk
2.MBR in total 512 byte , front 446 The byte is the master boot record , The partition table is saved MBR The second in the sector 447-512 In bytes
3. The partition table has 4 Zone record area , The recording area of each zone accounts for 16 byte
Linux The hard disk in the computer 、 Devices such as partitions are represented as files
The partition represents
/dev/sda1
sd Express scsi equipment hd: Express IDE equipment
a: Indicates the number of hard disks .a,b,c
1: Indicates the number of partitions ,
Disk partition structure
On the hard disk Number of primary partitions Only 4 individual (1、2、3、4)
The number of primary and extended partitions is limited to 1~4
Only one extended partition can be created
First establish After expanding the partition , Can be divided into A logical partition
The ordinal number of the logical partition will always be from 5 Start , There is no limit to the number of logical partitions
File system type
XFS file system
File system for storing files and directory data ( Special partition )
High performance log file system , Especially good at dealing with big files , Can support millions of TB Storage space
CenOS 7 The default file system used in the system fs The end file is usually the file system
Management document Manage disks
swap Exchange file system
by Linux Create a swap partition
It's usually physical memory 1.5 To 2 times
Linux Other supported file system types
EXT4、 FAT32、 NTFS、 LVM ( Cross disk )
Disk management
View partition :fdisk -l [ Disk device ]
Set partition :fdisk [ Disk device ]
Device: Device file name of partition ;
Boot: Is it a bootstrap partition , If yes, there are “ * ” Number identification ;
Start: The starting position of the partition in the hard disk ( Cylinders );
End: The end of the partition on the hard disk ( Cylinders );
Blocks: Size of partition , With Blocks( block ) In units of , The default block size is 1024 byte .
Id: The system corresponding to the partition ID Number ,82 yes swap ,83 Express Linux Default partition in (XFS or EXT4),8e Express LVM Logic volume ;
System: Partition type
fdisk /dev/sdb/
Instructions for partitioning the hard disk
Instructions effect
m : Get help menu
p : Check the zoning
n : New partition
d : Delete partition
t : Change zone type
w : Save the partition operation and exit
q : Exit directly without saving the partition operation
l : Show all partition types (83 Common type 82swap 8e LVM fd raid Disk entire column )
New hard disk operation
First click on virtual machine settings Click Add Follow the steps to the next step , Select the size you want to add , And save the path
First fdisk -l View disk information See if the disk you just added can be found
fdisk /dev/sdc Enter disk configuration , Prepare to configure disk
First configure a 10G Main partition
Press n Indicates a new partition p Represents the primary partition e For extended partition
Configure one more 15G Extended partition for
Create two more logical partitions One is 5G One is 8G
Press p Check the partition
take sdc6 Modified into swap Format
Finally save and exit
take sdc6 format
mkfs.xfs /dev/sdc6
take sdc6 mount /yunyun
Set up auto mount
stay /etc/fstab The file stores the static mount data of the file system .Linux Every time you start up , Will automatically read the contents of this file , Automatically mount the specified file system .
vim /etc/fstab
Write data
mount -a Immediate effect View mount results Have succeeded .
边栏推荐
- Apprentissage de la sécurité des réseaux (XVII) VLAN
- 使用 gst-launch 小记
- DHCP原理与配置
- ceph 创建存储池提示pool size is bigger than the crush rule max size
- Lunix开机引导和故障修复
- Mikrotik ROS soft route setting Internet access mode (III)
- Unity practical framework (III) event system
- Lombok配合Logback实现最简单的日志输出
- Network Security Learning (XXII) build virtual special lines for companies and branches
- 论文笔记:Knowing When to Look: Adaptive Attention viaA Visual Sentinel for Image Captioning# Knowing Whe
猜你喜欢
Openstack queens create fixed IP virtual machine
Lombok cooperates with logback to realize the simplest log output
进程间通信之消息队列(内附相关可执行代码)
openstack queens创建固定IP虚拟机
[resource record] VAE learning notes
第三天实验
Server hardware and RAID configuration and Practice
Mikrotik ROS软路由设置上网方式(二)
Postgresql Tutorial
服务器硬件及RAID配置与实战
随机推荐
RedHat 7 replace Yum source
Network packet capturing to understand the establishment process of TCP triple handshake
MongoDB
Mikrotik ROS软路由设置上网方式(三)
Network Security Learning (XXIV) transport layer protocol
String cache pool and integer cache pool
firewall-cmd
单臂路由和VRRP
重载(Overload) 与 重写(Override)的区别
字符串常见方法总结:
FIO test hard disk performance
【资源记录】流形学习 Manifold learning 和 PCA 的关系
第二次实验 静态路由的扩展配置
ModuleNotFoundError: No module named 'gflags'
Transport layer protocol
黑马程序员反射入门
黑马程序员线程池
第三天实验
DHCP第一次静态实验
Mikrotik ROS soft route setting Internet access mode (II)