标签:字节 分区 扇区 dev gpt 磁盘 512 root mbr
一、查看现有分区
[root@localhost /]# fdisk -l 磁盘 /dev/sda:299.4 GB, 299439751168 字节,584843264 个扇区 Units = 扇区 of 1 * 512 = 512 bytes 扇区大小(逻辑/物理):512 字节 / 512 字节 I/O 大小(最小/最佳):512 字节 / 512 字节 磁盘标签类型:dos 磁盘标识符:0x000e7372 设备 Boot Start End Blocks Id System /dev/sda1 * 2048 2099199 1048576 83 Linux /dev/sda2 2099200 584843263 291372032 8e Linux LVM 磁盘 /dev/mapper/centos-root:53.7 GB, 53687091200 字节,104857600 个扇区 Units = 扇区 of 1 * 512 = 512 bytes 扇区大小(逻辑/物理):512 字节 / 512 字节 I/O 大小(最小/最佳):512 字节 / 512 字节 磁盘 /dev/mapper/centos-swap:16.8 GB, 16844324864 字节,32899072 个扇区 Units = 扇区 of 1 * 512 = 512 bytes 扇区大小(逻辑/物理):512 字节 / 512 字节 I/O 大小(最小/最佳):512 字节 / 512 字节 磁盘 /dev/mapper/centos-home:227.8 GB, 227826204672 字节,444973056 个扇区 Units = 扇区 of 1 * 512 = 512 bytes 扇区大小(逻辑/物理):512 字节 / 512 字节 I/O 大小(最小/最佳):512 字节 / 512 字节 [root@localhost /]#
磁盘标签类型:dos 既为mbr分区
二、利用gdisk工具进行分区转换
[root@localhost /]# yum install -y gdisk
转换/dev/sda2分区,sda1分区为系统启动分区,不需要转换
[root@localhost /]# gdisk /dev/sda2 GPT fdisk (gdisk) version 0.8.10 Partition table scan: MBR: not present BSD: not present APM: not present GPT: not present Creating new GPT entries. 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/sda2. Warning: The kernel is still using the old partition table. The new table will be used at the next reboot. The operation has completed successfully. [root@localhost /]#
查看分区类型
[root@localhost /]# fdisk -l /dev/sda2 WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion. 磁盘 /dev/sda2:298.4 GB, 298364960768 字节,582744064 个扇区 Units = 扇区 of 1 * 512 = 512 bytes 扇区大小(逻辑/物理):512 字节 / 512 字节 I/O 大小(最小/最佳):512 字节 / 512 字节 磁盘标签类型:gpt Disk identifier: CCBAA7C6-614C-4A45-BD26-2B2EDE14236D # Start End Size Type Name [root@localhost /]#
已经转换为GPT类型了,并且数据完好无损。
标签:字节,分区,扇区,dev,gpt,磁盘,512,root,mbr 来源: https://www.cnblogs.com/sky-cheng/p/15064324.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。