GPT的磁盘管理

GPT分区工具:gdisk gdisk

gdisk分区

GPT  128个主分区
[root@zutuanxue ~]# gdisk -l /dev/sdc
[root@zutuanxue ~]# gdisk -l /dev/sdc   查看sdc信息
GPT fdisk (gdisk) version 1.0.3
​
Partition table scan:MBR: MBR onlyBSD: not presentAPM: not presentGPT: not present          ###GPT分区无法使用
​
​
***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. 
***************************************************************
​
Disk /dev/sdc: 41943040 sectors, 20.0 GiB
Model: VMware Virtual S
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): B228357D-34EC-4E47-BB81-A7312F3BCF8D
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 41943006
Partitions will be aligned on 2048-sector boundaries
Total free space is 37748669 sectors (18.0 GiB)
​
Number  Start (sector)    End (sector)  Size       Code  Name1            2048         2099199   1024.0 MiB  8300  Linux filesystem2         2099200         4196351   1024.0 MiB  8300  Linux filesystem
​
​
​
​
将MBR转换成GPT分区
[root@zutuanxue ~]# gdisk /dev/sdc
GPT fdisk (gdisk) version 1.0.3
​
Partition table scan:MBR: MBR onlyBSD: not presentAPM: not presentGPT: not present
​
​
***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by
typing 'q' if you don't want to convert your MBR partitions
to GPT format!
***************************************************************
​
​
Command (? for help): o
This option deletes all partitions and creates a new protective MBR.
Proceed? (Y/N): y
​
Command (? for help): w
​
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!
​
Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/sdc.
The operation has completed successfully.
​
​
​
[root@zutuanxue ~]# gdisk -l /dev/sdc
GPT fdisk (gdisk) version 1.0.3
​
Partition table scan:MBR: protectiveBSD: not presentAPM: not presentGPT: present          ###GPT可用了
​
Found valid GPT with protective MBR; using GPT.
Disk /dev/sdc: 41943040 sectors, 20.0 GiB
Model: VMware Virtual S
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 7CA4232A-4A9E-467D-AADD-BB84DB2126E3
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 41943006
Partitions will be aligned on 2048-sector boundaries
Total free space is 41942973 sectors (20.0 GiB)
​
Number  Start (sector)    End (sector)  Size       Code  Name
​
​
​
#再次分区
[root@zutuanxue ~]# gdisk /dev/sdc
GPT fdisk (gdisk) version 1.0.3
​
Partition table scan:MBR: protectiveBSD: not presentAPM: not presentGPT: present
​
Found valid GPT with protective MBR; using GPT.
​
Command (? for help): n
Partition number (1-128, default 1): 1
First sector (34-41943006, default = 2048) or {+-}size{KMGTP}: 
Last sector (2048-41943006, default = 41943006) or {+-}size{KMGTP}: +2G
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): 
Changed type of partition to 'Linux filesystem'
​
Command (? for help): p
Disk /dev/sdc: 41943040 sectors, 20.0 GiB
Model: VMware Virtual S
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 7CA4232A-4A9E-467D-AADD-BB84DB2126E3
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 41943006
Partitions will be aligned on 2048-sector boundaries
Total free space is 37748669 sectors (18.0 GiB)
​
Number  Start (sector)    End (sector)  Size       Code  Name1            2048         4196351   2.0 GiB     8300  Linux filesystem
Command (? for help): w
​
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!
​
Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/sdc.
The operation has completed successfully.
​
​
[root@zutuanxue ~]# partprobe /dev/sdc
​
2.创建文件系统(格式化)CentOS8默认使用xfs
[root@zutuanxue ~]# mkfs.xfs -f /dev/sdc1
​
​
3.挂载
[root@zutuanxue ~]# mkdir /disk1
[root@zutuanxue ~]# mount -t xfs -o ro /dev/sdc1 /disk1     //手动挂载
[root@zutuanxue ~]# umount /disk1       ##卸载

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/735103.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Charles-抓包工具的使用

文章目录 Charles简介与安装Charles的简介Charles的安装Charles 安装证书 抓包在PC端抓取HTTPS请求在移动端进行抓包移动端配置Androd端配置iOS端配置 Charles使用小技巧: 模拟慢速网络 Charles简介与安装 Charles的简介 Charles 是在 PC 端常用的网络封包截取工具…

Android 开发过程中常见的内存泄漏场景分析

场景1 Static变量存储上下文环境Context public class ClassName {// 定义1个静态变量private static Context mContext;//... // 引用的是Activity的contextmContext context; // 当Activity需销毁时,由于mContext 静态 & 生命周期 应用程序的生命周期&…

数字化转型导师坚鹏:科技金融政策、案例及营销创新

科技金融政策、案例及营销创新 课程背景: 很多银行存在以下问题: 不清楚科技金融有哪些利好的政策? 不知道科技金融有哪些成功的案例? 不知道科技金融如何进行营销创新? 课程特色: 以案例的方式解…

【重温设计模式】迭代器模式及其Java示例

迭代器模式的介绍 在编程领域,迭代器模式是一种常见的设计模式,它提供了一种方法,使得我们可以顺序访问一个集合对象中的各个元素,而又无需暴露该对象的内部表示。你可以把它想象成一本书,你不需要知道这本书是怎么印…

VLC播放器快捷键大全(史诗级最全)

文章目录 前言 a.倍速播放 b.快进快退 c.播放暂停 d.音量调节 e.跳到指定时间 f.画幅比例 缩放 裁剪 全屏 g.状态栏显示 h.截屏 录制 i.打开 保存 截屏 转化 四、总结 前…

vue+nodejs超市购物商城在线选品系统wtk87

在此基础上,结合现有超市货品信息管理体系的特点,运用新技术,构建了以 vue为基础的超市货品信息管理信息化管理体系。首先,以需求为依据,根据需求分析结果进行了系统的设计,并将其划分为管理员和用户二种角…

章六、集合(1)—— Set 接口及实现类、集合迭代、Map 接口、Collections类

一、 Set 接口及实现类 Set接口不能存储重复元素 Set接口继承了Collection接口。Set中所存储的元素是不重复的,但是是无序的, Set中的元素是没有索引的 Set接口有两个实现类: ● HashSet :HashSet类中的元素不能重复 ● TreeSet :可以给Set集…

python(5)之处理数组

上次代码结果如下: 1、处理数组的缺失值 1、isnan()函数 isnan()函数是Numpy模块里的一个可以标记数组中缺失值的位置 代码示例如下: import numpy as np ac np.array([1,2,3,2,3,4,5,9,np.nan,1]) p…

系统分析与设计(一)

我们有这么多各式各样的工具,互联网给我们带来了这么多用户和数据,这是好事也有副作用。 世界上能访问用户数据,并根据数据做分析和改进的公司,大概Google是其中翘楚,这种 data-centric 的做法做过了头,也有悲剧发生: Douglas Bowman 曾经是Google 的视觉设计主管,2009年的一天…

设计模式:观察者模式 ⑧

一、思想 观察者模式是一种常见的设计模式,也称作发布-订阅模式。它主要解决了对象之间的通知依赖关系问题。在这种模式中,一个对象(称作Subject)维护着一个对象列表,这些对象(称作Observers)都…

Docker完整版(一)

Docker完整版(一) 一、Docker概述1.1、Docker简介1.2、Docker的用途1.3、容器与虚拟机的区别1.4、Docker系统架构1.5、Docker仓库 二、Docker引擎2.1、Docker引擎架构2.2、Docker引擎分类2.3、Docker引擎的安装2.4、Docker镜像加速器 三、Docker镜像3.1、…

新概念英语第二册(76)

【New words and expressions】生词和短语(15) fool n. 傻瓜 bulletin n. 新闻简报 announcer n. (电视、电台)播音员 macaroni n. …

线程-创建线程的方法、线程池

1.创建线程一共有哪几种方法? 继承Thread类创建线程 继承Thread类,重写run()方法,在main()函数中调用子类的strat()方法 实现Runnable接口创建线程 先创建实现Runnable接口的类,重写run()方法,创建类的实例对象&#…

kibana配置 dashbord,做可视化展示

一、环境介绍 这里我使用的kibana版本为7.17版本。 语言选择为中文。 需要已经有es,已经有kibana,并且都能正常访问。 二、背景介绍 kibana的可视化界面,可以配置很多监控统计界面。非常方便,做数据的可视化展示。 这篇文章&…

Java面试题(主要分清区别!!!)

RequestBody和ResponseBody的区别? RequestBody:接收json或xml数据 ResponseBody的:返回json或xml数据 RestController和Controller的区别? Controller:默认返回的是jsp页面 RestController:返回的是一个js…

自然语言处理(NLP)—— 生成式模型和判别式模型

生成式模型和判别式模型是机器学习领域两大类模型,它们在自然语言处理、计算机视觉等领域都有广泛的应用。理解这两类模型的区别对于选择正确的模型来解决特定问题非常重要。 1. 生成式模型 (Generative Models) 生成式模型旨在学习数据的联合概率分布\(P(X, Y)\)&…

数据结构:顺序表的奥秘

🎉个人名片: 🐼作者简介:一名乐于分享在学习道路上收获的大二在校生🐻‍❄个人主页🎉:GOTXX 🐼个人WeChat:ILXOXVJE🐼本文由GOTXX原创,首发CSDN&a…

C#,排列组合的堆生成法(Heap’s Algorithm for generating permutations)算法与源代码

1 排列组合的堆生成法 堆生成算法用于生成n个对象的所有组合。其思想是通过选择一对要交换的元素,在不干扰其他n-2元素的情况下,从先前的组合生成每个组合。 下面是生成n个给定数的所有组合的示例。 示例: 输入:1 2 3 输出&a…

4.移动零

给定一个数组 nums,编写一个函数将所有 0 移动到数组的末尾,同时保持非零元素的相对顺序。 请注意 ,必须在不复制数组的情况下原地对数组进行操作。 示例 1: 输入: nums [0,1,0,3,12] 输出: [1,3,12,0,0]示例 2: 输入: nums [0] 输出: […

ZigBee技术与实践教程(无线传感网技术第三天)

1.MAC层规范 在IEEE802系列标准中,OSI参考模型的数据链路层进一步划分为逻辑链路控制子层和介子访问子层两个子层。MAC子层使用物理层提供的服务实现设备之间的数据帧传输,而LLC在MAC 层的基础上,在设备之间提供面向连接和非连接的服务&…