尧图网络 高端网站定制 · 原创设计
免费咨询热线
400-888-6620
免费获取方案
新建硬盘---分区----格式化----挂载,笔记
在我们虚拟机界面添加新磁盘然后步骤如下硬盘分区[rootrhcsa ~]# fdisk /dev/sdaWelcome to fdisk (util-linux 2.40.2).Changes will remain in memory only, until you decide to write them.Be careful before using the write command.Device does not contain a recognized partition table.Created a new DOS (MBR) disklabel with disk identifier 0x990495ff.Command (m for help): oCreated a new DOS (MBR) disklabel with disk identifier 0xc3b2ba40.Command (m for help): nPartition typep primary (0 primary, 0 extended, 4 free)e extended (container for logical partitions)Select (default p): pPartition number (1-4, default 1):First sector (2048-44040191, default 2048):Last sector, /-sectors or /-size{K,M,G,T,P} (2048-44040191, default 44040191): 2GCreated a new partition 1 of type Linux and of size 2 GiB.Command (m for help): nPartition typep primary (1 primary, 0 extended, 3 free)e extended (container for logical partitions)Select (default p): pPartition number (2-4, default 2):First sector (4196352-44040191, default 4196352):Last sector, /-sectors or /-size{K,M,G,T,P} (4196352-44040191, default 44040191): 2GCreated a new partition 2 of type Linux and of size 2 GiB.Command (m for help): nPartition typep primary (2 primary, 0 extended, 2 free)e extended (container for logical partitions)Select (default p): pPartition number (3,4, default 3):First sector (8390656-44040191, default 8390656):Last sector, /-sectors or /-size{K,M,G,T,P} (8390656-44040191, default 44040191): 3GCreated a new partition 3 of type Linux and of size 3 GiB.Command (m for help): nPartition typep primary (3 primary, 0 extended, 1 free)e extended (container for logical partitions)Select (default e): eSelected partition 4First sector (14682112-44040191, default 14682112):Last sector, /-sectors or /-size{K,M,G,T,P} (14682112-44040191, default 44040191):Created a new partition 4 of type Extended and of size 14 GiB.Command (m for help): nAll primary partitions are in use.Adding logical partition 5First sector (14684160-44040191, default 14684160):Last sector, /-sectors or /-size{K,M,G,T,P} (14684160-44040191, default 44040191): 3GCreated a new partition 5 of type Linux and of size 3 GiB.Command (m for help): nAll primary partitions are in use.Adding logical partition 6First sector (20977664-44040191, default 20977664):Last sector, /-sectors or /-size{K,M,G,T,P} (20977664-44040191, default 44040191): 3GCreated a new partition 6 of type Linux and of size 3 GiB.Command (m for help): nAll primary partitions are in use.Adding logical partition 7First sector (27271168-44040191, default 27271168):Last sector, /-sectors or /-size{K,M,G,T,P} (27271168-44040191, default 44040191):Created a new partition 7 of type Linux and of size 8 GiB.Command (m for help): pDisk /dev/sda: 21 GiB, 22548578304 bytes, 44040192 sectorsDisk model: VMware Virtual SUnits: sectors of 1 * 512 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisklabel type: dosDisk identifier: 0xc3b2ba40Device Boot Start End Sectors Size Id Type/dev/sda1 2048 4196351 4194304 2G 83 Linux/dev/sda2 4196352 8390655 4194304 2G 83 Linux/dev/sda3 8390656 14682111 6291456 3G 83 Linux/dev/sda4 14682112 44040191 29358080 14G 5 Extended/dev/sda5 14684160 20975615 6291456 3G 83 Linux/dev/sda6 20977664 27269119 6291456 3G 83 Linux/dev/sda7 27271168 44040191 16769024 8G 83 LinuxCommand (m for help): wThe partition table has been altered.Calling ioctl() to re-read partition table.Syncing disks.[rootrhcsa ~]# fdisk /dev/sdbWelcome to fdisk (util-linux 2.40.2).Changes will remain in memory only, until you decide to write them.Be careful before using the write command.Device does not contain a recognized partition table.Created a new DOS (MBR) disklabel with disk identifier 0x76f4ae84.Command (m for help): gCreated a new GPT disklabel (GUID: CA42BD46-2412-4200-9885-6C329228F30C).Command (m for help): nPartition number (1-128, default 1):First sector (2048-41943006, default 2048):Last sector, /-sectors or /-size{K,M,G,T,P} (2048-41943006, default 41940991): 4GCreated a new partition 1 of type Linux filesystem and of size 4 GiB.Command (m for help): nPartition number (2-128, default 2):First sector (8390656-41943006, default 8390656):Last sector, /-sectors or /-size{K,M,G,T,P} (8390656-41943006, default 41940991): 3GCreated a new partition 2 of type Linux filesystem and of size 3 GiB.Command (m for help): nPartition number (3-128, default 3):First sector (14682112-41943006, default 14682112):Last sector, /-sectors or /-size{K,M,G,T,P} (14682112-41943006, default 41940991):Created a new partition 3 of type Linux filesystem and of size 13 GiB.Command (m for help): pDisk /dev/sdb: 20 GiB, 21474836480 bytes, 41943040 sectorsDisk model: VMware Virtual SUnits: sectors of 1 * 512 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisklabel type: gptDisk identifier: CA42BD46-2412-4200-9885-6C329228F30CDevice Start End Sectors Size Type/dev/sdb1 2048 8390655 8388608 4G Linux filesystem/dev/sdb2 8390656 14682111 6291456 3G Linux filesystem/dev/sdb3 14682112 41940991 27258880 13G Linux filesystemCommand (m for help): wThe partition table has been altered.Calling ioctl() to re-read partition table.Syncing disks.格式化[rootrhcsa ~]# mkfs.xfs /dev/sda1[rootrhcsa ~]# mkfs.ext4 /dev/sda2[rootrhcsa ~]# lsblk -fNAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTSsda├─sda1 xfs 9457ccee-7b50-459f-819d-ce16963e666f├─sda2 ext4 1.0 8ef7c3cf-fc4e-4cb4-98cc-e287d7ef0167├─sda3├─sda4├─sda5├─sda6└─sda7挂载[rootrhcsa ~]# mkdir /guazai1[rootrhcsa ~]# mount /dev/sda1 /guazai1/[rootrhcsa ~]# lsblkNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTSsda 8:0 0 21G 0 disk├─sda1 8:1 0 2G 0 part /guazai1├─sda2 8:2 0 2G 0 part├─sda3 8:3 0 3G 0 part├─sda4 8:4 0 1K 0 part├─sda5 8:5 0 3G 0 part├─sda6 8:6 0 3G 0 part└─sda7 8:7 0 8G 0 part[rootrhcsa ~]# mkdir /guazai2[rootrhcsa ~]# blkid /dev/sda2/dev/sda2: UUID8ef7c3cf-fc4e-4cb4-98cc-e287d7ef0167 BLOCK_SIZE4096 TYPEext4 PARTUUIDc3b2ba40-02[rootrhcsa ~]# mount UUID8ef7c3cf-fc4e-4cb4-98cc-e287d7ef0167 /guazai2
RELATED

相关推荐

【云计算】管理云计算成本的5个小技巧

【云计算】管理云计算成本的5个小技巧

管理云计算成本已成为众多企业的主要挑战。RightScale调查显示,80%的受访者视成本为首要难题,且使用云越久,成本压力越突出。企业云支出巨大:52%的企业年支出超120万美元,26%超600万美元;同时,7…

📅 2026/9/21 13:36:00
ai网站搭建平台工具有哪些?2026年设计ai网站的平台推荐

ai网站搭建平台工具有哪些?2026年设计ai网站的平台推荐

如今线上获客已经成为企业经营刚需,官网、独立站是企业展示品牌、承接客户、拓展外贸的核心渠道。过去搭建网站高度依赖程序员、专业设计师,整套流程耗时长、花费高,中小企业很难负担持续建站、改版、优化的成本。随着人工智能技术成熟&#…

📅 2026/9/3 6:07:43
你的后台缺的不是 AI 聊天框,是一个能动手干活的 AI 同事

你的后台缺的不是 AI 聊天框,是一个能动手干活的 AI 同事

过去一年,你大概见过无数个这样的"AI 功能":产品右下角挂一个聊天气泡,点开,问它"帮我把这批订单导出来",它回你一段热情洋溢的、正确的废话——然后你关掉气泡,自己去点导出按钮。 这…

📅 2026/10/19 4:12:52
MORE NEWS

更多资讯

📰

YOLO26在火焰检测中的优化与应用实践

1. 项目概述:当YOLO26遇上火焰检测去年参与某工业园区安防系统升级时,我第一次将YOLO26模型应用于火焰检测场景。传统烟雾传感器在露天环境存在明显局限,而基于深度学习的视觉检测方案完美解决了这个痛点。这个开源项目完整实现了从数据准备到…

📰

Claude Opus 5.5降价后,订阅用户和API开发者到底谁更省钱?

1. 降价这件事,先搞清楚降的是哪条线Claude Opus 5.5 降价的消息一出来,我身边好几个做开发的朋友第一反应都是“那我订阅是不是也能便宜点”。这个反应特别真实,但也特别容易踩坑——因为 Anthropic 的定价体系里,订阅&#xff0…

📰

车载NVH测试精度提升:GRAS黄金组合的选型与实操指南

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

📰

STM32F103外扩ADS1115 16位ADC例程:I2C驱动与PGA配置实战

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

📰

机器学习驱动的物理约束干旱建模方法

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

📰

嵌入式Linux与安卓驱动开发实战:从内核模块到HAL层全链路解析

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

TODAY

今日更新

THIS WEEK

本周精选

THIS MONTH

本月热门

读完文章,想聊聊您的网站?

告诉我们您的行业与需求,资深顾问一对一梳理方案与报价,全程免费。

📞 💬