当前位置:网站首页>Hard Disk Partitioning and Permanent Mounting
Hard Disk Partitioning and Permanent Mounting
2022-08-05 06:09:00 【Magic star】
Hard Disk Partitioning and Permanent Mounts
MBR partition
What is a hard disk: A computer hard disk is the main storage device of a computer.
The role of partitions
- Main partition: can be used directly, can be installed system
- Extended partition: cannot be used directly, it must be divided into logical partitions
- Logical partition: Relying on the extended partition, the space in the extended partition (with the operating system installed) is used
mbr partition:
Only partition the hard disk below 2T
A sector has 512 bytes, the first 446 bytes are the boot program
- Primary partition: serial number is 1-4
- Logical partition: sequence number starts from 5
- Extended partition: must be the primary partition
- The primary partition is not necessarily an extended partition
- The logical partition must not be the primary partition
gpt partition
It can have 128 partition tables and can partition hard disks above 2T
fdisk

Create a normal partition
Usage (fdisk disk name)

mkfs.xfs partition name (create filesystem)

mount: mount partition name folder name

Create a logical partition
Usage (fdisk hard drive name)

mkfs.xfs partition name (create filesystem)

mount: mount partition name folder name


Create a special partition (swap partition)
Usage (fdisk hard drive name)


mount: mount partition name folder name
Create a special partition swap
The partition type must be changed to 82 (swap partition)
t: Change the partition type

Permanent mount
[[email protected] ~]#vim /etc/fstab
[[email protected] ~]#mount -a
Mounting rules
1. A mount point can only mount one device at a time
2. A mount point mounts multiple devices at the same time, only the data of the last device can be seen, the data on other devices will be hidden
3. A device can be mounted to multiple mount points at the same time
4. Usually the mount point is usually an existing empty directory
If a user is mountingThe mount directory cannot be unmounted
I want to remount
mount -o remount /dev/sdb1 /mnt/
mount -o remount,ro /dev/sdb1 /mnt/
fuser -km /mnt/ ###Kill directly
MBR 446 before the master boot record 64 after the boot program Partition table 2 mark bit
1. Partition fidsk gdisk Primary partition extension logic
2. Create file system mkfs. File system type mkswap
3. Mountmount swapon
Repair file system:
dd if=/dev/zero of=/dev/sdb1 bs=512 count=1
dd copy
if copy from where what /dev/zero
ofIt is copied to /dev/sdb1
bs=512 once copied 512
count=1 copied once
边栏推荐
- 每日一题-寻找两个正序数组的中位数-0713
- 入门文档09 独立的watch
- 错误类型:reflection.ReflectionException: Could not set property ‘xxx‘ of ‘class ‘xxx‘ with value ‘xxx‘
- Getting Started 11 Automatically add version numbers
- CIPU,对云计算产业有什么影响
- D39_向量
- 入门文档11 自动添加版本号
- Spark源码-任务提交流程之-6.1-sparkContext初始化-创建spark driver端执行环境SparkEnv
- 入门文档04 一个任务依赖另外一个任务时,需要按顺序执行
- I217-V在openwrt软路由下大流量断网问题
猜你喜欢

入门文档01 series按顺序执行

【Machine Learning】1 Univariate Linear Regression

【Day8】磁盘及磁盘的分区有关知识
![[Paper Intensive Reading] Rich Feature Hierarchies for Accurate Object Detection and Semantic Segmentation (R-CNN)](/img/a7/fc3fe440f5e57362d44ae875b7d436.png)
[Paper Intensive Reading] Rich Feature Hierarchies for Accurate Object Detection and Semantic Segmentation (R-CNN)

【Day8】Knowledge about disk and disk partition

Unity huatuo 革命性热更系列1.2 huatuo热更环境安装与示例项目

【UiPath2022+C#】UiPath 练习和解决方案-变量、数据类型和控制流程

C语言—扫雷的实现

【Day8】使用LVM扩容所涉及的命令

URP渲染管线实战教程系列 之URP渲染管线实战解密(一)
随机推荐
硬盘分区和永久挂载
阿里云视频点播
腾讯云消息队列CMQ
洞察互联网大趋势,读完这篇文章你就彻底了解中文域名
UE5再次更新!扫描或手动建模面部模型可直接转为绑定好的Metahuman
什么是阿里云·速成美站?
新一代解析技术——云解析
什么是全栈设计师?
C语言入门笔记 —— 函数(1)
【UiPath2022+C#】UiPath If条件语句
C语言入门笔记 —— 分支与循环
函数在开发环境中的应用(简易实例)
硬核!Cocos开发面试必备十问,让你offer拿到手软
spark源码-任务提交流程之-4-container中启动executor
Unity中的GetEnumerator 方法及MoveNext、Reset方法
C语言—三子棋的实现
2020,Laya最新中高级面试灵魂32问,你都知道吗?
Cocos Creator小游戏案例《棍子士兵》
海外服务器的优势
Wireshark抓包及常用过滤方法