CentOS删除磁盘分区命令
<pre>fdisk /dev/sdbCommand (m for help): d
--输入删除指令
Partition number (1-7): 1
--输入删除的分区号
Command (m for help): p
--打印分区表
Disk /dev/sdb: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks IdSystem
/dev/sdb2 251 500 2008125 83Linux
/dev/sdb3 501 750 2008125 83Linux
/dev/sdb4 751 1305 4458037+ 5Extended
/dev/sdb5 751 875 1004031 83Linux
/dev/sdb6 876 1000 1004031 83Linux
/dev/sdb7 1001 1305 2449881 83Linux
--可以看到sdb1已经被删除了
--接下来同理,删除其它分区
Command (m for help): d
Partition number (1-7): 2
Command (m for help): d
Partition number (1-7): 3
Command (m for help): d
Partition number (1-7): 4
Command (m for help): p
Disk /dev/sdb: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks IdSystem
Command (m for help): w
--保存退出
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
</pre>
<p>现在可以移除磁盘了</p>
<p class="post-copyright">未经允许不得转载:<ahref="https://www.wangchao.info/">王超博客</a> » <ahref="https://www.wangchao.info/1776.html">CentOS删除磁盘分区命令</a></p>
页:
[1]