本文主要是介绍4.4-磁盘分区(下)删除分区观察分区序号变化,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
删除分区1(主分区)
p查看分区,d删除分区,输入1(删除分区1),p(查看分区)发现原本在第一的位置上的 /dev/sdb1 已经没了
Command (m for help): pDisk /dev/sdb: 10.7 GB, 10737418240 bytes, 20971520 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: dos
Disk identifier: 0x4ce7226cDevice Boot Start End Blocks Id System
/dev/sdb1 2048 4196351 2097152 83 Linux
/dev/sdb2 4196352 8390655 2097152 83 Linux
/dev/sdb3 8390656 10487807 1048576 83 Linux
/dev/sdb4 10487808 18876415 4194304 5 Extended
/dev/sdb5 10489856 12587007 1048576 83 Linux
/dev/sdb6 12589056 14686207 1048576 83 LinuxCommand (m for help): d
Partition number (1-6, default 6): 1
Partition 1 is deletedCommand (m for help): pDisk /dev/sdb: 10.7 GB, 10737418240 bytes, 20971520 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: dos
Disk identifier: 0x4ce7226cDevice Boot Start End Blocks Id System
/dev/sdb2 4196352 8390655 2097152 83 Linux
/dev/sdb3 8390656 10487807 1048576 83 Linux
/dev/sdb4 10487808 18876415 4194304 5 Extended
/dev/sdb5 10489856 12587007 1048576 83 Linux
/dev/sdb6 12589056 14686207 1048576 83 LinuxCommand (m for help):
删除分区5(逻辑分区)
p查看分区,d删除分区,输入5(删除分区5),p(查看分区)对比上面的 Start End 可以发现,上图上的 /dev/sdb5 已经没了,但是原本的 /dev/sdb6 变成了 /dev/sdb5了
Command (m for help): pDisk /dev/sdb: 10.7 GB, 10737418240 bytes, 20971520 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: dos
Disk identifier: 0x4ce7226cDevice Boot Start End Blocks Id System
/dev/sdb2 4196352 8390655 2097152 83 Linux
/dev/sdb3 8390656 10487807 1048576 83 Linux
/dev/sdb4 10487808 18876415 4194304 5 Extended
/dev/sdb5 10489856 12587007 10
这篇关于4.4-磁盘分区(下)删除分区观察分区序号变化的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!