linux刪除分區(qū)提示No partition is defined yet! Could not delete partiti
問題:Linux中通過fdisk刪除分區(qū)錯誤如下:
[root@cloud admin]# fdisk /dev/nvme0n2p1
Welcome to fdisk (util-linux 2.32.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): d
No partition is defined yet!
Could not delete partition 1
原因:fdisk 命令后跟的是磁盤的名稱,不是分區(qū)的額名稱,將fdisk /dev/nvme0n2p1改為fdisk?/dev/nvme0n2即可。
[root@cloud admin]# fdisk /dev/nvme0n2
Welcome to fdisk (util-linux 2.32.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help):d
Selected partition 1
Partition 1 has been deleted.
成功!
標(biāo)簽: