linux 如何删除gpt分区,Centos 7下如何删除GPT分区

操作环境

Centos 7

操作步骤

最近在linux测试机上面,通过fdisk 查看硬盘,发现几块1TB的硬盘都变成了GPT分区,无法通过fdisk进行分区操作,所以要通过parted 删除其GPT分区

[root@docker-server-1 ~]# fdisk -l

Disk /dev/sdb: 999.7 GB,999653638144 bytes

255 heads,63 sectors/track,121534 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x000dac36

Device Boot Start End Blocks Id System

Disk /dev/sda: 999.7 GB,121534 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00048d6c

Device Boot Start End Blocks Id System

/dev/sda1 * 1 1306 10485760 83 Linux

/dev/sda2 1306 3346 16384000 82 Linux swap / Solaris

/dev/sda3 3346 121535 949353472 83 Linux

WARNING: GPT (GUID Partition Table) detected on '/dev/sdc'! The util fdisk doesn't support GPT. Use GNU Parted.

Disk /dev/sdc: 999.7 GB,121534 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

Device Boot Start End Blocks Id System

WARNING: GPT (GUID Partition Table) detected on '/dev/sdf'! The util fdisk doesn't support GPT. Use GNU Parted.

Disk /dev/sdf: 999.7 GB,999653638144 bytes

256 heads,121059 cylinders

Units = cylinders of 16128 * 512 = 8257536 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

Device Boot Start End Blocks Id System

/dev/sdf1 1 121060 976224255+ ee GPT

WARNING: GPT (GUID Partition Table) detected on '/dev/sdd'! The util fdisk doesn't support GPT. Use GNU Parted.

Disk /dev/sdd: 999.7 GB,121534 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

Device Boot Start End Blocks Id System

WARNING: GPT (GUID Partition Table) detected on '/dev/sde'! The util fdisk doesn't support GPT. Use GNU Parted.

Disk /dev/sde: 999.7 GB,121059 cylinders

Units = cylinders of 16128 * 512 = 8257536 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

Device Boot Start End Blocks Id System

/dev/sde1 1 121060 976224255+ ee GPT

1.选择sdc进行删除GPT分区操作

[root@docker-server-1 ~]# parted /dev/sdc

GNU Parted 2.1

Using /dev/sdc

Welcome to GNU Parted! Type 'help' to view a list of commands.

(parted)

2.通过mklabel建立msdos分区

(parted) mklabel

New disk label type? msdos

Warning: The existing disk label on /dev/sdc will be destroyed and all data on this disk will be lost. Do you want to continue?

Yes/No? Yes

Warning: /dev/sdc contains GPT signatures,indicating that it has a GPT table. However,it does not have a valid fake msdos partition table,as it should. Perhaps it was corrupted -- possibly by a program that doesn't understand

GPT partition tables. Or perhaps you deleted the GPT table,and are now using an msdos partition table. Is this a GPT partition table?

Yes/No? Yes 3.再次通过fdisk 查看sdc,就不会提示GPT分区了

总结

如果觉得编程之家网站内容还不错,欢迎将编程之家网站推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值