报错fdisk: cannot write disk label: Invalid argument

使用parted -l修复一下 即可重新扩容分区

[root@fcecslpbddn21 ~]# parted -l
Model: Virtio Block Device (virtblk)
Disk /dev/vda: 53.7GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  53.7GB  53.7GB  primary  ext4         boot


Model: Virtio Block Device (virtblk)
Disk /dev/vdb: 8590MB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags: 

Number  Start  End     Size    File system     Flags
 1      0.00B  8590MB  8590MB  linux-swap(v1)


Model: Virtio Block Device (virtblk)
Disk /dev/vdc: 2147GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  2147GB  2147GB  primary  ext4


Error: The backup GPT table is not at the end of the disk, as it should be.
This might mean that another operating system believes the disk is smaller.
Fix, by moving the backup to the end (and removing the old backup)?
Fix/Ignore/Cancel? fix                                                    
Warning: Not all of the space available to /dev/vdd appears to be used, you can fix the GPT to use all of the space (an extra
31457280000 blocks) or continue with the current setting? 
Fix/Ignore? fix                                                           
Model: Virtio Block Device (virtblk)
Disk /dev/vdd: 21.5TB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name     Flags
 1      1049kB  5369GB  5369GB  xfs          primary


[root@fcecslpbddn21 ~]# fdisk /dev/vdd
WARNING: fdisk GPT support is currently new, and therefore in an experimental phase. Use at your own discretion.
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p

Disk /dev/vdd: 21474.8 GB, 21474836480000 bytes, 41943040000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: gpt
Disk identifier: 51D6A341-D5EC-4EA9-9740-843E35E10C7A


#         Start          End    Size  Type            Name
 1         2048  10485757951    4.9T  Microsoft basic primary

Command (m for help): d
Selected partition 1
Partition 1 is deleted

Command (m for help): n
Partition number (1-128, default 1): 
First sector (34-41943039966, default 2048): 
Last sector, +sectors or +size{K,M,G,T,P} (2048-41943039966, default 41943039966): 
Created partition 1


Command (m for help): w
The partition table has been altered!


Calling ioctl() to re-read partition table.

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

不仙520

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值